* Aborts the previously opened transaction
*/
void AbortOperation();
+
+ /*!
+ * Set list of parameters
+ * \param theParameters is a string containing the list of parameters separated by ":" symbol
+ */
+ void SetParameters (in string theParameters);
+
+ /*!
+ * Get list of parameters
+ */
+ string GetParameters();
};
/*!
<number>6</number>
</property>
<item row="2" column="1" >
- <widget class="QtxDoubleSpinBox" name="SpinBox_DZ" />
+ <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ" />
</item>
<item row="1" column="1" >
- <widget class="QtxDoubleSpinBox" name="SpinBox_DY" />
+ <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY" />
</item>
<item row="0" column="1" >
- <widget class="QtxDoubleSpinBox" name="SpinBox_DX" />
+ <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="TextLabel2" >
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<customwidgets>
<customwidget>
- <class>QtxDoubleSpinBox</class>
+ <class>SalomeApp_DoubleSpinBox</class>
<extends>QDoubleSpinBox</extends>
- <header location="global" >QtxDoubleSpinBox.h</header>
+ <header location="global" >SalomeApp_DoubleSpinBox.h</header>
</customwidget>
</customwidgets>
<tabstops>
return (char*) _errorCode.ToCString();
}
+ //Sets a parameters of the operation
+ Standard_EXPORT void SetParameters(const TCollection_AsciiString& theParameters) {
+ _parameters = theParameters;
+ }
+
+ //Returns a parameters of the operation
+ Standard_EXPORT char* GetParameters() {
+ return (char*) _parameters.ToCString();
+ }
+
//Returns a pointer to GEOM_Engine which this operation interface is associated
Standard_EXPORT GEOM_Engine* GetEngine() { return _engine; }
GEOM_Engine* _engine;
GEOM_Solver* _solver;
int _docID;
-
+ TCollection_AsciiString _parameters;
};
#endif
_impl->AbortOperation();
}
+//=============================================================================
+/*!
+ * SetParameters
+ */
+//=============================================================================
+void GEOM_IOperations_i::SetParameters(const char* theParameters)
+{
+ _impl->SetParameters((char*)theParameters);
+}
+
+//=============================================================================
+/*!
+ * GetParameters
+ */
+//=============================================================================
+char* GEOM_IOperations_i::GetParameters()
+{
+ return CORBA::string_dup(_impl->GetParameters());
+}
+
//=============================================================================
/*!
* GetObject
virtual void AbortOperation();
+ virtual void SetParameters(const char* theParameters);
+
+ virtual char* GetParameters();
+
::GEOM_IOperations* GetImpl() { return _impl; }
//=================================================================================
bool PrimitiveGUI_BoxDlg::isValid (QString&)
{
- return getConstructorId() == 0 ? !(myPoint1->_is_nil() || myPoint2->_is_nil()) : true;
+ return getConstructorId() == 0 ? !(myPoint1->_is_nil() || myPoint2->_is_nil()) :
+ GroupDimensions->SpinBox_DX->isValid() &&
+ GroupDimensions->SpinBox_DY->isValid() &&
+ GroupDimensions->SpinBox_DZ->isValid();
}
//=================================================================================
double y = GroupDimensions->SpinBox_DY->value();
double z = GroupDimensions->SpinBox_DZ->value();
+ QStringList aParameters;
+ aParameters << GroupDimensions->SpinBox_DX->text();
+ aParameters << GroupDimensions->SpinBox_DY->text();
+ aParameters << GroupDimensions->SpinBox_DZ->text();
+ getOperation()->SetParameters( aParameters.join( ":" ).toLatin1().constData() );
+
anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->MakeBoxDXDYDZ(x, y, z);
res = true;
}