]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Porting to Qt4.
authormkr <mkr@opencascade.com>
Mon, 9 Jul 2007 12:23:33 +0000 (12:23 +0000)
committermkr <mkr@opencascade.com>
Mon, 9 Jul 2007 12:23:33 +0000 (12:23 +0000)
src/GenerationGUI/GenerationGUI.cxx
src/GenerationGUI/GenerationGUI.pro [new file with mode: 0644]
src/GenerationGUI/GenerationGUI_FillingDlg.cxx
src/GenerationGUI/GenerationGUI_FillingDlg.h
src/GenerationGUI/GenerationGUI_PipeDlg.cxx
src/GenerationGUI/GenerationGUI_PipeDlg.h
src/GenerationGUI/GenerationGUI_PrismDlg.cxx
src/GenerationGUI/GenerationGUI_PrismDlg.h
src/GenerationGUI/GenerationGUI_RevolDlg.cxx
src/GenerationGUI/GenerationGUI_RevolDlg.h
src/src.pro

index 85832ed847ebfef0340beab530f101c56b51e7e2..3de74cbf66fe3c086ed5ae764aaec8beaceafa92 100644 (file)
@@ -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 (file)
index 0000000..6b9d6ac
--- /dev/null
@@ -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
index 8939ae5b47ae74f9550cbbf77a1bc6c137803bdf..2affba68b9b1846a2d59fa8a6928342305b616fb 100644 (file)
 //  $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 <GeomFill_SectionGenerator.hxx>
-#include <GeomFill_Line.hxx>
-#include <GeomFill_AppSurf.hxx>
-#include <Geom_BSplineSurface.hxx>
-#include <Geom_TrimmedCurve.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
-#include <TopExp_Explorer.hxx>
 #include <TopoDS_Iterator.hxx>
-#include <BRep_Tool.hxx>
-#include <Precision.hxx>
 #include "GEOMImpl_Types.hxx"
 
-#include <qlabel.h>
-
-#include "utilities.h"
-
 //=================================================================================
 // class    : GenerationGUI_FillingDlg()
 // purpose  : Constructs a GenerationGUI_FillingDlg which is a child of 'parent', with the
 //            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());
 }
 
 
index e4691b97e21bc00597a94de0f0d7547994b864eb..2b5775fa4a84c1eeb4867f1ef2874a986a29b2af 100644 (file)
@@ -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:
index 242408d4fee117cb59110149bdb88d7e819c779a..60d76791b2339e9e300eda3186b1a12bf678b814 100644 (file)
 
 #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 <qlabel.h>
-
-#include <TopoDS_Edge.hxx>
-#include <BRepBuilderAPI_MakeWire.hxx>
-#include <BRepOffsetAPI_MakePipe.hxx>
-#if OCC_VERSION_MAJOR >= 5
-#include <BRepAlgo.hxx>
-#else
-#include <BRepAlgoAPI.hxx>
-#endif
-
 #include "GEOMImpl_Types.hxx"
 
-#include "utilities.h"
-
 //=================================================================================
 // class    : GenerationGUI_PipeDlg()
 // purpose  : Constructs a GenerationGUI_PipeDlg which is a child of 'parent', with the 
 //            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 );
 }
index 09f5a72158612aff928b08ea79009d7009ad8a8b..6e0c58247ec630aa22c63b372b6c802fe0326c42 100644 (file)
@@ -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();
index 54e4ad76b53696db865ebf64de5fcad5be8216d6..579fdcdad7043c279cf821490f1bda65e480589b 100644 (file)
 //  $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 <BRepPrimAPI_MakePrism.hxx>
-#include <BRepAdaptor_Curve.hxx>
-#include <gp_Lin.hxx>
 #include "GEOMImpl_Types.hxx"
 
-#include <qlabel.h>
-#include <qcheckbox.h>
-
-#include "utilities.h"
-
 //=================================================================================
 // class    : GenerationGUI_PrismDlg()
 // purpose  : Constructs a GenerationGUI_PrismDlg which is a child of 'parent', with the 
 //            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<QWidget*>( 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<QWidget*>( GroupPoints2->gridLayout->parent() )->show();
        
        myEditCurrentArgument = GroupPoints2->LineEdit1;
        GroupPoints2->LineEdit1->setText("");
index 2c106080c9f8dec7692272c993931d3b5d7e5228..bb6849849147662900357c66df4427e1557e3dc4 100644 (file)
 #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();
index e8a6608ad68efd99d95736a6ea6c4638cc72a357..13fa725de09b47de67d8e3c061edadfb51b0c096 100644 (file)
 //  $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 <gp_Lin.hxx>
-#include <BRepAdaptor_Curve.hxx>
-#include <BRepPrimAPI_MakeRevol.hxx>
 #include <TopExp_Explorer.hxx>
 #include "GEOMImpl_Types.hxx"
 
-#include <qlabel.h>
-#include <qcheckbox.h>
-
-#include "utilities.h"
-
 //=================================================================================
 // class    : GenerationGUI_RevolDlg()
 // purpose  : Constructs a GenerationGUI_RevolDlg which is a child of 'parent', with the 
 //            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 );
 }
index 83be6522b7c1e30be6d3ba6bdce54c3e2be3c5ba..cbbbfc54a748dd95fc15ff60dc749cebff45f4e8 100644 (file)
@@ -31,9 +31,8 @@
 #include "GenerationGUI.h"
 
 #include "GEOMBase_Skeleton.h"
-#include "DlgRef_2Sel1Spin2Check.h"
 
-#include <gp_Dir.hxx>
+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:
index c120af2edeba4c623ea0b0dfe3b591518c65ff27..83d25693e36d6b043c3ff122453ef63369d64c7b 100644 (file)
@@ -28,7 +28,7 @@ SUBDIRS += GEOMToolsGUI
 SUBDIRS += DisplayGUI
 SUBDIRS += BasicGUI
 SUBDIRS += PrimitiveGUI
-#SUBDIRS += GenerationGUI
+SUBDIRS += GenerationGUI
 #SUBDIRS += EntityGUI
 #SUBDIRS += BuildGUI
 #SUBDIRS += BooleanGUI