Salome HOME
Bug IPAL19515 - Qt4 porting. Smoothing. Name of whole mesh, submesh or group doesn...
authorouv <ouv@opencascade.com>
Thu, 10 Apr 2008 12:18:58 +0000 (12:18 +0000)
committerouv <ouv@opencascade.com>
Thu, 10 Apr 2008 12:18:58 +0000 (12:18 +0000)
14 files changed:
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.h
src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.h
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.h
src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx
src/SMESHGUI/SMESHGUI_SmoothingDlg.h
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.h
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.h

index e4920f9c9285cd3c662d5e51eaca2b7d060ae5d7..b0656be9e24384ffe6f43786ce346e800b93ddb6 100644 (file)
@@ -154,6 +154,8 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
   QGridLayout* GroupArgumentsLayout = new QGridLayout(GroupArguments);
   GroupArgumentsLayout->setSpacing(SPACING); GroupArgumentsLayout->setMargin(MARGIN);
 
+  myIdValidator = new SMESHGUI_IdValidator(this);
+
   // Controls for elements selection
   ElementsLab = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
 
@@ -161,7 +163,7 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
   SelectElementsButton->setIcon(selectImage);
 
   ElementsLineEdit = new QLineEdit(GroupArguments);
-  ElementsLineEdit->setValidator(new SMESHGUI_IdValidator(this));
+  ElementsLineEdit->setValidator(myIdValidator);
 
   // Controls for the whole mesh selection
   MeshCheck = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
@@ -1110,6 +1112,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::onSelectMesh()
   bool toSelectMesh = MeshCheck->isChecked();
 
   ElementsLineEdit->setReadOnly(toSelectMesh);
+  ElementsLineEdit->setValidator(toSelectMesh ? 0 : myIdValidator);
   ElementsLab->setText(toSelectMesh ? tr("SMESH_NAME") : tr("SMESH_ID_ELEMENTS"));
   ElementsLineEdit->clear();
 
index 6f75d526917873f6295206a1e057a7dfe116c78a..82e019157ddf57ba29232ad2f32584985fc883bc 100644 (file)
@@ -48,6 +48,7 @@ class QPushButton;
 
 class SMESHGUI;
 class SMESH_Actor;
+class SMESHGUI_IdValidator;
 class SMESHGUI_SpinBox;
 class SVTK_Selector;
 class LightApp_SelectionMgr;
@@ -78,6 +79,7 @@ private:
   void                      SetEditCurrentArgument( QToolButton* );
 
   SMESHGUI*                 mySMESHGUI;            /* Current SMESHGUI object */
+  SMESHGUI_IdValidator*     myIdValidator;
   LightApp_SelectionMgr*    mySelectionMgr;        /* User shape selection */
   SVTK_Selector*            mySelector;
 
index e1fe9721e5d6b703184a5e5a2369692a8935c714..7f8ac16736db8c7f1ec7862d05e9dc8055659afa 100644 (file)
@@ -148,6 +148,8 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
   GroupArgumentsLayout->setSpacing(SPACING);
   GroupArgumentsLayout->setMargin(MARGIN);
 
+  myIdValidator = new SMESHGUI_IdValidator(this);
+
   // Controls for elements selection
   TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
 
@@ -155,7 +157,7 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
   SelectElementsButton->setIcon(image2);
 
   LineEditElements = new QLineEdit(GroupArguments);
-  LineEditElements->setValidator(new SMESHGUI_IdValidator(this));
+  LineEditElements->setValidator(myIdValidator);
 
   // Control for the whole mesh selection
   CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
@@ -707,6 +709,7 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
       aViewWindow->SetSelectionMode(ActorSelection);
     mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
     LineEditElements->setReadOnly(true);
+    LineEditElements->setValidator(0);
   } else {
     int aConstructorId = GetConstructorId();
     if (aConstructorId == 0)
@@ -721,6 +724,7 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
       }
 
     LineEditElements->setReadOnly(false);
