]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Porting to Qt4.
authormkr <mkr@opencascade.com>
Mon, 9 Jul 2007 10:12:14 +0000 (10:12 +0000)
committermkr <mkr@opencascade.com>
Mon, 9 Jul 2007 10:12:14 +0000 (10:12 +0000)
13 files changed:
src/PrimitiveGUI/PrimitiveGUI.cxx
src/PrimitiveGUI/PrimitiveGUI.pro [new file with mode: 0644]
src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_BoxDlg.h
src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_ConeDlg.h
src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h
src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_SphereDlg.h
src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_TorusDlg.h
src/src.pro

index 45ca54db0855f9a1b8d2b8c51a07db43890bde0e..34d7038a27e3d1c56ce3b607b8aecff0f1dfa32b 100644 (file)
@@ -30,7 +30,6 @@
 #include "PrimitiveGUI.h"
 #include "GeometryGUI.h"
 
-#include "SUIT_Session.h"
 #include "SUIT_Desktop.h"
 
 #include "SalomeApp_Application.h"
diff --git a/src/PrimitiveGUI/PrimitiveGUI.pro b/src/PrimitiveGUI/PrimitiveGUI.pro
new file mode 100644 (file)
index 0000000..d1ee88f
--- /dev/null
@@ -0,0 +1,44 @@
+TEMPLATE = lib
+TARGET = PrimitiveGUI
+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
+
+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
+
+CONFIG -= debug release debug_and_release
+CONFIG += qt thread debug dll shared
+
+win32:DEFINES += WIN32 
+DEFINES += 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  = PrimitiveGUI.cxx
+SOURCES += PrimitiveGUI_BoxDlg.cxx
+SOURCES += PrimitiveGUI_CylinderDlg.cxx
+SOURCES += PrimitiveGUI_SphereDlg.cxx
+SOURCES += PrimitiveGUI_TorusDlg.cxx
+SOURCES += PrimitiveGUI_ConeDlg.cxx
+
+includes.files = $$HEADERS
+includes.path = ../../include
+
+INSTALLS += includes
index 23e9ce46a4137627fcf7dc4b05f60d4aa7faac18..5923b9df30e802c957439f4da1b5ad08f73717f9 100644 (file)
 //  $Header$
 
 #include "PrimitiveGUI_BoxDlg.h"
+#include "DlgRef_3Spin.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 <qlabel.h>
-
 #include "GEOMImpl_Types.hxx"
 
-#include "utilities.h"
-
 using namespace std;
 
 
@@ -50,28 +51,32 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 PrimitiveGUI_BoxDlg::PrimitiveGUI_BoxDlg(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_BOX_2P")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BOX_DXYZ")));
   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
 
-  setCaption(tr("GEOM_BOX_TITLE"));
+  setWindowTitle(tr("GEOM_BOX_TITLE"));
 
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_BOX"));
-  RadioButton1->setPixmap(image0);
-  RadioButton2->setPixmap(image1);
-  RadioButton3->close(TRUE);
+  RadioButton1->setIcon(image0);
+  RadioButton2->setIcon(image1);
+  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_DIAGONAL_POINTS"));
   GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg("1"));
   GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg("2"));
-  GroupPoints->PushButton1->setPixmap(image2);
-  GroupPoints->PushButton2->setPixmap(image2);
+  GroupPoints->PushButton1->setIcon(image2);
+  GroupPoints->PushButton2->setIcon(image2);
 
   GroupDimensions = new DlgRef_3Spin(this, "GroupDimensions");
   GroupDimensions->GroupBox1->setTitle(tr("GEOM_BOX_OBJ"));
@@ -79,8 +84,8 @@ PrimitiveGUI_BoxDlg::PrimitiveGUI_BoxDlg(GeometryGUI* theGeometryGUI, QWidget* p
   GroupDimensions->TextLabel2->setText(tr("GEOM_DY"));
   GroupDimensions->TextLabel3->setText(tr("GEOM_DZ"));
 
-  Layout1->addWidget(GroupPoints, 2, 0);
-  Layout1->addWidget(GroupDimensions, 2, 0);
+  gridLayout1->addWidget(aGroupPointsWidget, 2, 0);
+  gridLayout1->addWidget(GroupDimensions, 2, 0);
   /***************************************************************/
 
   setHelpFileName("box.htm");
@@ -149,7 +154,7 @@ void PrimitiveGUI_BoxDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
-  initName( tr( "GEOM_BOX" ) );
+  initName( tr( "GEOM_BOX" ).toStdString().c_str() );
   ConstructorsClicked(0);
 }
 
@@ -170,7 +175,7 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId)
 
        GroupDimensions->hide();
        resize(0, 0);
-       GroupPoints->show();
+       ::qobject_cast<QWidget*>( GroupPoints->gridLayout->parent() )->show();
        
        myEditCurrentArgument = GroupPoints->LineEdit1;
        GroupPoints->LineEdit1->setText("");
