X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPrimitiveGUI%2FPrimitiveGUI_TorusDlg.cxx;h=a63694a39fad9f542d15aabb5829d2cceb3b9451;hb=5887eb5b1a2e00dba74dbfb1573e2445dccb098e;hp=7ab9ca4652d7b181ff52a11e30f394e30d01fb2a;hpb=162d5c03bd54dc72d9e98318a867372f088e1bcb;p=modules%2Fgeom.git diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index 7ab9ca465..a63694a39 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -27,18 +27,20 @@ // $Header$ #include "PrimitiveGUI_TorusDlg.h" +#include "DlgRef_2Sel2Spin.h" +#include "DlgRef_2Spin.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,21 +51,21 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg(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_TORUS_PV"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_TORUS_DXYZ"))); QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); - setCaption(tr("GEOM_TORUS_TITLE")); + setWindowTitle(tr("GEOM_TORUS_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_TORUS")); - 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_2Sel2Spin(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); @@ -71,16 +73,16 @@ PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg(GeometryGUI* theGeometryGUI, QWidge GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR")); GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS_I").arg("1")); GroupPoints->TextLabel4->setText(tr("GEOM_RADIUS_I").arg("2")); - GroupPoints->PushButton1->setPixmap(image2); - GroupPoints->PushButton2->setPixmap(image2); + GroupPoints->PushButton1->setIcon(image2); + GroupPoints->PushButton2->setIcon(image2); GroupDimensions = new DlgRef_2Spin(this, "GroupDimensions"); GroupDimensions->GroupBox1->setTitle(tr("GEOM_BOX_OBJ")); GroupDimensions->TextLabel1->setText(tr("GEOM_RADIUS_I").arg("1")); GroupDimensions->TextLabel2->setText(tr("GEOM_RADIUS_I").arg("2")); - Layout1->addWidget(GroupPoints, 2, 0); - Layout1->addWidget(GroupDimensions, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ setHelpFileName("turus.htm"); @@ -151,7 +153,7 @@ void PrimitiveGUI_TorusDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName( tr( "GEOM_TORUS" ) ); + initName( tr( "GEOM_TORUS" ).toStdString().c_str() ); ConstructorsClicked(0); }