From 6c89f991a6ea8297dd3ebc5fb2809a4d10d34f86 Mon Sep 17 00:00:00 2001 From: mkr Date: Mon, 9 Jul 2007 12:23:33 +0000 Subject: [PATCH] Porting to Qt4. --- src/GenerationGUI/GenerationGUI.cxx | 3 +- src/GenerationGUI/GenerationGUI.pro | 45 +++++++++++++++ .../GenerationGUI_FillingDlg.cxx | 41 ++++++-------- src/GenerationGUI/GenerationGUI_FillingDlg.h | 5 +- src/GenerationGUI/GenerationGUI_PipeDlg.cxx | 47 +++++++--------- src/GenerationGUI/GenerationGUI_PipeDlg.h | 4 +- src/GenerationGUI/GenerationGUI_PrismDlg.cxx | 56 +++++++++---------- src/GenerationGUI/GenerationGUI_PrismDlg.h | 7 ++- src/GenerationGUI/GenerationGUI_RevolDlg.cxx | 38 ++++++------- src/GenerationGUI/GenerationGUI_RevolDlg.h | 5 +- src/src.pro | 2 +- 11 files changed, 143 insertions(+), 110 deletions(-) create mode 100644 src/GenerationGUI/GenerationGUI.pro diff --git a/src/GenerationGUI/GenerationGUI.cxx b/src/GenerationGUI/GenerationGUI.cxx index 85832ed84..3de74cbf6 100644 --- a/src/GenerationGUI/GenerationGUI.cxx +++ b/src/GenerationGUI/GenerationGUI.cxx @@ -28,7 +28,8 @@ #include "GenerationGUI.h" -#include "SUIT_Session.h" +#include "GeometryGUI.h" + #include "SUIT_Desktop.h" #include "SalomeApp_Application.h" diff --git a/src/GenerationGUI/GenerationGUI.pro b/src/GenerationGUI/GenerationGUI.pro new file mode 100644 index 000000000..6b9d6ac7c --- /dev/null +++ b/src/GenerationGUI/GenerationGUI.pro @@ -0,0 +1,45 @@ +TEMPLATE = lib +TARGET = GenerationGUI +DESTDIR = ../../lib +MOC_DIR = ../../moc +OBJECTS_DIR = ../../obj/$$TARGET + +QT_INCLUDES = $$(QTDIR)/include $$(QTDIR)/include/QtCore $$(QTDIR)/include/QtGui $$(QTDIR)/include/QtOpenGL $$(QTDIR)/include/QtXml + +VTK_INCLUDES = $$(VTKHOME)/include/vtk + +CASROOT = $$(CASROOT) +CAS_CPPFLAGS = $${CASROOT}/inc + +PYTHON_INCLUDES = $$(PYTHONHOME)/include/python2.4 + +BOOST_CPPFLAGS = $$(BOOSTDIR)/include + +KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome + +GUI_CXXFLAGS = $$(GUI_ROOT_DIR)/include/salome + +CORBA_INCLUDES = $$(OMNIORBDIR)/include $$(OMNIORBDIR)/include/omniORB4 $$(OMNIORBDIR)/include/COS + +CAS_LDPATH = -L$${CASROOT}/Linux/lib + +INCLUDEPATH += $${QT_INCLUDES} $${VTK_INCLUDES} $${CAS_CPPFLAGS} $${PYTHON_INCLUDES} $${BOOST_CPPFLAGS} $${KERNEL_CXXFLAGS} $${GUI_CXXFLAGS} $${CORBA_INCLUDES} ../GEOMGUI ../DlgRef ../GEOMBase ../OBJECT ../GEOMClient ../GEOMImpl ../GEOMFiltersSelection $$(GEOM_ROOT_DIR)/idl $$(GEOM_ROOT_DIR)/salome_adm/unix + +LIBS += -L$$(GEOM_ROOT_DIR)/lib -lGEOMFiltersSelection -lGEOMBase $${CAS_LDPATH} -lTKOffset + +CONFIG -= debug release debug_and_release +CONFIG += qt thread debug dll shared + +win32:DEFINES += WIN32 +DEFINES += GENERATIONGUI_EXPORTS OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS OMNIORB_VERSION=4 __x86__ __linux__ COMP_CORBA_DOUBLE COMP_CORBA_LONG + +SOURCES = GenerationGUI.cxx +SOURCES += GenerationGUI_PrismDlg.cxx +SOURCES += GenerationGUI_RevolDlg.cxx +SOURCES += GenerationGUI_FillingDlg.cxx +SOURCES += GenerationGUI_PipeDlg.cxx + +includes.files = $$HEADERS +includes.path = ../../include + +INSTALLS += includes diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index 8939ae5b4..2affba68b 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -27,28 +27,20 @@ // $Header$ #include "GenerationGUI_FillingDlg.h" +#include "DlgRef_1Sel5Spin.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 -#include -#include -#include -#include -#include #include -#include -#include #include "GEOMImpl_Types.hxx" -#include - -#include "utilities.h" - //================================================================================= // class : GenerationGUI_FillingDlg() // purpose : Constructs a GenerationGUI_FillingDlg which is a child of 'parent', with the @@ -57,20 +49,21 @@ // TRUE to construct a modal dialog. //================================================================================= GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(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_FILLING"))); QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT"))); - setCaption(tr("GEOM_FILLING_TITLE")); + setWindowTitle(tr("GEOM_FILLING_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_FILLING")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton2->close(); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); GroupPoints = new DlgRef_1Sel5Spin(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); @@ -80,10 +73,10 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI, GroupPoints->TextLabel4->setText(tr("GEOM_FILLING_NB_ITER")); GroupPoints->TextLabel5->setText(tr("GEOM_FILLING_MAX_DEG")); GroupPoints->TextLabel6->setText(tr("GEOM_FILLING_TOL_3D")); - GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->PushButton1->setIcon(image1); GroupPoints->LineEdit1->setReadOnly( true ); - Layout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ setHelpFileName("filling.htm"); @@ -157,7 +150,7 @@ void GenerationGUI_FillingDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName(tr("GEOM_FILLING")); + initName(tr("GEOM_FILLING").toStdString().c_str()); } diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.h b/src/GenerationGUI/GenerationGUI_FillingDlg.h index e4691b97e..2b5775fa4 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.h +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.h @@ -31,7 +31,8 @@ #include "GenerationGUI.h" #include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel5Spin.h" + +class DlgRef_1Sel5Spin; //================================================================================= // class : GenerationGUI_FillingDlg @@ -43,7 +44,7 @@ class GENERATIONGUI_EXPORT GenerationGUI_FillingDlg : public GEOMBase_Skeleton public: GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~GenerationGUI_FillingDlg(); protected: diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx index 242408d4f..60d76791b 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx @@ -28,26 +28,16 @@ #include "GenerationGUI_PipeDlg.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 -#include -#include -#if OCC_VERSION_MAJOR >= 5 -#include -#else -#include -#endif - #include "GEOMImpl_Types.hxx" -#include "utilities.h" - //================================================================================= // class : GenerationGUI_PipeDlg() // purpose : Constructs a GenerationGUI_PipeDlg which is a child of 'parent', with the @@ -56,31 +46,36 @@ // TRUE to construct a modal dialog. //================================================================================= GenerationGUI_PipeDlg::GenerationGUI_PipeDlg(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_PIPE"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); - setCaption(tr("GEOM_PIPE_TITLE")); + setWindowTitle(tr("GEOM_PIPE_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_PIPE")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton2->close(); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); + + GroupPoints = new Ui::DlgRef_2Sel_QTD(); + QWidget* aGroupPointsWidget = new QWidget(this); + GroupPoints->setupUi(aGroupPointsWidget); + aGroupPointsWidget->setObjectName("GroupPoints"); - GroupPoints = new DlgRef_2Sel_QTD(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); GroupPoints->TextLabel1->setText(tr("GEOM_BASE_OBJECT")); GroupPoints->TextLabel2->setText(tr("GEOM_PATH_OBJECT")); - GroupPoints->PushButton1->setPixmap(image1); - GroupPoints->PushButton2->setPixmap(image1); + GroupPoints->PushButton1->setIcon(image1); + GroupPoints->PushButton2->setIcon(image1); GroupPoints->LineEdit1->setReadOnly( true ); GroupPoints->LineEdit2->setReadOnly( true ); - Layout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(aGroupPointsWidget, 2, 0); /***************************************************************/ setHelpFileName("pipe_creation.htm"); @@ -126,7 +121,7 @@ void GenerationGUI_PipeDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName(tr("GEOM_PIPE")); + initName(tr("GEOM_PIPE").toStdString().c_str()); globalSelection( GEOM_ALLSHAPES ); } diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.h b/src/GenerationGUI/GenerationGUI_PipeDlg.h index 09f5a7215..6e0c58247 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.h +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.h @@ -43,7 +43,7 @@ class GENERATIONGUI_EXPORT GenerationGUI_PipeDlg : public GEOMBase_Skeleton public: GenerationGUI_PipeDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~GenerationGUI_PipeDlg(); protected: @@ -61,7 +61,7 @@ private: bool myOkBase; bool myOkPath; /* to check when arguments are defined */ - DlgRef_2Sel_QTD* GroupPoints; + Ui::DlgRef_2Sel_QTD* GroupPoints; private slots: void ClickOnOk(); diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index 54e4ad76b..579fdcdad 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -27,22 +27,19 @@ // $Header$ #include "GenerationGUI_PrismDlg.h" +#include "DlgRef_2Sel1Spin2Check.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 -#include #include "GEOMImpl_Types.hxx" -#include -#include - -#include "utilities.h" - //================================================================================= // class : GenerationGUI_PrismDlg() // purpose : Constructs a GenerationGUI_PrismDlg which is a child of 'parent', with the @@ -51,22 +48,21 @@ // TRUE to construct a modal dialog. //================================================================================= GenerationGUI_PrismDlg::GenerationGUI_PrismDlg(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_PRISM"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_PRISM_2P"))); - setCaption(tr("GEOM_EXTRUSION_TITLE")); + setWindowTitle(tr("GEOM_EXTRUSION_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_EXTRUSION")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image2); - //RadioButton2->close(TRUE); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setIcon(image2); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints"); GroupPoints->CheckButton1->hide(); @@ -74,23 +70,27 @@ GenerationGUI_PrismDlg::GenerationGUI_PrismDlg(GeometryGUI* theGeometryGUI, QWid GroupPoints->TextLabel1->setText(tr("GEOM_BASE")); GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR")); GroupPoints->TextLabel3->setText(tr("GEOM_HEIGHT")); - GroupPoints->PushButton1->setPixmap(image1); - GroupPoints->PushButton2->setPixmap(image1); + GroupPoints->PushButton1->setIcon(image1); + GroupPoints->PushButton2->setIcon(image1); GroupPoints->LineEdit1->setReadOnly( true ); GroupPoints->LineEdit2->setReadOnly( true ); GroupPoints->CheckButton2->setText(tr("GEOM_REVERSE")); - GroupPoints2 = new DlgRef_3Sel_QTD(this, "GroupPoints2"); + GroupPoints2 = new Ui::DlgRef_3Sel_QTD(); + QWidget* aGroupPoints2Widget = new QWidget(this); + GroupPoints2->setupUi(aGroupPoints2Widget); + aGroupPoints2Widget->setObjectName("GroupPoints2"); + GroupPoints2->GroupBox1->setTitle(tr("GEOM_EXTRUSION_BSV_2P")); GroupPoints2->TextLabel1->setText(tr("GEOM_BASE")); GroupPoints2->TextLabel2->setText(tr("GEOM_POINT_I").arg("1")); GroupPoints2->TextLabel3->setText(tr("GEOM_POINT_I").arg("2")); - GroupPoints2->PushButton1->setPixmap(image1); - GroupPoints2->PushButton2->setPixmap(image1); - GroupPoints2->PushButton3->setPixmap(image1); + GroupPoints2->PushButton1->setIcon(image1); + GroupPoints2->PushButton2->setIcon(image1); + GroupPoints2->PushButton3->setIcon(image1); - Layout1->addWidget(GroupPoints, 2, 0); - Layout1->addWidget(GroupPoints2, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(aGroupPoints2Widget, 2, 0); /***************************************************************/ setHelpFileName("extrusion.htm"); @@ -166,7 +166,7 @@ void GenerationGUI_PrismDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - initName(tr("GEOM_EXTRUSION")); + initName(tr("GEOM_EXTRUSION").toStdString().c_str()); globalSelection( GEOM_ALLSHAPES ); ConstructorsClicked(0); @@ -187,7 +187,7 @@ void GenerationGUI_PrismDlg::ConstructorsClicked(int constructorId) { globalSelection( GEOM_POINT ); - GroupPoints2->hide(); + ::qobject_cast( GroupPoints2->gridLayout->parent() )->hide(); resize(0, 0); GroupPoints->show(); @@ -210,7 +210,7 @@ void GenerationGUI_PrismDlg::ConstructorsClicked(int constructorId) { GroupPoints->hide(); resize(0, 0); - GroupPoints2->show(); + ::qobject_cast( GroupPoints2->gridLayout->parent() )->show(); myEditCurrentArgument = GroupPoints2->LineEdit1; GroupPoints2->LineEdit1->setText(""); diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.h b/src/GenerationGUI/GenerationGUI_PrismDlg.h index 2c106080c..bb6849849 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.h +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.h @@ -31,9 +31,10 @@ #include "GenerationGUI.h" #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel1Spin2Check.h" #include "DlgRef_3Sel_QTD.h" +class DlgRef_2Sel1Spin2Check; + //================================================================================= // class : GenerationGUI_PrismDlg // purpose : @@ -44,7 +45,7 @@ class GENERATIONGUI_EXPORT GenerationGUI_PrismDlg : public GEOMBase_Skeleton public: GenerationGUI_PrismDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~GenerationGUI_PrismDlg(); protected: @@ -68,7 +69,7 @@ private : bool myOkPnt2; DlgRef_2Sel1Spin2Check* GroupPoints; - DlgRef_3Sel_QTD* GroupPoints2; // for second layout for extrusion using 2 points + Ui::DlgRef_3Sel_QTD* GroupPoints2; // for second layout for extrusion using 2 points private slots: void ClickOnOk(); diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index e8a6608ad..13fa725de 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -27,23 +27,20 @@ // $Header$ #include "GenerationGUI_RevolDlg.h" +#include "DlgRef_2Sel1Spin2Check.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 -#include #include #include "GEOMImpl_Types.hxx" -#include -#include - -#include "utilities.h" - //================================================================================= // class : GenerationGUI_RevolDlg() // purpose : Constructs a GenerationGUI_RevolDlg which is a child of 'parent', with the @@ -52,20 +49,21 @@ // TRUE to construct a modal dialog. //================================================================================= GenerationGUI_RevolDlg::GenerationGUI_RevolDlg(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_REVOL"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); - setCaption(tr("GEOM_REVOLUTION_TITLE")); + setWindowTitle(tr("GEOM_REVOLUTION_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_REVOLUTION")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); + RadioButton1->setIcon(image0); + RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton2->close(); + RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + RadioButton3->close(); GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints"); GroupPoints->CheckButton1->hide(); @@ -73,13 +71,13 @@ GenerationGUI_RevolDlg::GenerationGUI_RevolDlg(GeometryGUI* theGeometryGUI, QWid GroupPoints->TextLabel1->setText(tr("GEOM_OBJECT")); GroupPoints->TextLabel2->setText(tr("GEOM_AXIS")); GroupPoints->TextLabel3->setText(tr("GEOM_ANGLE")); - GroupPoints->PushButton1->setPixmap(image1); - GroupPoints->PushButton2->setPixmap(image1); + GroupPoints->PushButton1->setIcon(image1); + GroupPoints->PushButton2->setIcon(image1); GroupPoints->LineEdit1->setReadOnly( true ); GroupPoints->LineEdit2->setReadOnly( true ); GroupPoints->CheckButton2->setText(tr("GEOM_REVERSE")); - Layout1->addWidget(GroupPoints, 2, 0); + gridLayout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ setHelpFileName("revolution.htm"); @@ -135,7 +133,7 @@ void GenerationGUI_RevolDlg::Init() connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - initName(tr("GEOM_REVOLUTION")); + initName(tr("GEOM_REVOLUTION").toStdString().c_str()); globalSelection( GEOM_ALLSHAPES ); } diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.h b/src/GenerationGUI/GenerationGUI_RevolDlg.h index 83be6522b..cbbbfc54a 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.h +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.h @@ -31,9 +31,8 @@ #include "GenerationGUI.h" #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel1Spin2Check.h" -#include +class DlgRef_2Sel1Spin2Check; //================================================================================= // class : GenerationGUI_RevolDlg @@ -45,7 +44,7 @@ class GENERATIONGUI_EXPORT GenerationGUI_RevolDlg : public GEOMBase_Skeleton public: GenerationGUI_RevolDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0); + const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0); ~GenerationGUI_RevolDlg(); protected: diff --git a/src/src.pro b/src/src.pro index c120af2ed..83d25693e 100644 --- a/src/src.pro +++ b/src/src.pro @@ -28,7 +28,7 @@ SUBDIRS += GEOMToolsGUI SUBDIRS += DisplayGUI SUBDIRS += BasicGUI SUBDIRS += PrimitiveGUI -#SUBDIRS += GenerationGUI +SUBDIRS += GenerationGUI #SUBDIRS += EntityGUI #SUBDIRS += BuildGUI #SUBDIRS += BooleanGUI -- 2.39.2