X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Preferences_SelectionDlg.cxx;h=7606ccf2b7768cf8dc8828291c39c0ee812f81a6;hb=4d3a3d10b2987590af4eff500da240132b42c760;hp=1f041af2ec2236783f749fd3fff8a0e52303e45c;hpb=c3bf92bd87b770fd81631a3853f7f5bb1ac6a4e8;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Preferences_SelectionDlg.cxx b/src/SMESHGUI/SMESHGUI_Preferences_SelectionDlg.cxx index 1f041af2e..7606ccf2b 100644 --- a/src/SMESHGUI/SMESHGUI_Preferences_SelectionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_Preferences_SelectionDlg.cxx @@ -26,10 +26,13 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESHGUI_Preferences_SelectionDlg.h" #include "SMESHGUI.h" +#include "SMESHGUI_Utils.h" + +#include "SUIT_Desktop.h" + #include #include #include @@ -40,6 +43,8 @@ using namespace std; #include #include +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" ) ); @@ -202,7 +208,7 @@ SMESHGUI_Preferences_SelectionDlg::SMESHGUI_Preferences_SelectionDlg( QWidget* p /* Move widget on the botton right corner of main widget */ int x, y ; - SMESHGUI::GetSMESHGUI()->DefineDlgPosition(this, x, y); + mySMESHGUI->DefineDlgPosition(this, x, y); this->move(x, y); } @@ -303,5 +309,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; }