Salome HOME
Dialogs were divided to "operation and dialog"
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_AddSubMeshDlg.cxx
index 0735b21c24900ea4852ad16093e5c8f69cb849d4..584533e6c5acb6fb7267187f457e639980bfbad4 100644 (file)
@@ -59,6 +59,7 @@ SMESHGUI_AddSubMeshDlg::SMESHGUI_AddSubMeshDlg( SMESHGUI* theModule )
     new QLabel(tr("SMESH_NAME"), GroupC1, "TextLabel_NameMesh");
     GroupC1->addSpace(1);
     myMeshName = new QLineEdit(GroupC1, "LineEdit_NameMesh");
+    connect( myMeshName, SIGNAL( textChanged( const QString& ) ), this, SIGNAL( nameChanged( const QString& ) ) );
 
     createObject( tr("SMESH_OBJECT_MESH"), GroupC1, MeshObj );
     createObject( tr("SMESH_OBJECT_GEOM"), GroupC1, GeomObj );
@@ -85,29 +86,19 @@ SMESHGUI_AddSubMeshDlg::~SMESHGUI_AddSubMeshDlg()
 }
 
 //=================================================================================
-// function : updateControlState()
-// purpose  :
-//=================================================================================
-void SMESHGUI_AddSubMeshDlg::updateControlState( const bool isEnabled )
-{
-  setButtonEnabled( isEnabled, OK | Apply );
-}
-
-//=================================================================================
-// function : init()
+// function : subMeshName
 // purpose  :
 //=================================================================================
-void SMESHGUI_AddSubMeshDlg::init()
+QString SMESHGUI_AddSubMeshDlg::subMeshName() const
 {
-  clearSelection();
-  myMeshName->setText( tr( "SMESH_SUBMESH" ) );
+  return myMeshName->text().stripWhiteSpace();
 }
 
 //=================================================================================
-// function : subMeshName
+// function : setSubMeshName
 // purpose  :
 //=================================================================================
-QString SMESHGUI_AddSubMeshDlg::subMeshName() const
+void SMESHGUI_AddSubMeshDlg::setSubMeshName( const QString& name )
 {
-  return myMeshName->text().stripWhiteSpace();
+  myMeshName->setText( name );
 }