@@ -183,7 +188,7 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId)
       }
     case 1:
       {
-       GroupPoints->hide();
+       ::qobject_cast<QWidget*>( GroupPoints->gridLayout->parent() )->hide();
        resize(0, 0);
        GroupDimensions->show();
        
index 9e7139889f4e270f8fc46af575fc57c93d690a88..e2dc27c4995fdd65f6edc75e681966e0a2e6d646 100644 (file)
 
 #include "GEOMBase_Skeleton.h"
 #include "DlgRef_2Sel_QTD.h"
-#include "DlgRef_3Spin.h"
 
 using namespace std;
 
+class DlgRef_3Spin;
+
 //=================================================================================
 // class    : PrimitiveGUI_BoxDlg
 // purpose  :
@@ -44,7 +45,7 @@ class PrimitiveGUI_BoxDlg : public GEOMBase_Skeleton
     
 public:
     PrimitiveGUI_BoxDlg(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);
     ~PrimitiveGUI_BoxDlg();
     
 protected:
@@ -61,7 +62,7 @@ private :
 
     GEOM::GEOM_Object_var myPoint1, myPoint2;   /* Points containing the vector */ 
     
-    DlgRef_2Sel_QTD* GroupPoints;
+    Ui::DlgRef_2Sel_QTD* GroupPoints;
     DlgRef_3Spin* GroupDimensions;
 
 private slots:
index 7de92356e6b29073c8c310083422bd4c45e6a6bc..858e4e102717fd4b3a8165946f0ddad841326c60 100644 (file)
 //  $Header$
 
 #include "PrimitiveGUI_ConeDlg.h"
+#include "DlgRef_2Sel3Spin.h"
+#include "DlgRef_3Spin.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 <qlabel.h>
-
 #include "GEOMImpl_Types.hxx"
 
-#include "utilities.h"
-
 using namespace std;
 
 //=================================================================================
@@ -49,21 +51,21 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg(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_CONE_PV")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CONE_DXYZ")));
   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
 
-  setCaption(tr("GEOM_CONE_TITLE"));
+  setWindowTitle(tr("GEOM_CONE_TITLE"));
 
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_CONE"));
-  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_2Sel3Spin(this, "GroupPoints");
   GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
@@ -72,8 +74,8 @@ PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg(GeometryGUI* theGeometryGUI, QWidget*
   GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS_I").arg("1"));
   GroupPoints->TextLabel4->setText(tr("GEOM_RADIUS_I").arg("2"));
   GroupPoints->TextLabel5->setText(tr("GEOM_HEIGHT"));
-  GroupPoints->PushButton1->setPixmap(image2);
-  GroupPoints->PushButton2->setPixmap(image2);
+  GroupPoints->PushButton1->setIcon(image2);
+  GroupPoints->PushButton2->setIcon(image2);
 
   GroupDimensions = new DlgRef_3Spin(this, "GroupDimensions");
   GroupDimensions->GroupBox1->setTitle(tr("GEOM_BOX_OBJ"));
@@ -81,8 +83,8 @@ PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg(GeometryGUI* theGeometryGUI, QWidget*
   GroupDimensions->TextLabel2->setText(tr("GEOM_RADIUS_I").arg("2"));
   GroupDimensions->TextLabel3->setText(tr("GEOM_HEIGHT"));
 
-  Layout1->addWidget(GroupPoints, 2, 0);
-  Layout1->addWidget(GroupDimensions, 2, 0);
+  gridLayout1->addWidget(GroupPoints, 2, 0);
+  gridLayout1->addWidget(GroupDimensions, 2, 0);
   /***************************************************************/
 
   setHelpFileName( "cone.htm" );
@@ -162,7 +164,7 @@ void PrimitiveGUI_ConeDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
   
-  initName( tr( "GEOM_CONE" ) );
+  initName( tr( "GEOM_CONE" ).toStdString().c_str() );
   ConstructorsClicked(0);
 }
 
index 6ac583460d5a72e4aadf496e49875081fac36e2a..3e8f7b650b3303f9f63c565a9e26bf632eb45baa 100644 (file)
@@ -29,8 +29,9 @@
 #define DIALOGBOX_CONE_H
 
 #include "GEOMBase_Skeleton.h"
-#include "DlgRef_2Sel3Spin.h"
-#include "DlgRef_3Spin.h"
+
+class DlgRef_2Sel3Spin;
+class DlgRef_3Spin;
 
 //=================================================================================
 // class    : PrimitiveGUI_ConeDlg
@@ -42,7 +43,7 @@ class PrimitiveGUI_ConeDlg : public GEOMBase_Skeleton
 
 public:
     PrimitiveGUI_ConeDlg(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);
     ~PrimitiveGUI_ConeDlg();
 
 protected:
index 503211cf2f394004b5b25256ec6df16bf2145c22..da8009761e596ddebe0899e8aa36367dbc107d32 100644 (file)
 //  $Header$
 
 #include "PrimitiveGUI_CylinderDlg.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 <qlabel.h>
-
 #include "GEOMImpl_Types.hxx"
 
-#include "utilities.h"
-
 using namespace std;
 
 //=================================================================================
@@ -49,21 +51,21 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 PrimitiveGUI_CylinderDlg::PrimitiveGUI_CylinderDlg(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_CYLINDER_PV")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CYLINDER_DXYZ")));
   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
 
