Salome HOME
First compilable version
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RevolutionDlg.cxx
index 484989dfd1e4e8c321906ebe5d04139281b39340..811ed074880b4f22afd5ae73de99da0baa73cd40 100644 (file)
@@ -89,6 +89,7 @@
 //=================================================================================
 SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
   : QDialog( SMESH::GetDesktop( theModule ) ),
+    SMESHGUI_Helper( theModule ),
     mySMESHGUI( theModule ),
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
     myVectorDefinition(NONE_SELECT),
@@ -1181,24 +1182,8 @@ void SMESHGUI_RevolutionDlg::setFilters()
 //=================================================================================
 bool SMESHGUI_RevolutionDlg::isValid()
 {
-  QString msg;
-  bool ok = true;
-  ok = SpinBox_X->isValid( msg, true ) && ok;
-  ok = SpinBox_Y->isValid( msg, true ) && ok;
-  ok = SpinBox_Z->isValid( msg, true ) && ok;
-  ok = SpinBox_DX->isValid( msg, true ) && ok;
-  ok = SpinBox_DY->isValid( msg, true ) && ok;
-  ok = SpinBox_DZ->isValid( msg, true ) && ok;
-  ok = SpinBox_Angle->isValid( msg, true ) && ok;
-  ok = SpinBox_NbSteps->isValid( msg, true ) && ok;
-  ok = SpinBox_Tolerance->isValid( msg, true ) && ok;
-
-  if( !ok ) {
-    QString str( tr( "SMESH_INCORRECT_INPUT" ) );
-    if ( !msg.isEmpty() )
-      str += "\n" + msg;
-    SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
-    return false;
-  }
-  return true;
+  return checkParameters( true, 9,
+                          SpinBox_X, SpinBox_Y, SpinBox_Z,
+                          SpinBox_DX, SpinBox_DY, SpinBox_DZ,
+                          SpinBox_Angle, SpinBox_NbSteps, SpinBox_Tolerance );
 }