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);
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);
bool toSelectMesh = MeshCheck->isChecked();
ElementsLineEdit->setReadOnly(toSelectMesh);
+ ElementsLineEdit->setValidator(toSelectMesh ? 0 : myIdValidator);
ElementsLab->setText(toSelectMesh ? tr("SMESH_NAME") : tr("SMESH_ID_ELEMENTS"));
ElementsLineEdit->clear();
class SMESHGUI;
class SMESH_Actor;
+class SMESHGUI_IdValidator;
class SMESHGUI_SpinBox;
class SVTK_Selector;
class LightApp_SelectionMgr;
void SetEditCurrentArgument( QToolButton* );
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
+ SMESHGUI_IdValidator* myIdValidator;
LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
SVTK_Selector* mySelector;
GroupArgumentsLayout->setSpacing(SPACING);
GroupArgumentsLayout->setMargin(MARGIN);
+ myIdValidator = new SMESHGUI_IdValidator(this);
+
// Controls for elements selection
TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), 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);
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
LineEditElements->setReadOnly(true);
+ LineEditElements->setValidator(0);
} else {
int aConstructorId = GetConstructorId();
if (aConstructorId == 0)
}
LineEditElements->setReadOnly(false);
+ LineEditElements->setValidator(myIdValidator);
onTextChange(LineEditElements->text());
}
class SMESHGUI;
class SMESH_Actor;
+class SMESHGUI_IdValidator;
class SMESHGUI_SpinBox;
class SVTK_Selector;
class LightApp_SelectionMgr;
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 */
GroupArgumentsLayout->setSpacing(SPACING);
GroupArgumentsLayout->setMargin(MARGIN);
+ myIdValidator = new SMESHGUI_IdValidator(this);
+
// Controls for elements selection
TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), 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);
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
LineEditElements->setReadOnly(true);
+ LineEditElements->setValidator(0);
} else {
int aConstructorId = GetConstructorId();
if (aConstructorId == 0)
}
LineEditElements->setReadOnly(false);
+ LineEditElements->setValidator(myIdValidator);
onTextChange(LineEditElements->text());
}
class QRadioButton;
class QCheckBox;
class QSpinBox;
+class SMESHGUI_IdValidator;
class SMESHGUI_SpinBox;
class SMESHGUI;
class SMESH_Actor;
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;
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);
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());
}
class QCheckBox;
class SMESHGUI;
class SMESH_Actor;
+class SMESHGUI_IdValidator;
class SMESHGUI_SpinBox;
class SVTK_Selector;
class LightApp_SelectionMgr;
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;
GroupArgumentsLayout->setSpacing(SPACING);
GroupArgumentsLayout->setMargin(MARGIN);
+ myIdValidator = new SMESHGUI_IdValidator(this);
+
// Controls for elements selection
TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), 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);
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);
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());
}
class QComboBox;
class QCheckBox;
class QSpinBox;
+class SMESHGUI_IdValidator;
class SMESHGUI_SpinBox;
class SMESHGUI;
class SMESH_Actor;
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 */
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);
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());
}
class QPushButton;
class QRadioButton;
class QCheckBox;
+class SMESHGUI_IdValidator;
class SMESHGUI_SpinBox;
class SMESHGUI;
class SMESH_Actor;
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;
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);
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());
}
class QRadioButton;
class QCheckBox;
class SMESHGUI;
+class SMESHGUI_IdValidator;
class SMESHGUI_SpinBox;
class SMESH_Actor;
class SVTK_Selector;
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 */