Salome HOME
Fix bug 17577: Help in 4x: Page is not displayed.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Preferences_SelectionDlg.cxx
index 1f041af2ec2236783f749fd3fff8a0e52303e45c..41d96be2d827e7a027ff222797980e4c91e30100 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.salome-platform.org or email : webmaster.salome@opencascade.org 
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
 //  Module : SMESH
 //  $Header$
 
-using namespace std;
 #include "SMESHGUI_Preferences_SelectionDlg.h"
 #include "SMESHGUI.h"
 
+#include "SMESHGUI_Utils.h"
+
+#include "SUIT_Desktop.h"
+
 #include <qgroupbox.h>
 #include <qlayout.h>
 #include <qlabel.h>
@@ -40,6 +43,8 @@ using namespace std;
 #include <qpalette.h>
 #include <qcolordialog.h>
 
+using namespace std;
+
 //=================================================================================
 // class    : SMESHGUI_LineEdit
 // purpose  : 
@@ -104,8 +109,9 @@ void SMESHGUI_DoubleValidator::fixup(QString& theText) const
 // class    : SMESHGUI_Preferences_SelectionDlg()
 // purpose  : 
 //=================================================================================
-SMESHGUI_Preferences_SelectionDlg::SMESHGUI_Preferences_SelectionDlg( QWidget* parent, const char* name )
-  : QDialog( parent, name, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+SMESHGUI_Preferences_SelectionDlg::SMESHGUI_Preferences_SelectionDlg( SMESHGUI* theModule, const char* name )
+  : QDialog( SMESH::GetDesktop( theModule ), name, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
+    mySMESHGUI( theModule )
 {
   if ( !name ) setName( "SMESHGUI_Preferences_SelectionDlg" );
   setCaption( tr( "SMESH_PREF_SELECTION"  ) );
@@ -199,11 +205,6 @@ SMESHGUI_Preferences_SelectionDlg::SMESHGUI_Preferences_SelectionDlg( QWidget* p
 
   connect(aOKBtn, SIGNAL(clicked()), this, SLOT(accept()));
   connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(reject()));
-
-  /* Move widget on the botton right corner of main widget */
-  int x, y ;
-  SMESHGUI::GetSMESHGUI()->DefineDlgPosition(this, x, y);
-  this->move(x, y);
 }
 
 //=================================================================================
@@ -303,5 +304,6 @@ void SMESHGUI_Preferences_SelectionDlg::SetPrecision(int type, double value)
 double SMESHGUI_Preferences_SelectionDlg::GetPrecision(int type)
 {
   if (type > 0 && type <= 2)
-  return myPrecision[type-1]->text().toDouble();
+    return myPrecision[type-1]->text().toDouble();
+  return 0;
 }