+    LineEditElements->setValidator(myIdValidator);
     onTextChange(LineEditElements->text());
   }
 
index 3b4b28fb6422b1bcdf531da30084e0adab619c7d..f9cffd5d292322a647bf262a806274391721ff17 100644 (file)
@@ -50,6 +50,7 @@ class QPushButton;
 
 class SMESHGUI;
 class SMESH_Actor;
+class SMESHGUI_IdValidator;
 class SMESHGUI_SpinBox;
 class SVTK_Selector;
 class LightApp_SelectionMgr;
@@ -74,6 +75,7 @@ private:
   int                              GetConstructorId();
 
   SMESHGUI*                        mySMESHGUI;            /* Current SMESHGUI object */
+  SMESHGUI_IdValidator*            myIdValidator;
   LightApp_SelectionMgr*           mySelectionMgr;        /* User shape selection */
   QLineEdit*                       myEditCurrentArgument; /* Current  LineEdit */
   int                              myNbOkElements;        /* to check when elements are defined */
index 108a5f9ebc00524a041fd513796194483582c1c6..2b8e1f3642234eaeca5748c5b7b2f6d09324caec 100644 (file)
@@ -123,6 +123,8 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
   GroupArgumentsLayout->setSpacing(SPACING);
   GroupArgumentsLayout->setMargin(MARGIN);
 
+  myIdValidator = new SMESHGUI_IdValidator(this);
+
   // Controls for elements selection
   TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
 
@@ -130,7 +132,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
   SelectElementsButton->setIcon(image2);
 
   LineEditElements  = new QLineEdit(GroupArguments);
-  LineEditElements->setValidator(new SMESHGUI_IdValidator(this));
+  LineEditElements->setValidator(myIdValidator);
 
   // Control for the whole mesh selection
   CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
@@ -852,6 +854,7 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
       aViewWindow->SetSelectionMode(ActorSelection);
     mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
     LineEditElements->setReadOnly(true);
+    LineEditElements->setValidator(0);
   } else {
     int aConstructorId = GetConstructorId();
     if (aConstructorId == 0)
@@ -866,6 +869,7 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
       }
 
     LineEditElements->setReadOnly(false);
+    LineEditElements->setValidator(myIdValidator);
     onTextChange(LineEditElements->text());
   }
 
index 3e2ed3a71fa65aab66703ee856673c8b160d5c77..098cf7a189a3802feda1290cc0e5c71c332a8ff0 100644 (file)
@@ -44,6 +44,7 @@ class QPushButton;
 class QRadioButton;
 class QCheckBox;
 class QSpinBox;
+class SMESHGUI_IdValidator;
 class SMESHGUI_SpinBox;
 class SMESHGUI;
 class SMESH_Actor;
@@ -73,6 +74,7 @@ private:
   bool                    IsAxisOk();
   
   SMESHGUI*               mySMESHGUI;              /* Current SMESHGUI object */
+  SMESHGUI_IdValidator*   myIdValidator;
   LightApp_SelectionMgr*  mySelectionMgr;          /* User shape selection */
   int                     myNbOkElements;          /* to check when elements are defined */
   QString                 myElementsId;
index 914562d316c041309be50d86c82bf864aee3d517..4a6f93a01680c725e9320771a63465aad66919de 100644 (file)
@@ -121,12 +121,14 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule )
   GroupArgumentsLayout->setSpacing(SPACING);
   GroupArgumentsLayout->setMargin(MARGIN);
 
+  myIdValidator = new SMESHGUI_IdValidator(this);
+
   // Controls for elements selection
   TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
   SelectElementsButton  = new QPushButton(GroupArguments);
   SelectElementsButton->setIcon(image1);
   LineEditElements = new QLineEdit(GroupArguments);
-  LineEditElements->setValidator(new SMESHGUI_IdValidator(this));
+  LineEditElements->setValidator(myIdValidator);
 
   // Control for the whole mesh selection
   CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
