X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPrimitiveGUI%2FPrimitiveGUI_SphereDlg.cxx;h=b6f246e62d52dc2dc1a4332b958840636e277e64;hb=5887eb5b1a2e00dba74dbfb1573e2445dccb098e;hp=debdb9a8551d7afd8d4baaf3feafc2ae457f32a3;hpb=e180c20f73ffa96c2d039106f2a2a868c8bc0df1;p=modules%2Fgeom.git diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index debdb9a85..b6f246e62 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -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 // // // @@ -27,18 +27,20 @@ // $Header$ #include "PrimitiveGUI_SphereDlg.h" +#include "DlgRef_1Sel1Spin.h" +#include "DlgRef_1Spin.h" +#include "DlgRef_SpinBox.h" -#include "SUIT_Desktop.h" +#include "GeometryGUI.h" +#include "GEOMBase.h" + +#include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" -#include - #include "GEOMImpl_Types.hxx" -#include "utilities.h" - using namespace std; //================================================================================= @@ -49,34 +51,34 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= PrimitiveGUI_SphereDlg::PrimitiveGUI_SphereDlg(GeometryGUI* theGeometryGUI, QWidget* parent, - const char* name, bool modal, WFlags fl) - :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) + const char* name, bool modal, Qt::WindowFlags fl) + :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, Qt::WindowTitleHint | Qt::WindowSystemMenuHint) { QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SPHERE_P"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SPHERE_DXYZ"))); QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); - setCaption(tr("GEOM_SPHERE_TITLE")); + setWindowTitle(tr("GEOM_SPHERE_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_SPHERE")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image1); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setIcon(image1); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); GroupPoints = new DlgRef_1Sel1Spin(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_SPHERE_CR")); GroupPoints->TextLabel1->setText(tr("GEOM_CENTER")); GroupPoints->TextLabel2->setText(tr("GEOM_RADIUS")); - GroupPoints->PushButton1->setPixmap(image2); + GroupPoints->PushButton1->setIcon(image2); GroupDimensions = new DlgRef_1Spin(this, "GroupDimensions"); GroupDimensions->GroupBox1->setTitle(tr("GEOM_SPHERE_RO")); GroupDimensions->TextLabel1->setText(tr("GEOM_RADIUS")); - Layout1->addWidget(GroupPoints, 2, 0); - Layout1->addWidget(GroupDimensions, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ setHelpFileName("sphere.htm"); @@ -112,8 +114,8 @@ void PrimitiveGUI_SphereDlg::Init() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3); GroupPoints->SpinBox_DX->SetValue(100.0); GroupDimensions->SpinBox_DX->SetValue(100.0); @@ -134,7 +136,7 @@ void PrimitiveGUI_SphereDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName(tr("GEOM_SPHERE")); + initName(tr("GEOM_SPHERE").toStdString().c_str()); ConstructorsClicked(0); }