-  setCaption(tr("GEOM_CYLINDER_TITLE"));
+  setWindowTitle(tr("GEOM_CYLINDER_TITLE"));
 
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_CYLINDER"));
-  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_CylinderDlg::PrimitiveGUI_CylinderDlg(GeometryGUI* theGeometryGUI,
   GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR"));
   GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS"));
   GroupPoints->TextLabel4->setText(tr("GEOM_HEIGHT"));
-  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"));
   GroupDimensions->TextLabel2->setText(tr("GEOM_HEIGHT"));
 
-  Layout1->addWidget(GroupPoints, 2, 0);
-  Layout1->addWidget(GroupDimensions, 2, 0);
+  gridLayout1->addWidget(GroupPoints, 2, 0);
+  gridLayout1->addWidget(GroupDimensions, 2, 0);
   /***************************************************************/
 
   setHelpFileName("cylinder.htm");
@@ -155,7 +157,7 @@ void PrimitiveGUI_CylinderDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
   
-  initName( tr( "GEOM_CYLINDER" ) );
+  initName( tr( "GEOM_CYLINDER" ).toStdString().c_str() );
   ConstructorsClicked(0);
 }
 
index d6f8391be606dd7be33c83d859955e38a964b64e..ae55f1952f22ffac0d367ed086d477b8bc037fe8 100644 (file)
@@ -29,8 +29,9 @@
 #define DIALOGBOX_CYLINDER_H
 
 #include "GEOMBase_Skeleton.h"
-#include "DlgRef_2Sel2Spin.h"
-#include "DlgRef_2Spin.h"
+
+class DlgRef_2Sel2Spin;
+class DlgRef_2Spin;
 
 
 //=================================================================================
@@ -43,7 +44,7 @@ class PrimitiveGUI_CylinderDlg : public GEOMBase_Skeleton
 
 public:
     PrimitiveGUI_CylinderDlg(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);
     ~PrimitiveGUI_CylinderDlg();
 
 protected:
index f52f0822a97e783c28ef24f28d4f4c72e3e89477..b6f246e62d52dc2dc1a4332b958840636e277e64 100644 (file)
 //  $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 <qlabel.h>
-
 #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");
@@ -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);
 }
 
index 7885126b27cb1c38bb91fe0bb57db6e812122c42..a7801ff6d868f27f09e0ab3efc41b5eb69cd0128 100644 (file)
@@ -29,8 +29,9 @@
 #define DIALOGBOX_SPHERE_H
 
 #include "GEOMBase_Skeleton.h"
-#include "DlgRef_1Sel1Spin.h"
-#include "DlgRef_1Spin.h"
+
+class DlgRef_1Sel1Spin;
+class DlgRef_1Spin;
 
 
 //=================================================================================
@@ -43,7 +44,7 @@ class PrimitiveGUI_SphereDlg : public GEOMBase_Skeleton
 
 public:
     PrimitiveGUI_SphereDlg(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);
     ~PrimitiveGUI_SphereDlg();
 
 protected:
index 7ab9ca4652d7b181ff52a11e30f394e30d01fb2a..a63694a39fad9f542d15aabb5829d2cceb3b9451 100644 (file)
 //  $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 <qlabel.h>
-
 #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);
 }
 
index 00d6a46b679dfcc140e8f9c963eae1acf440101c..c386679b72c98a5ba471a0012fbd3d836541181b 100644 (file)
@@ -29,8 +29,9 @@
 #define DIALOGBOX_TORUS_H
 
 #include "GEOMBase_Skeleton.h"
-#include "DlgRef_2Sel2Spin.h"
-#include "DlgRef_2Spin.h"
+
+class DlgRef_2Sel2Spin;
+class DlgRef_2Spin;
 
 
 //=================================================================================
@@ -43,7 +44,7 @@ class PrimitiveGUI_TorusDlg : public GEOMBase_Skeleton
 
 public:
     PrimitiveGUI_TorusDlg(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);
     ~PrimitiveGUI_TorusDlg();
 
 protected:
index fcc1d260e50c11a1f0c276d4c92d2f09a2037808..c120af2edeba4c623ea0b0dfe3b591518c65ff27 100644 (file)
@@ -27,7 +27,7 @@ SUBDIRS += GEOMBase
 SUBDIRS += GEOMToolsGUI
 SUBDIRS += DisplayGUI
 SUBDIRS += BasicGUI
-#SUBDIRS += PrimitiveGUI
+SUBDIRS += PrimitiveGUI
 #SUBDIRS += GenerationGUI
 #SUBDIRS += EntityGUI
 #SUBDIRS += BuildGUI