@@ -796,10 +798,12 @@ void SMESHGUI_RotationDlg::onSelectMesh (bool toSelectMesh)
       aViewWindow->SetSelectionMode(ActorSelection);
     mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
     LineEditElements->setReadOnly(true);
+    LineEditElements->setValidator(0);
   } else {
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
       aViewWindow->SetSelectionMode( CellSelection );
     LineEditElements->setReadOnly(false);
+    LineEditElements->setValidator(myIdValidator);
     onTextChange(LineEditElements->text());
   }
 
index fe311fffb6d837b9e69d5995fa7ba0120fd33fbd..bee73659cd9aeb53b015067face35240117663ce 100644 (file)
@@ -45,6 +45,7 @@ class QRadioButton;
 class QCheckBox;
 class SMESHGUI;
 class SMESH_Actor;
+class SMESHGUI_IdValidator;
 class SMESHGUI_SpinBox;
 class SVTK_Selector;
 class LightApp_SelectionMgr;
@@ -72,6 +73,7 @@ private:
   void                   setNewMeshName();
   
   SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
+  SMESHGUI_IdValidator*  myIdValidator;
   LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
   int                    myNbOkElements;          /* to check when elements are defined */
   QString                myElementsId;
index 4b9134bc35fb603a0ff5ce1dfc2605021a60ec34..b1562d899b4ea6ef7518fb4d7ad38dcf1a29edf5 100644 (file)
@@ -123,6 +123,8 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
   GroupArgumentsLayout->setSpacing(SPACING);
   GroupArgumentsLayout->setMargin(MARGIN);
 
+  myIdValidator = new SMESHGUI_IdValidator(this);
+
   // Controls for elements selection
   TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
 
@@ -130,7 +132,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
   SelectElementsButton->setIcon(image1);
 
   LineEditElements = new QLineEdit(GroupArguments);
-  LineEditElements->setValidator(new SMESHGUI_IdValidator(this));
+  LineEditElements->setValidator(myIdValidator);
 
   // Control for the whole mesh selection
   CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
@@ -142,7 +144,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
   SelectNodesButton->setIcon(image1);
 
   LineEditNodes  = new QLineEdit(GroupArguments);
-  LineEditNodes->setValidator(new SMESHGUI_IdValidator(this));
+  LineEditNodes->setValidator(myIdValidator);
 
   // Controls for method selection
   TextLabelMethod = new QLabel(tr("METHOD"), GroupArguments);
@@ -723,10 +725,12 @@ void SMESHGUI_SmoothingDlg::onSelectMesh (bool toSelectMesh)
     mySelectionMgr->setSelectionModes(ActorSelection);
     mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
     LineEditElements->setReadOnly(true);
+    LineEditElements->setValidator(0);
   } else {
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
       aViewWindow->SetSelectionMode(CellSelection);
     LineEditElements->setReadOnly(false);
+    LineEditElements->setValidator(myIdValidator);
     onTextChange(LineEditElements->text());
   }
 
index c36459a1d373e409e8d6c5dcbd9a50cf9574f8c8..cf9d195ff174681e70afa55b8eb5a7dfd7d3a0c7 100644 (file)
@@ -44,6 +44,7 @@ class QRadioButton;
 class QComboBox;
 class QCheckBox;
 class QSpinBox;
+class SMESHGUI_IdValidator;
 class SMESHGUI_SpinBox;
 class SMESHGUI;
 class SMESH_Actor;
@@ -71,6 +72,7 @@ private:
   void                   keyPressEvent( QKeyEvent* );
 
   SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
+  SMESHGUI_IdValidator*  myIdValidator;
   LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
   QString                myElementsId;
   int                    myNbOkElements;          /* to check when elements are defined */
