Salome HOME
new method setContentActive( bool ): if parameter is true, all content to enable...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Dialog.cxx
index 0d8d7eb78da9f05780bf3ca9974ecdfc17e7c1c4..649904c6f97889bf3e3f0eed940fd8feffeff39f 100644 (file)
@@ -1,17 +1,36 @@
 
 #include <SMESHGUI_Dialog.h>
 #include <SMESHGUI_Utils.h>
+#include <SMESHGUI_Operation.h>
+#include <SMESH_Type.h>
 #include <SMESHGUI.h>
 
 #include <SUIT_Desktop.h>
 
 SMESHGUI_Dialog::SMESHGUI_Dialog( SMESHGUI* theModule, const bool modal, const bool allowResize,
                                   const int flags )
-: SalomeApp_Dialog( SMESH::GetDesktop( theModule ), "", modal, allowResize, flags )
+: SalomeApp_Dialog( SMESH::GetDesktop( theModule ), "", modal, allowResize, flags ),
+  mySMESHGUI( theModule )
 {
+  int prefix = SMESHGUI_Operation::prefix( "SMESH" );
+  typeName( prefix + MESH ) = tr( "DLG_MESH" );
+  typeName( prefix + HYPOTHESIS ) = tr( "DLG_HYPO" );
+  typeName( prefix + ALGORITHM ) = tr( "DLG_ALGO" );
 }
 
 SMESHGUI_Dialog::~SMESHGUI_Dialog()
 {
 }
 
+void SMESHGUI_Dialog::show()
+{
+  int x, y;
+  mySMESHGUI->DefineDlgPosition(this, x, y);
+  move(x, y);
+  SalomeApp_Dialog::show();
+}
+
+void SMESHGUI_Dialog::setContentActive( const bool active ) const
+{
+  mainFrame()->setEnabled( active );
+}