Salome HOME
Fix for
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Preferences_ColorDlg.cxx
index abe998f850bbe163ed578df544f8ebe263ba44e0..5028ed064b8b3f55bcefc7b919bc0920928d615f 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -28,6 +28,7 @@
 
 #include "SMESHGUI_Preferences_ColorDlg.h"
 #include "SMESHGUI.h"
+#include "SMESHGUI_Utils.h"
 
 #include "utilities.h"
 
@@ -44,6 +45,8 @@
 #include <qspinbox.h>
 #include <qcolor.h>
 
+#include "SUIT_Desktop.h"
+
 using namespace std;
 
 //=================================================================================
@@ -53,10 +56,10 @@ using namespace std;
 //            The dialog will by default be modeless, unless you
 //            set'modal' to TRUE to construct a modal dialog.
 //=================================================================================
-SMESHGUI_Preferences_ColorDlg::SMESHGUI_Preferences_ColorDlg (QWidget* parent,
-                                                              const char* name)
-     : QDialog(parent, name, true, WStyle_Customize |
-               WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+SMESHGUI_Preferences_ColorDlg::SMESHGUI_Preferences_ColorDlg( 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_ColorDlg");
@@ -182,7 +185,6 @@ SMESHGUI_Preferences_ColorDlg::~SMESHGUI_Preferences_ColorDlg()
 //=================================================================================
 void SMESHGUI_Preferences_ColorDlg::Init()
 {
-  mySMESHGUI = SMESHGUI::GetSMESHGUI();
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
 
   /* signals and slots connections */
@@ -197,11 +199,6 @@ void SMESHGUI_Preferences_ColorDlg::Init()
   connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
   /* to close dialog if study change */
   connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
-
-  /* Move widget on the botton right corner of main widget */
-  int x, y;
-  mySMESHGUI->DefineDlgPosition(this, x, y);
-  this->move(x, y);
 }
 
 //=================================================================================