index 0485ab5165dcdda062e38e425f4e16fe4e0e62de..744c71109bcf71eb19b299c4ef461f7c284df165 100644 (file)
@@ -132,12 +132,14 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
   GroupArgumentsLayout->setSpacing(SPACING);
   GroupArgumentsLayout->setMargin(MARGIN);
 
+  myIdValidator = new SMESHGUI_IdValidator(this);
+
   // Controls for elements selection
   TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
   SelectElementsButton  = new QPushButton(GroupArguments);
   SelectElementsButton->setIcon(image3);
   LineEditElements = new QLineEdit(GroupArguments);
-  LineEditElements->setValidator(new SMESHGUI_IdValidator(this));
+  LineEditElements->setValidator(myIdValidator);
 
   // Control for the whole mesh selection
   CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
@@ -880,10 +882,12 @@ void SMESHGUI_SymmetryDlg::onSelectMesh (bool toSelectMesh)
       aViewWindow->SetSelectionMode(ActorSelection);
     mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
     LineEditElements->setReadOnly(true);
+    LineEditElements->setValidator(0);
   } else {
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
       aViewWindow->SetSelectionMode(CellSelection);
     LineEditElements->setReadOnly(false);
+    LineEditElements->setValidator(myIdValidator);
     onTextChange(LineEditElements->text());
   }
 
index c1602a8f635c033bc87631105089aef1b244b4ef..faa9eebfa6987a5c6fab15eb649602eb47f75776 100644 (file)
@@ -43,6 +43,7 @@ class QLineEdit;
 class QPushButton;
 class QRadioButton;
 class QCheckBox;
+class SMESHGUI_IdValidator;
 class SMESHGUI_SpinBox;
 class SMESHGUI;
 class SMESH_Actor;
@@ -73,6 +74,7 @@ private:
   void                   setNewMeshName();
 
   SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
+  SMESHGUI_IdValidator*  myIdValidator;
   LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
   int                    myNbOkElements;          /* to check when elements are defined */
   QString                myElementsId;
index 6c520a0e4efa9ebddf26fbd4b312a6233fed5b2a..f82fc758451d41e6c5f67aabdc336360a32cb56a 100644 (file)
@@ -127,12 +127,14 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule )
   GroupArgumentsLayout->setSpacing(SPACING);
   GroupArgumentsLayout->setMargin(MARGIN);
 
+  myIdValidator = new SMESHGUI_IdValidator(this);
+
   // Controls for elements selection
   TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
   SelectElementsButton = new QPushButton(GroupArguments);
   SelectElementsButton->setIcon(image2);
   LineEditElements = new QLineEdit(GroupArguments);
-  LineEditElements->setValidator(new SMESHGUI_IdValidator(this));
+  LineEditElements->setValidator(myIdValidator);
 
   // Control for the whole mesh selection
   CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
@@ -851,10 +853,12 @@ void SMESHGUI_TranslationDlg::onSelectMesh (bool toSelectMesh)
       aViewWindow->SetSelectionMode( ActorSelection );
     mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
     LineEditElements->setReadOnly(true);
+    LineEditElements->setValidator(0);
   } else {
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
       aViewWindow->SetSelectionMode( CellSelection );
     LineEditElements->setReadOnly(false);
+    LineEditElements->setValidator(myIdValidator);
     onTextChange(LineEditElements->text());
   }
 
index 2bc68ca7ebb0f422794b1085db8e07c472cd8c48..7fd24a930b1dc2d35e73166cdf370e4d26781d24 100644 (file)
@@ -44,6 +44,7 @@ class QPushButton;
 class QRadioButton;
 class QCheckBox;
 class SMESHGUI;
+class SMESHGUI_IdValidator;
 class SMESHGUI_SpinBox;
 class SMESH_Actor;
 class SVTK_Selector;
@@ -72,6 +73,7 @@ private:
   void                   setNewMeshName();
 
   SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
+  SMESHGUI_IdValidator*  myIdValidator;
   LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
   QString                myElementsId;
   int                    myNbOkElements;          /* to check when elements are defined */