mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-30 03:50:35 +05:00
Dump Python Extension
This commit is contained in:
parent
9f34a7d727
commit
66713229be
@ -275,6 +275,17 @@ module GEOM
|
||||
* 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();
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -56,13 +56,13 @@
|
||||
<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" >
|
||||
@ -121,9 +121,9 @@
|
||||
<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>
|
||||
|
@ -65,6 +65,16 @@ class GEOM_IOperations
|
||||
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; }
|
||||
|
||||
@ -80,7 +90,7 @@ class GEOM_IOperations
|
||||
GEOM_Engine* _engine;
|
||||
GEOM_Solver* _solver;
|
||||
int _docID;
|
||||
|
||||
TCollection_AsciiString _parameters;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -122,6 +122,26 @@ void GEOM_IOperations_i::AbortOperation()
|
||||
_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
|
||||
|
@ -53,6 +53,10 @@ class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperatio
|
||||
|
||||
virtual void AbortOperation();
|
||||
|
||||
virtual void SetParameters(const char* theParameters);
|
||||
|
||||
virtual char* GetParameters();
|
||||
|
||||
|
||||
::GEOM_IOperations* GetImpl() { return _impl; }
|
||||
|
||||
|
@ -427,7 +427,10 @@ GEOM::GEOM_IOperations_ptr PrimitiveGUI_BoxDlg::createOperation()
|
||||
//=================================================================================
|
||||
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();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -455,6 +458,12 @@ bool PrimitiveGUI_BoxDlg::execute (ObjectList& objects)
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user