// function : isValid
// purpose :
//=================================================================================
-bool BasicGUI_CircleDlg::isValid( QString& msg )
+bool BasicGUI_CircleDlg::isValid( QString& msg, QStringList& absentParams )
{
const int id = getConstructorId();
if ( id == 0 ) {
//return !myPoint->_is_nil() && !myDir->_is_nil() && getRadius() > 0;
//nil point means origin of global CS
//nil vector means Z axis
- bool ok = GroupPntVecR->SpinBox_DX->isValid(msg, !IsPreview());
+ bool ok = GroupPntVecR->SpinBox_DX->isValid(msg, absentParams, !IsPreview());
return getRadius() > 0 && ok;
}
else if ( id == 1 )
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool BasicGUI_EllipseDlg::isValid( QString& msg )
+bool BasicGUI_EllipseDlg::isValid( QString& msg, QStringList& absentParams )
{
double aMajorR = GroupPoints->SpinBox_DX->value();
double aMinorR = GroupPoints->SpinBox_DY->value();
//nil point means origin of global CS
//nil vector means Z axis
bool ok = true;
- ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
return ok;
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool BasicGUI_MarkerDlg::isValid( QString& msg )
+bool BasicGUI_MarkerDlg::isValid( QString& msg, QStringList& absentParams )
{
const int id = getConstructorId();
gp_Vec v1( myData[ DX1 ]->value(), myData[ DY1 ]->value(), myData[ DZ1 ]->value() ),
case 0: {
bool ok = true;
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
- ok = anIter.value()->isValid( msg, !IsPreview()) && ok;
+ ok = anIter.value()->isValid( msg, absentParams, !IsPreview()) && ok;
return isOk && ok;
}
case 1:
protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void displayPreview ( const bool = false,
const bool = true,
// function : isValid
// purpose :
//=================================================================================
-bool BasicGUI_PlaneDlg::isValid( QString& msg )
+bool BasicGUI_PlaneDlg::isValid( QString& msg, QStringList& absentParams )
{
const int id = getConstructorId();
if ( getSize() <= 0 ) {
}
if ( id == 0 ) {
- bool ok = GroupPntDir->SpinBox_DX->isValid( msg, !IsPreview() );
+ bool ok = GroupPntDir->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
return !CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir ) && ok;
}
else if ( id == 1 ) {
- bool ok = Group3Pnts->SpinBox_DX->isValid( msg, !IsPreview() );
+ bool ok = Group3Pnts->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
return !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) &&
!isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 ) && ok;
}
else if ( id == 2 ) {
- bool ok = GroupFace->SpinBox_DX->isValid( msg, !IsPreview() );
+ bool ok = GroupFace->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
return !CORBA::is_nil( myFace ) && ok;
} else if ( id == 3 ) {
- bool ok = Group2Vec->SpinBox_DX->isValid( msg, !IsPreview() );
+ bool ok = Group2Vec->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
return !CORBA::is_nil( myVec1 ) && !CORBA::is_nil( myVec2 ) && !isEqual( myVec1, myVec2 ) && ok;
} else if ( id == 4 ) {
- bool ok = GroupLCS->SpinBox_DX->isValid( msg, !IsPreview() );
+ bool ok = GroupLCS->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
return ok;
}
return false;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool BasicGUI_PointDlg::isValid( QString& msg )
+bool BasicGUI_PointDlg::isValid( QString& msg, QStringList& absentParams )
{
const int id = getConstructorId();
if ( id == GEOM_POINT_XYZ ) {
bool ok = true;
- ok = GroupXYZ->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupXYZ->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = GroupXYZ->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupXYZ->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupXYZ->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupXYZ->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
return ok;
}
else if ( id == GEOM_POINT_REF ) {
bool ok = true;
- ok = GroupRefPoint->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupRefPoint->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = GroupRefPoint->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupRefPoint->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupRefPoint->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupRefPoint->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
return !myRefPoint->_is_nil() && ok;
}
else if ( id == GEOM_POINT_EDGE ) {
bool ok = true;
if ( myParamCoord->checkedId() == PARAM_VALUE )
- ok = GroupOnCurve->SpinBox_DX->isValid( msg, !IsPreview() );
+ ok = GroupOnCurve->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
else {
- ok = GroupXYZ->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupXYZ->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = GroupXYZ->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupXYZ->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupXYZ->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupXYZ->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
}
return !myEdge->_is_nil() && ok;
}
else if ( id == GEOM_POINT_SURF ) {
bool ok = true;
if ( myParamCoord->checkedId() == PARAM_VALUE ) {
- ok = GroupOnSurface->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupOnSurface->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupOnSurface->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupOnSurface->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
}
else {
- ok = GroupXYZ->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupXYZ->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = GroupXYZ->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupXYZ->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupXYZ->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupXYZ->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
}
return !myFace->_is_nil() && ok;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool BasicGUI_VectorDlg::isValid( QString& msg )
+bool BasicGUI_VectorDlg::isValid( QString& msg, QStringList& absentParams )
{
if(getConstructorId() == 0)
return !myPoint1->_is_nil() && !myPoint2->_is_nil();
else if(getConstructorId() == 1)
{
bool ok = true;
- ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
return ok;
}
return false;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid()
// purpose : Verify validity of input data
//=================================================================================
-bool BlocksGUI_ExplodeDlg::isValid (QString& msg)
+bool BlocksGUI_ExplodeDlg::isValid (QString& msg, QStringList& absentParams)
{
bool okSP = true;
- okSP = myGrp1->SpinBox1->isValid( msg, !IsPreview() ) && okSP;
- okSP = myGrp1->SpinBox2->isValid( msg, !IsPreview() ) && okSP;
+ okSP = myGrp1->SpinBox1->isValid( msg, absentParams, !IsPreview() ) && okSP;
+ okSP = myGrp1->SpinBox2->isValid( msg, absentParams, !IsPreview() ) && okSP;
bool ok = false;
switch ( getConstructorId() ) {
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr );
// function : isValid
// purpose : Verify validity of input data
//=================================================================================
-bool BlocksGUI_TrsfDlg::isValid (QString& msg)
+bool BlocksGUI_TrsfDlg::isValid (QString& msg, QStringList& absentParams)
{
bool ok = false, okSP = true;
switch (getConstructorId()) {
case 0:
ok = !myShape->_is_nil() && myFaces[Face1] > 0;
- okSP = mySpinBox[SpinBox1]->isValid( msg, !IsPreview() );
+ okSP = mySpinBox[SpinBox1]->isValid( msg, absentParams, !IsPreview() );
break;
case 1:
ok = !myShape->_is_nil() && myFaces[Face1U] > 0 && myFaces[Face1V] > 0;
- okSP = mySpinBox[SpinBox2U]->isValid( msg, !IsPreview() ) && okSP;
- okSP = mySpinBox[SpinBox2V]->isValid( msg, !IsPreview() ) && okSP;
+ okSP = mySpinBox[SpinBox2U]->isValid( msg, absentParams, !IsPreview() ) && okSP;
+ okSP = mySpinBox[SpinBox2V]->isValid( msg, absentParams, !IsPreview() ) && okSP;
break;
default:
break;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid (QString&);
+ virtual bool isValid (QString&, QStringList&);
virtual bool execute (ObjectList&);
private:
// function : isValid
// purpose :
//=================================================================================
-bool BuildGUI_WireDlg::isValid (QString& msg)
+bool BuildGUI_WireDlg::isValid (QString& msg, QStringList& absentParams)
{
- bool ok = GroupArgs->SpinBox_DX->isValid(msg, !IsPreview());
+ bool ok = GroupArgs->SpinBox_DX->isValid(msg, absentParams, !IsPreview());
return myOkEdgesAndWires && ok;
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
private:
// function : isValid
// purpose :
//=================================================================================
-bool EntityGUI_SketcherDlg::isValid( QString& msg )
+bool EntityGUI_SketcherDlg::isValid( QString& msg, QStringList& absentParams )
{
bool ok = true;
bool toCorrect = !IsPreview() || myIsApply;
if( Group1Spin->isVisible() ) {
- ok = Group1Spin->SpinBox_DX->isValid( msg, toCorrect ) && ok;
+ ok = Group1Spin->SpinBox_DX->isValid( msg, absentParams, toCorrect ) && ok;
}
else if( Group2Spin->isVisible() ) {
- ok = Group2Spin->SpinBox_DX->isValid( msg, toCorrect ) && ok;
- ok = Group2Spin->SpinBox_DY->isValid( msg, toCorrect ) && ok;
+ ok = Group2Spin->SpinBox_DX->isValid( msg, absentParams, toCorrect ) && ok;
+ ok = Group2Spin->SpinBox_DY->isValid( msg, absentParams, toCorrect ) && ok;
}
else if( Group3Spin->isVisible() ) {
- ok = Group3Spin->SpinBox_DX->isValid( msg, toCorrect ) && ok;
- ok = Group3Spin->SpinBox_DY->isValid( msg, toCorrect ) && ok;
- ok = Group3Spin->SpinBox_DZ->isValid( msg, toCorrect ) && ok;
+ ok = Group3Spin->SpinBox_DX->isValid( msg, absentParams, toCorrect ) && ok;
+ ok = Group3Spin->SpinBox_DY->isValid( msg, absentParams, toCorrect ) && ok;
+ ok = Group3Spin->SpinBox_DZ->isValid( msg, absentParams, toCorrect ) && ok;
}
else if( Group4Spin->isVisible() ) {
- ok = Group4Spin->SpinBox_DX->isValid( msg, toCorrect ) && ok;
- ok = Group4Spin->SpinBox_DY->isValid( msg, toCorrect ) && ok;
- ok = Group4Spin->SpinBox_DZ->isValid( msg, toCorrect ) && ok;
- ok = Group4Spin->SpinBox_DS->isValid( msg, toCorrect ) && ok;
+ ok = Group4Spin->SpinBox_DX->isValid( msg, absentParams, toCorrect ) && ok;
+ ok = Group4Spin->SpinBox_DY->isValid( msg, absentParams, toCorrect ) && ok;
+ ok = Group4Spin->SpinBox_DZ->isValid( msg, absentParams, toCorrect ) && ok;
+ ok = Group4Spin->SpinBox_DS->isValid( msg, absentParams, toCorrect ) && ok;
}
- if( myIsApply && !ok )
+ if( myIsApply && !ok ) {
+ if ( !absentParams.isEmpty() ) {
+ if( SalomeApp_Application* app =
+ dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() ) )
+ {
+ app->defineAbsentParameters( absentParams );
+ return ok;
+ }
+ }
showError( msg );
+ }
return ok;
}
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
void closeEvent( QCloseEvent* );
GEOMBase_Helper::GEOMBase_Helper( SUIT_Desktop* desktop )
: myDesktop( desktop ), myViewWindow( 0 ), myDisplayer( 0 ), myCommand( 0 ), myNoteBook( 0 ), isPreview( false )
{
- if( SalomeApp_Application* app = (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )
+ if( SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() ) )
if( SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() ) )
myNoteBook = new SalomeApp_Notebook( appStudy );
}
{
isPreview = true;
QString msg;
- if ( !isValid( msg ) )
+ QStringList absentParams;
+ // only one prototype of isValid() methods called below will be actually processed
+ if ( !isValid( msg ) || !isValid( msg, absentParams ) )
{
erasePreview( update );
isPreview = false;
return false;
}
- QString msg;
- if ( !isValid( msg ) ) {
- showError( msg );
+ if( !checkIsValid() )
return false;
- }
erasePreview( false );
SUIT_MessageBox::critical(SUIT_Session::session()->activeApplication()->desktop(), QObject::tr( "GEOM_ERROR" ), str, QObject::tr( "BUT_OK" ) );
}
+//================================================================
+// Function : checkIsValid
+// Purpose : Checks validity of the dialog contents and shows the error message
+// or displays a notebook dialog if some parameters used in the dialog are not defined.
+// In the second case it also redisplays preview if <updatePreview> argument is <true>.
+//================================================================
+bool GEOMBase_Helper::checkIsValid( bool updatePreview )
+{
+ SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+ if ( !app )
+ return false;
+
+ QString msg;
+ QStringList absentParams;
+ // only one prototype of isValid() methods called below will be actually processed
+ if ( !isValid( msg ) || !isValid( msg, absentParams ) ) {
+ if ( !absentParams.isEmpty() ) {
+ if ( app->defineAbsentParameters( absentParams ) && updatePreview )
+ displayPreview();
+ return false;
+ }
+ showError( msg );
+ return false;
+ }
+ return true;
+}
+
//////////////////////////////////////////////////////////////////
// Virtual methods to be redefined in dialogs
//////////////////////////////////////////////////////////////////
//================================================================
// Function : isValid
// Purpose : Called by onAccept(). Redefine this method to check validity of user input in dialog boxes.
+// (This method should be redefined if there are no parametrized spin-boxes in the dialog box).
//================================================================
bool GEOMBase_Helper::isValid( QString& )
{
return true;
}
+//================================================================
+// Function : isValid
+// Purpose : Called by onAccept(). Redefine this method to check validity of user input in dialog boxes.
+// (This method should be redefined if there are some parametrized spin-boxes in the dialog box).
+//================================================================
+bool GEOMBase_Helper::isValid( QString&, QStringList& )
+{
+ return true;
+}
+
//================================================================
// Function : execute
// Purpose : This method is called by onAccept().
void showError( const QString& msg );
// Shows a error message followed by <msg>
+ bool checkIsValid( bool updatePreview = true );
+ // Checks validity of the dialog contents and shows the error message
+ // or displays a notebook dialog if some parameters used in the dialog are not defined
+
GEOM::GEOM_IOperations_ptr getOperation();
// If <myOperation> is nil --> calls createOperation() and put the result
// into <myOperation> and returns it;
virtual bool isValid( QString& msg );
// Called by onAccept(). Redefine this method to check validity of user input in dialog boxes.
+ // (This method should be redefined if there are no parametrized spin-boxes in the dialog box).
+
+ virtual bool isValid( QString& msg, QStringList& absentParams );
+ // Called by onAccept(). Redefine this method to check validity of user input in dialog boxes.
+ // (This method should be redefined if there are some parametrized spin-boxes in the dialog box).
virtual bool execute( ObjectList& objects );
// This method is called by onAccept().
// function : isValid
// purpose :
//=================================================================================
-bool GenerationGUI_FillingDlg::isValid( QString& msg )
+bool GenerationGUI_FillingDlg::isValid( QString& msg, QStringList& absentParams )
{
bool ok = true;
- ok = GroupPoints->SpinBox1->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox2->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox3->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox4->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox5->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox1->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox2->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox3->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox4->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox5->isValid( msg, absentParams, !IsPreview() ) && ok;
return myOkCompound > 0 && ok;
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
private:
// function : isValid
// purpose :
//=================================================================================
-bool GenerationGUI_PrismDlg::isValid (QString& msg)
+bool GenerationGUI_PrismDlg::isValid (QString& msg, QStringList& absentParams)
{
bool ok = true;
if( getConstructorId() == 0 )
- ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
else if( getConstructorId() == 2 )
{
- ok = GroupPoints3->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints3->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints3->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints3->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints3->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints3->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
}
if (getConstructorId() == 0)
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool GenerationGUI_RevolDlg::isValid (QString& msg)
+bool GenerationGUI_RevolDlg::isValid (QString& msg, QStringList& absentParams)
{
- bool ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() );
+ bool ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
return myOkBase && myOkAxis && ok;
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool OperationGUI_ArchimedeDlg::isValid( QString& msg )
+bool OperationGUI_ArchimedeDlg::isValid( QString& msg, QStringList& absentParams )
{
bool ok = true;
- ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
return !myShape->_is_nil() && ok;
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
private:
// function : isValid()
// purpose : Verify validity of input data
//=================================================================================
-bool OperationGUI_ChamferDlg::isValid (QString& msg)
+bool OperationGUI_ChamferDlg::isValid (QString& msg, QStringList& absentParams)
{
bool ok = true;
switch (getConstructorId())
{
case 0:
- ok = mySpinBox[ SpinBox1 ]->isValid( msg, !IsPreview() );
+ ok = mySpinBox[ SpinBox1 ]->isValid( msg, absentParams, !IsPreview() );
return !myShape->_is_nil() && ok;
case 1:
if (myRadioButton[ RadioButton21 ]->isChecked())
{
- ok = mySpinBox[ SpinBox21 ]->isValid( msg, !IsPreview() ) && ok;
- ok = mySpinBox[ SpinBox22 ]->isValid( msg, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox21 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox22 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
}
else
{
- ok = mySpinBox[ SpinBox23 ]->isValid( msg, !IsPreview() ) && ok;
- ok = mySpinBox[ SpinBox24 ]->isValid( msg, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox23 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox24 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
}
return !myShape->_is_nil() && myFace[ Face1 ] > 0 && myFace[ Face2 ] > 0 && ok;
case 2:
if (myRadioButton[ RadioButton31 ]->isChecked())
{
- ok = mySpinBox[ SpinBox31 ]->isValid( msg, !IsPreview() ) && ok;
- ok = mySpinBox[ SpinBox32 ]->isValid( msg, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox31 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox32 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
}
else
{
- ok = mySpinBox[ SpinBox33 ]->isValid( msg, !IsPreview() ) && ok;
- ok = mySpinBox[ SpinBox34 ]->isValid( msg, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox33 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox34 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
}
return !myShape->_is_nil() && myFaces.Extent() > 0 && ok;
case 3:
if (myRadioButton[ RadioButton41 ]->isChecked())
{
- ok = mySpinBox[ SpinBox41 ]->isValid( msg, !IsPreview() ) && ok;
- ok = mySpinBox[ SpinBox42 ]->isValid( msg, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox41 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox42 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
}
else
{
- ok = mySpinBox[ SpinBox43 ]->isValid( msg, !IsPreview() ) && ok;
- ok = mySpinBox[ SpinBox44 ]->isValid( msg, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox43 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = mySpinBox[ SpinBox44 ]->isValid( msg, absentParams, !IsPreview() ) && ok;
}
return !myShape->_is_nil() && myEdges.Extent() > 0 && ok;
default: return false;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
private slots:
// function : isValid()
// purpose : Verify validity of input data
//=================================================================================
-bool OperationGUI_FilletDlg::isValid (QString& msg)
+bool OperationGUI_FilletDlg::isValid (QString& msg, QStringList& absentParams)
{
bool ok = true;
switch (getConstructorId())
{
case 0:
- ok = Group1->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
+ ok = Group1->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
return !myShape->_is_nil() && ok;
case 1:
if (Group2->RadioButton1->isChecked())
- ok = Group2->SpinBox_DX->isValid( msg, !IsPreview() );
+ ok = Group2->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
else
{
- ok = Group2->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = Group2->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = Group2->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = Group2->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
}
return !myShape->_is_nil() && myEdges.Extent() > 0 && ok;
case 2:
if (Group3->RadioButton1->isChecked())
- ok = Group3->SpinBox_DX->isValid( msg, !IsPreview() );
+ ok = Group3->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
else
{
- ok = Group3->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = Group3->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = Group3->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = Group3->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
}
return !myShape->_is_nil() && myFaces.Extent() > 0 && ok;
default: return false;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
private slots:
// function : isValid
// purpose :
//=================================================================================
-bool PrimitiveGUI_BoxDlg::isValid (QString& msg)
+bool PrimitiveGUI_BoxDlg::isValid (QString& msg, QStringList& absentParams)
{
bool ok = true;
if( getConstructorId() == 1 )
{
- ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
ok = fabs( GroupDimensions->SpinBox_DX->value() ) > Precision::Confusion() && ok;
ok = fabs( GroupDimensions->SpinBox_DY->value() ) > Precision::Confusion() && ok;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool PrimitiveGUI_ConeDlg::isValid (QString& msg)
+bool PrimitiveGUI_ConeDlg::isValid (QString& msg, QStringList& absentParams)
{
if (!getRadius1() && !getRadius2())
return false;
bool ok = true;
if( getConstructorId() == 0 )
{
- ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
}
else if( getConstructorId() == 1 )
{
- ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DZ->isValid( msg, absentParams, !IsPreview() ) && ok;
}
ok = fabs( getHeight() ) > Precision::Confusion() && ok;
return getConstructorId() == 0 ? !(myPoint->_is_nil() || myDir->_is_nil()) && ok : ok;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool PrimitiveGUI_CylinderDlg::isValid (QString& msg)
+bool PrimitiveGUI_CylinderDlg::isValid (QString& msg, QStringList& absentParams)
{
bool ok = true;
if( getConstructorId() == 0 )
{
- ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
}
else if( getConstructorId() == 1 )
{
- ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
}
ok = fabs( getHeight() ) > Precision::Confusion() && ok;
return getConstructorId() == 0 ? !(myPoint->_is_nil() || myDir->_is_nil()) && ok : ok;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool PrimitiveGUI_DiskDlg::isValid (QString& msg)
+bool PrimitiveGUI_DiskDlg::isValid (QString& msg, QStringList& absentParams)
{
bool ok = true;
if( getConstructorId() == 0 )
- ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
else if( getConstructorId() == 1 )
- ok = GroupPntVecR->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPntVecR->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
const int id = getConstructorId();
if (id == 0)
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool PrimitiveGUI_FaceDlg::isValid( QString& msg )
+bool PrimitiveGUI_FaceDlg::isValid( QString& msg, QStringList& absentParams )
{
bool ok = true;
if( getConstructorId() == 0 )
{
- ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
}
else if( getConstructorId() == 1 )
{
- ok = GroupPlane->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPlane->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPlane->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPlane->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
}
const int id = getConstructorId();
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool PrimitiveGUI_SphereDlg::isValid( QString& msg )
+bool PrimitiveGUI_SphereDlg::isValid( QString& msg, QStringList& absentParams )
{
bool ok = true;
if( getConstructorId() == 0 )
- ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
else if( getConstructorId() == 1 )
- ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
return getConstructorId() == 0 ? !myPoint->_is_nil() && ok : ok;
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool PrimitiveGUI_TorusDlg::isValid (QString& msg)
+bool PrimitiveGUI_TorusDlg::isValid (QString& msg, QStringList& absentParams)
{
bool ok = true;
if( getConstructorId() == 0 )
{
- ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
}
else if( getConstructorId() == 1 )
{
- ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
}
return getConstructorId() == 0 ? !(myPoint->_is_nil() || myDir->_is_nil()) && ok : ok;
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool RepairGUI_DivideEdgeDlg::isValid( QString& msg )
+bool RepairGUI_DivideEdgeDlg::isValid( QString& msg, QStringList& absentParams )
{
- bool ok = myValEdt->isValid( msg, !IsPreview() );
+ bool ok = myValEdt->isValid( msg, absentParams, !IsPreview() );
return !myObject->_is_nil() && ok;
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
private:
// function : isValid
// purpose :
//=================================================================================
-bool RepairGUI_GlueDlg::isValid( QString& msg )
+bool RepairGUI_GlueDlg::isValid( QString& msg, QStringList& absentParams )
{
bool ok = true;
double v = 0;
switch ( getConstructorId() )
{
case 0:
+ ok = myTolEdt->isValid( msg, absentParams, !IsPreview() );
v = myTolEdt->value();
- ok = myTolEdt->isValid( msg, !IsPreview() );
break;
case 1:
+ ok = myTolEdt2->isValid( msg, absentParams, !IsPreview() );
v = myTolEdt2->value();
- ok = myTolEdt2->isValid( msg, !IsPreview() );
break;
}
return !myObject->_is_nil() && ( IsPreview() || v > 0. ) && ok;
return false;
}
- QString msg;
- if ( !isValid( msg ) ) {
- showError( msg );
+ if( !checkIsValid() )
return false;
- }
erasePreview( false );
void RepairGUI_GlueDlg::onDetect()
{
clearTemporary();
- QString msg;
- if ( !isValid( msg ) ) {
- showError( msg );
+ if( !checkIsValid( false ) )
return;
- }
buttonOk()->setEnabled( false );
buttonApply()->setEnabled( false );
for ( int i = 0, n = aList->length(); i < n; i++ )
myTmpObjs.push_back(GEOM::GEOM_Object::_duplicate(aList[i]));
+ QString msg;
if ( myTmpObjs.size() > 0 ) {
msg = tr( "FACES_FOR_GLUING_ARE_DETECTED" ).arg( myTmpObjs.size() );
mySubShapesChk->setChecked( true );
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
// function : isValid
// purpose :
//=================================================================================
-bool RepairGUI_SewingDlg::isValid( QString& msg )
+bool RepairGUI_SewingDlg::isValid( QString& msg, QStringList& absentParams )
{
myClosed = -1;
- bool ok = myTolEdt->isValid( msg, !IsPreview() );
+ bool ok = myTolEdt->isValid( msg, absentParams, !IsPreview() );
return !myObject->_is_nil() && ( IsPreview() || myTolEdt->value() > 0. ) && ok;
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
private:
// function : isValid
// purpose :
//=================================================================================
-bool RepairGUI_ShapeProcessDlg::isValid( QString& msg )
+bool RepairGUI_ShapeProcessDlg::isValid( QString& msg, QStringList& absentParams )
{
bool ok = true;
QMapIterator<QString,QStringList> aMapIter( myValMap );
const QString& aParam = aListIter.next();
QWidget* aControl = getControl( aParam );
if ( qobject_cast<SalomeApp_DoubleSpinBox*>( aControl ) )
- ok = qobject_cast<SalomeApp_DoubleSpinBox*>( aControl )->isValid( msg, !IsPreview() ) && ok;
+ ok = qobject_cast<SalomeApp_DoubleSpinBox*>( aControl )->isValid( msg, absentParams, !IsPreview() ) && ok;
else if ( qobject_cast<SalomeApp_IntSpinBox*>( aControl ) )
- ok = qobject_cast<SalomeApp_IntSpinBox*>( aControl )->isValid( msg, !IsPreview() ) && ok;
+ ok = qobject_cast<SalomeApp_IntSpinBox*>( aControl )->isValid( msg, absentParams, !IsPreview() ) && ok;
}
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
private:
// function : isValid
// purpose :
//=================================================================================
-bool TransformationGUI_MultiRotationDlg::isValid (QString& msg)
+bool TransformationGUI_MultiRotationDlg::isValid (QString& msg, QStringList& absentParams)
{
bool ok = true;
switch(getConstructorId()){
case 0:
- ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
break;
case 1:
- ok = GroupDimensions->SpinBox_DX1->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DY1->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DX2->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DY2->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX1->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DY1->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX2->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DY2->isValid( msg, absentParams, !IsPreview() ) && ok;
break;
}
return !(myBase->_is_nil() || myVector->_is_nil()) && ok;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool TransformationGUI_MultiTranslationDlg::isValid (QString& msg)
+bool TransformationGUI_MultiTranslationDlg::isValid (QString& msg, QStringList& absentParams)
{
int aConstructorId = getConstructorId();
if (aConstructorId == 0) {
bool ok = true;
- ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox_DY->isValid( msg, absentParams, !IsPreview() ) && ok;
return !(myBase->_is_nil() || myVectorU->_is_nil()) && ok;
}
else if (aConstructorId == 1) {
bool ok = true;
- ok = GroupDimensions->SpinBox_DX1->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DY1->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DX2->isValid( msg, !IsPreview() ) && ok;
- ok = GroupDimensions->SpinBox_DY2->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX1->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DY1->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DX2->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupDimensions->SpinBox_DY2->isValid( msg, absentParams, !IsPreview() ) && ok;
return !(myBase->_is_nil() || myVectorU->_is_nil() || myVectorV->_is_nil()) && ok;
}
return 0;
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
// function : isValid
// purpose :
//=================================================================================
-bool TransformationGUI_OffsetDlg::isValid( QString& msg )
+bool TransformationGUI_OffsetDlg::isValid( QString& msg, QStringList& absentParams )
{
//return !(myObjects.length() == 0);
if ( myObjects.length() == 0 ) return false;
return false;
}
}
- return GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() );
+ return GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
}
//=================================================================================
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
// function : isValid
// purpose :
//=================================================================================
-bool TransformationGUI_RotationDlg::isValid (QString& msg)
+bool TransformationGUI_RotationDlg::isValid (QString& msg, QStringList& absentParams)
{
switch (getConstructorId()) {
case 0: {
- bool ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() );
+ bool ok = GroupPoints->SpinBox_DX->isValid( msg, absentParams, !IsPreview() );
return myObjects.length() > 0 && !(myAxis->_is_nil()) && ok;
break;
}
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
// function : isValid
// purpose :
//=================================================================================
-bool TransformationGUI_ScaleDlg::isValid (QString& msg)
+bool TransformationGUI_ScaleDlg::isValid (QString& msg, QStringList& absentParams)
{
// && !myPoint->_is_nil()
if (getConstructorId() == 0) {
- bool ok = SpinBox_FX->isValid( msg, !IsPreview() );
+ bool ok = SpinBox_FX->isValid( msg, absentParams, !IsPreview() );
return myObjects.length() > 0 && fabs(SpinBox_FX->value()) > 0.00001 && ok;
}
bool ok = true;
- ok = SpinBox_FX->isValid( msg, !IsPreview() ) && ok;
- ok = SpinBox_FY->isValid( msg, !IsPreview() ) && ok;
- ok = SpinBox_FZ->isValid( msg, !IsPreview() ) && ok;
+ ok = SpinBox_FX->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = SpinBox_FY->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = SpinBox_FZ->isValid( msg, absentParams, !IsPreview() ) && ok;
return myObjects.length() > 0 &&
fabs(SpinBox_FX->value()) > 0.00001 &&
fabs(SpinBox_FY->value()) > 0.00001 &&
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
// function : isValid
// purpose :
//=================================================================================
-bool TransformationGUI_TranslationDlg::isValid (QString& msg)
+bool TransformationGUI_TranslationDlg::isValid (QString& msg, QStringList& absentParams)
{
int aConstructorId = getConstructorId();
case 0:
{
bool ok = true;
- ok = GroupPoints->SpinBox1->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox2->isValid( msg, !IsPreview() ) && ok;
- ok = GroupPoints->SpinBox3->isValid( msg, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox1->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox2->isValid( msg, absentParams, !IsPreview() ) && ok;
+ ok = GroupPoints->SpinBox3->isValid( msg, absentParams, !IsPreview() ) && ok;
return myObjects.length() > 0 && ok;
}
case 1:
return myObjects.length() > 0 && !(myPoint1->_is_nil() || myPoint2->_is_nil());
case 2:
{
- bool ok = GroupPoints->SpinBox3->isValid( msg, !IsPreview() );
+ bool ok = GroupPoints->SpinBox3->isValid( msg, absentParams, !IsPreview() );
return myObjects.length() > 0 && !(myVector->_is_nil()) && ok;
}
default:
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
+ virtual bool isValid( QString&, QStringList& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );