// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
//=================================================================================
-SMESHGUI_InitMeshDlg::SMESHGUI_InitMeshDlg( SMESHGUI* theModule )
-: SMESHGUI_Dialog( theModule, false, true )
+SMESHGUI_InitMeshDlg::SMESHGUI_InitMeshDlg()
+: SMESHGUI_Dialog( false, true )
{
setCaption(tr("SMESH_INIT_MESH"));
GroupC1->layout()->setSpacing(6);
GroupC1->layout()->setMargin(11);
- myMeshNameLabel = new QLabel(tr("SMESH_NAME"), GroupC1, "TextLabel_NameMesh");
+ 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_GEOM"), GroupC1, GeomObj );
createObject( tr("SMESH_OBJECT_HYPOTHESIS"), GroupC1, Hypo );
setObjectType( Algo, _smesh + ALGORITHM, -1 );
main->addWidget( GroupC1 );
-
- updateControlState();
}
//=================================================================================
// no need to delete child widgets, Qt does it all for us
}
-//=================================================================================
-// function : updateControlState
-// purpose :
-//=================================================================================
-void SMESHGUI_InitMeshDlg::updateControlState()
-{
- bool isEnabled = !meshName().isEmpty() &&
- hasSelection( GeomObj ) && hasSelection( Hypo ) && hasSelection( Algo );
- setButtonEnabled( isEnabled, OK | Apply );
-}
-
//=================================================================================
// function : meshName
// purpose :