]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Porting to Qt4.
authormkr <mkr@opencascade.com>
Mon, 9 Jul 2007 07:39:05 +0000 (07:39 +0000)
committermkr <mkr@opencascade.com>
Mon, 9 Jul 2007 07:39:05 +0000 (07:39 +0000)
24 files changed:
src/BasicGUI/BasicGUI.cxx
src/BasicGUI/BasicGUI.h
src/BasicGUI/BasicGUI.pro [new file with mode: 0644]
src/BasicGUI/BasicGUI_ArcDlg.cxx
src/BasicGUI/BasicGUI_ArcDlg.h
src/BasicGUI/BasicGUI_CircleDlg.cxx
src/BasicGUI/BasicGUI_CircleDlg.h
src/BasicGUI/BasicGUI_CurveDlg.cxx
src/BasicGUI/BasicGUI_CurveDlg.h
src/BasicGUI/BasicGUI_EllipseDlg.cxx
src/BasicGUI/BasicGUI_EllipseDlg.h
src/BasicGUI/BasicGUI_LineDlg.cxx
src/BasicGUI/BasicGUI_LineDlg.h
src/BasicGUI/BasicGUI_MarkerDlg.cxx
src/BasicGUI/BasicGUI_MarkerDlg.h
src/BasicGUI/BasicGUI_PlaneDlg.cxx
src/BasicGUI/BasicGUI_PlaneDlg.h
src/BasicGUI/BasicGUI_PointDlg.cxx
src/BasicGUI/BasicGUI_PointDlg.h
src/BasicGUI/BasicGUI_VectorDlg.cxx
src/BasicGUI/BasicGUI_VectorDlg.h
src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx
src/BasicGUI/BasicGUI_WorkingPlaneDlg.h
src/src.pro

index 41b484848580dcdc38986992e21545a7083d72d0..74a8949164b9e0b551f8253dc832ddb5985d62b1 100644 (file)
@@ -36,9 +36,7 @@
 #include "OCCViewer_ViewModel.h"
 #include "OCCViewer_ViewManager.h"
 #include "OCCViewer_ViewPort3d.h"
-#include "utilities.h"
 
-#include <Precision.hxx>
 #include <BRep_Tool.hxx>
 #include <ProjLib.hxx>
 #include <ElSLib.hxx>
@@ -55,6 +53,8 @@
 #include "BasicGUI_WorkingPlaneDlg.h" // Method WORKING PLANE
 #include "BasicGUI_MarkerDlg.h"       // Method REPAIR
 
+#include <QMouseEvent>
+
 using namespace std;
 
 //=======================================================================
@@ -137,9 +137,9 @@ bool BasicGUI::OnMousePress( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWin
   QDialog* aDlg = getGeometryGUI()->GetActiveDialogBox();
 
   // Create Point dialog, OCC viewer 
-  if ( aDlg && aDlg->isA( "BasicGUI_PointDlg" ) &&
+  if ( aDlg && ( QString(aDlg->metaObject()->className()).compare("BasicGUI_PointDlg") == 0) &&
        theViewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() &&
-       pe->state() != Qt::ControlButton )
+       pe->modifiers() != Qt::ControlModifier )
   {
     BasicGUI_PointDlg* aPntDlg = (BasicGUI_PointDlg*) aDlg;
     if ( aPntDlg->acceptMouseEvent() )
@@ -151,7 +151,7 @@ bool BasicGUI::OnMousePress( QMouseEvent* pe, SUIT_Desktop* parent, SUIT_ViewWin
       gp_Pnt aPnt;    
 
       ic->InitSelected();
-      if ( pe->state() == Qt::ShiftButton )
+      if ( pe->modifiers() == Qt::ShiftModifier )
         ic->ShiftSelect();  // Append selection
       else
         ic->Select();       // New selection
index 73a16e6bd77f69faf468f9a599b497c4c3aca3a6..867ede7453fa1a6a232c68d8fdd86b88d0a2686a 100644 (file)
@@ -31,7 +31,6 @@
 #include "GEOM_BasicGUI.hxx"
 
 #include "GEOMGUI.h"
-#include "GEOMBase.h"
 #include <V3d_View.hxx>
 
 //=================================================================================
diff --git a/src/BasicGUI/BasicGUI.pro b/src/BasicGUI/BasicGUI.pro
new file mode 100644 (file)
index 0000000..77eb2d3
--- /dev/null
@@ -0,0 +1,54 @@
+TEMPLATE = lib
+TARGET = BasicGUI
+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
+
+GUI_LDFLAGS = -L$$(GUI_ROOT_DIR)/lib/salome
+
+INCLUDEPATH += $${QT_INCLUDES} $${VTK_INCLUDES} $${CAS_CPPFLAGS} $${PYTHON_INCLUDES} $${BOOST_CPPFLAGS} $${KERNEL_CXXFLAGS} $${GUI_CXXFLAGS} $${CORBA_INCLUDES} ../OBJECT ../DlgRef ../GEOMGUI ../GEOMFiltersSelection ../GEOMBase ../GEOMImpl ../GEOMClient $$(GEOM_ROOT_DIR)/idl $$(GEOM_ROOT_DIR)/salome_adm/unix
+
+LIBS += -L$$(GEOM_ROOT_DIR)/lib -lGEOMFiltersSelection -lGEOMBase -lGEOM $${GUI_LDFLAGS} -lsuit
+
+CONFIG -= debug release debug_and_release
+CONFIG += qt thread debug dll shared
+
+win32:DEFINES += WIN32 
+DEFINES += BASICGUI_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
+
+HEADERS  = BasicGUI_PointDlg.h
+HEADERS += GEOM_BasicGUI.hxx
+
+SOURCES  = BasicGUI.cxx
+SOURCES += BasicGUI_PointDlg.cxx
+SOURCES += BasicGUI_LineDlg.cxx
+SOURCES += BasicGUI_CircleDlg.cxx
+SOURCES += BasicGUI_EllipseDlg.cxx
+SOURCES += BasicGUI_ArcDlg.cxx
+SOURCES += BasicGUI_VectorDlg.cxx
+SOURCES += BasicGUI_PlaneDlg.cxx
+SOURCES += BasicGUI_WorkingPlaneDlg.cxx
+SOURCES += BasicGUI_CurveDlg.cxx
+SOURCES += BasicGUI_MarkerDlg.cxx
+
+includes.files = $$HEADERS
+includes.path = ../../include
+
+INSTALLS += includes
index fec43e01e817b5f22fb9b52604f7014872bc25b2..c9278dcc2b22beb23e87d2c36db275b7af9244b6 100644 (file)
 
 #include "BasicGUI_ArcDlg.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 <BRepBuilderAPI_MakeEdge.hxx>
-#include <GC_MakeArcOfCircle.hxx>
-#include <Geom_TrimmedCurve.hxx>
-#include <Precision.hxx>
-
 #include "GEOMImpl_Types.hxx"
 
-#include "utilities.h"
-
 using namespace std;
 
 //=================================================================================
@@ -54,23 +48,27 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 BasicGUI_ArcDlg::BasicGUI_ArcDlg(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_ARC")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ARC_CENTER")));
   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
 
-  setCaption(tr("GEOM_ARC_TITLE"));
+  setWindowTitle(tr("GEOM_ARC_TITLE"));
 
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_ARC"));
-  RadioButton1->setPixmap(image0);
-  RadioButton2->setPixmap(image1);
-  RadioButton3->close(TRUE);
+  RadioButton1->setIcon(image0);
+  RadioButton2->setIcon(image1);
+  RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
+  RadioButton3->close();
+
+  Group3Pnts = new Ui::DlgRef_3Sel_QTD();
+  QWidget* aGroup3PntsWidget = new QWidget(this);
+  Group3Pnts->setupUi(aGroup3PntsWidget);
+  aGroup3PntsWidget->setObjectName("Group3Pnts");
 
-  Group3Pnts = new DlgRef_3Sel_QTD(this, "Group3Pnts");
   Group3Pnts->GroupBox1->setTitle(tr("GEOM_POINTS"));
   Group3Pnts->TextLabel1->setText(tr("GEOM_POINT_I").arg("1"));
   Group3Pnts->TextLabel2->setText(tr("GEOM_POINT_I").arg("2"));
@@ -80,12 +78,16 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
   Group3Pnts->LineEdit2->setReadOnly( true );
   Group3Pnts->LineEdit3->setReadOnly( true );
 
-  Group3Pnts->PushButton1->setPixmap(image2);
-  Group3Pnts->PushButton2->setPixmap(image2);
-  Group3Pnts->PushButton3->setPixmap(image2);
+  Group3Pnts->PushButton1->setIcon(image2);
+  Group3Pnts->PushButton2->setIcon(image2);
+  Group3Pnts->PushButton3->setIcon(image2);
+
 
+  Group3Pnts2 = new Ui::DlgRef_3Sel1Check_QTD();
+  QWidget* aGroup3Pnts2Widget = new QWidget(this);
+  Group3Pnts2->setupUi(aGroup3Pnts2Widget);
+  aGroup3Pnts2Widget->setObjectName("Group3Pnts2");
 
-  Group3Pnts2 = new DlgRef_3Sel1Check_QTD(this, "Group3Pnts2");
   Group3Pnts2->GroupBox1->setTitle(tr("GEOM_POINTS"));
   Group3Pnts2->TextLabel1->setText(tr("GEOM_CENTER_POINT"));
   Group3Pnts2->TextLabel2->setText(tr("GEOM_POINT_I").arg("Start"));
@@ -95,14 +97,14 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
   Group3Pnts2->LineEdit2->setReadOnly( true );
   Group3Pnts2->LineEdit3->setReadOnly( true );
 
-  Group3Pnts2->PushButton1->setPixmap(image2);
-  Group3Pnts2->PushButton2->setPixmap(image2);
-  Group3Pnts2->PushButton3->setPixmap(image2);
+  Group3Pnts2->PushButton1->setIcon(image2);
+  Group3Pnts2->PushButton2->setIcon(image2);
+  Group3Pnts2->PushButton3->setIcon(image2);
   
   Group3Pnts2->radioButton4->setText(tr("GEOM_REVERSE"));
 
-  Layout1->addWidget( Group3Pnts, 2, 0 );
-  Layout1->addWidget( Group3Pnts2, 2, 0 );
+  gridLayout1->addWidget( aGroup3PntsWidget, 2, 0 );
+  gridLayout1->addWidget( aGroup3Pnts2Widget, 2, 0 );
 
   setHelpFileName("arc.htm");
 
@@ -167,7 +169,7 @@ void BasicGUI_ArcDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
           SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
-  initName( tr( "GEOM_ARC" )); 
+  initName( tr( "GEOM_ARC" ).toStdString().c_str() ); 
   
 
   ConstructorsClicked( 0 );
@@ -457,18 +459,18 @@ void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId )
   {
     case 0:
     {
-      Group3Pnts->show();
+      ::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->show();
       resize(0, 0);
-      Group3Pnts2->hide();
+      ::qobject_cast<QWidget*>( Group3Pnts2->gridLayout->parent() )->hide();
 
      connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),           SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
       break;
     }
     case 1:
     {
-      Group3Pnts->hide();
+      ::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->hide();
       resize(0, 0);
-      Group3Pnts2->show();
+      ::qobject_cast<QWidget*>( Group3Pnts2->gridLayout->parent() )->show();
       connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),           SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
       break;
index 6a5e732172300f7a5c26987ac7df770c6d0f9d6d..c530ad1e9f6eda10ec2559dfbc7d54170e0795ff 100644 (file)
@@ -44,7 +44,7 @@ class GEOM_BASICGUI_EXPORT BasicGUI_ArcDlg : public GEOMBase_Skeleton
 
 public:
     BasicGUI_ArcDlg( 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 );
     ~BasicGUI_ArcDlg();
 
 protected:
@@ -61,8 +61,8 @@ private :
     int myConstructorId;
     GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
 
-    DlgRef_3Sel_QTD* Group3Pnts;
-    DlgRef_3Sel1Check_QTD* Group3Pnts2;
+    Ui::DlgRef_3Sel_QTD*       Group3Pnts;
+    Ui::DlgRef_3Sel1Check_QTD* Group3Pnts2;
 
 private slots:
     void ClickOnOk();
index ce76529d0e60780c6307c12e861413a55f6c8c56..f42e8cce17440e0d6e2b8a0f083946f74136ad17 100644 (file)
 //  $Header$
 
 #include "BasicGUI_CircleDlg.h"
+#include "DlgRef_2Sel1Spin.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"
-
 //=================================================================================
 // class    : BasicGUI_CircleDlg()
 // purpose  : Constructs a BasicGUI_CircleDlg which is a child of 'parent', with the 
 //            TRUE to construct a modal dialog.
 //=================================================================================
 BasicGUI_CircleDlg::BasicGUI_CircleDlg(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_CIRCLE_PV")));
   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PNTS")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
 
-  setCaption(tr("GEOM_CIRCLE_TITLE"));
+  setWindowTitle(tr("GEOM_CIRCLE_TITLE"));
 
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_CIRCLE"));
-  RadioButton1->setPixmap(image0);
-  RadioButton2->setPixmap(image2);
-  RadioButton3->close(TRUE);
+  RadioButton1->setIcon(image0);
+  RadioButton2->setIcon(image2);
+  RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
+  RadioButton3->close();
 
   GroupPntVecR = new DlgRef_2Sel1Spin(this, "GroupPntVecR");
   GroupPntVecR->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
@@ -69,27 +70,31 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* par
   GroupPntVecR->TextLabel1->setText(tr("GEOM_CENTER_POINT"));
   GroupPntVecR->TextLabel2->setText(tr("GEOM_VECTOR"));
   GroupPntVecR->TextLabel3->setText(tr("GEOM_RADIUS"));
-  GroupPntVecR->PushButton1->setPixmap(image1);
-  GroupPntVecR->PushButton2->setPixmap(image1);
+  GroupPntVecR->PushButton1->setIcon(image1);
+  GroupPntVecR->PushButton2->setIcon(image1);
 
   GroupPntVecR->LineEdit1->setReadOnly( true );
   GroupPntVecR->LineEdit2->setReadOnly( true );
 
-  Group3Pnts = new DlgRef_3Sel_QTD(this, "Group3Pnts");
+  Group3Pnts = new Ui::DlgRef_3Sel_QTD();
+  QWidget* aGroup3PntsWidget = new QWidget(this);
+  Group3Pnts->setupUi(aGroup3PntsWidget);
+  aGroup3PntsWidget->setObjectName("Group3Pnts");
+
   Group3Pnts->GroupBox1->setTitle(tr("GEOM_3_POINTS"));
   Group3Pnts->TextLabel1->setText(tr("GEOM_POINT1"));
   Group3Pnts->TextLabel2->setText(tr("GEOM_POINT2"));
   Group3Pnts->TextLabel3->setText(tr("GEOM_POINT3"));
-  Group3Pnts->PushButton1->setPixmap(image1);
-  Group3Pnts->PushButton2->setPixmap(image1);
-  Group3Pnts->PushButton3->setPixmap(image1);
+  Group3Pnts->PushButton1->setIcon(image1);
+  Group3Pnts->PushButton2->setIcon(image1);
+  Group3Pnts->PushButton3->setIcon(image1);
 
   Group3Pnts->LineEdit1->setReadOnly( true );
   Group3Pnts->LineEdit2->setReadOnly( true );
   Group3Pnts->LineEdit3->setReadOnly( true );
 
-  Layout1->addWidget( GroupPntVecR, 2, 0 );
-  Layout1->addWidget( Group3Pnts, 2, 0 );
+  gridLayout1->addWidget( GroupPntVecR, 2, 0 );
+  gridLayout1->addWidget( aGroup3PntsWidget, 2, 0 );
   /***************************************************************/
 
   setHelpFileName("circle.htm");
@@ -152,9 +157,9 @@ void BasicGUI_CircleDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
 
-  initName( tr( "GEOM_CIRCLE" ) );
+  initName( tr( "GEOM_CIRCLE" ).toStdString().c_str() );
 
-  Group3Pnts->hide();
+  ::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->hide();
   ConstructorsClicked( 0 );
 }
 
@@ -171,7 +176,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
   {
     case 0:
       {
-       Group3Pnts->hide();
+       ::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->hide();
        resize(0, 0);
        GroupPntVecR->show();
        
@@ -184,7 +189,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
     {
       GroupPntVecR->hide();
       resize( 0, 0 );
-      Group3Pnts->show();
+      ::qobject_cast<QWidget*>( Group3Pnts->gridLayout->parent() )->show();
       
       myEditCurrentArgument = Group3Pnts->LineEdit1;
       Group3Pnts->LineEdit1->setText("");
index fb0f51315100ac5efbf3cef90095103b32a15fa6..6d5823fe871a3c45bda25bf7663c9b140fb6d03b 100644 (file)
 #include "GEOM_BasicGUI.hxx"
 
 #include "GEOMBase_Skeleton.h"
-#include "DlgRef_2Sel1Spin.h"
 #include "DlgRef_3Sel_QTD.h"
 
-#include "BasicGUI.h"
+class DlgRef_2Sel1Spin;
 
 //=================================================================================
 // class    : BasicGUI_CircleDlg
@@ -46,7 +45,7 @@ class GEOM_BASICGUI_EXPORT BasicGUI_CircleDlg : public GEOMBase_Skeleton
 
 public:
     BasicGUI_CircleDlg(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);
     ~BasicGUI_CircleDlg();
 
 protected:
@@ -64,8 +63,8 @@ private:
 
     GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3;
 
-    DlgRef_2Sel1Spin* GroupPntVecR;
-    DlgRef_3Sel_QTD*  Group3Pnts;
+    DlgRef_2Sel1Spin*     GroupPntVecR;
+    Ui::DlgRef_3Sel_QTD*  Group3Pnts;
 
 private slots:
     void ClickOnOk();
index 69a25e85765ea0305b347c21b85f45e9e395f699..5ca054c9e638b1766a8f88ad53ea2022bfb0123f 100644 (file)
 
 #include "BasicGUI_CurveDlg.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 "utilities.h"
-
 #include "SALOME_ListIteratorOfListIO.hxx"
 #include "SALOME_ListIO.hxx"
 
@@ -52,9 +51,8 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 BasicGUI_CurveDlg::BasicGUI_CurveDlg(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_POLYLINE")));
   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SPLINE")));
@@ -62,21 +60,25 @@ BasicGUI_CurveDlg::BasicGUI_CurveDlg(GeometryGUI* theGeometryGUI, QWidget* paren
 
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
 
-  setCaption(tr("GEOM_CURVE_TITLE"));
+  setWindowTitle(tr("GEOM_CURVE_TITLE"));
 
   /***************************************************************/
-  RadioButton1->setPixmap( image0 );
-  RadioButton2->setPixmap( image3 );
-  RadioButton3->setPixmap( image2 );
+  RadioButton1->setIcon( image0 );
+  RadioButton2->setIcon( image3 );
+  RadioButton3->setIcon( image2 );
+
+  GroupPoints = new Ui::DlgRef_1Sel_QTD();
+  QWidget* aGroupPointsWidget = new QWidget(this);
+  GroupPoints->setupUi(aGroupPointsWidget);
+  aGroupPointsWidget->setObjectName("GroupPoints");
 
-  GroupPoints = new DlgRef_1Sel_QTD( this, "GroupPoints" );
   GroupPoints->GroupBox1->setTitle( tr( "GEOM_NODES" ) );
   GroupPoints->TextLabel1->setText( tr("GEOM_POINTS") );
-  GroupPoints->PushButton1->setPixmap(image1);
+  GroupPoints->PushButton1->setIcon(image1);
 
   GroupPoints->LineEdit1->setReadOnly( true );
 
-  Layout1->addWidget(GroupPoints, 2, 0);
+  gridLayout1->addWidget(aGroupPointsWidget, 2, 0);
   /***************************************************************/
 
   setHelpFileName("curve.htm");
@@ -123,7 +125,7 @@ void BasicGUI_CurveDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
 
-  initName( tr( "GEOM_CURVE" ) );
+  initName( tr( "GEOM_CURVE" ).toStdString().c_str() );
   ConstructorsClicked( 0 );
 }
 
index 6a1b6fa9b054cab14274291e9aefe0b85a485e57..cd7f765758e0b7b6487d959ca03ea5ad6dd8e6d2 100644 (file)
@@ -32,8 +32,6 @@
 #include "GEOMBase_Skeleton.h"
 #include "DlgRef_1Sel_QTD.h"
 
-#include "BasicGUI.h"
-
 #include <list>
 
 //=================================================================================
@@ -46,7 +44,7 @@ class GEOM_BASICGUI_EXPORT BasicGUI_CurveDlg : public GEOMBase_Skeleton
 
 public:
     BasicGUI_CurveDlg(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);
     ~BasicGUI_CurveDlg();
 
 protected:
@@ -61,7 +59,7 @@ private :
     void Init();
     void enterEvent(QEvent* e);
 
-    DlgRef_1Sel_QTD* GroupPoints;
+    Ui::DlgRef_1Sel_QTD* GroupPoints;
     GEOM::ListOfGO_var myPoints;
     list<GEOM::GEOM_Object_var> myOrderedSel;//!< This list used for managing orderes selection
 
index ba6db7d30a171d68574b0a8b26cdedf6b12a6055..7e85536e06d15f3314b96a694bd8b1a07c5efd30 100644 (file)
 //  $Header$
 
 #include "BasicGUI_EllipseDlg.h"
+#include "DlgRef_2Sel2Spin.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;
 
 //=================================================================================
@@ -48,20 +49,21 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 BasicGUI_EllipseDlg::BasicGUI_EllipseDlg(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_ELLIPSE_PV")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
 
-  setCaption(tr("GEOM_ELLIPSE_TITLE"));
+  setWindowTitle(tr("GEOM_ELLIPSE_TITLE"));
 
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_ELLIPSE"));
-  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_2Sel2Spin(this, "GroupPoints");
   GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
@@ -69,13 +71,13 @@ BasicGUI_EllipseDlg::BasicGUI_EllipseDlg(GeometryGUI* theGeometryGUI, QWidget* p
   GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR"));
   GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS_MAJOR"));
   GroupPoints->TextLabel4->setText(tr("GEOM_RADIUS_MINOR"));
-  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(GroupPoints, 2, 0);
   /***************************************************************/
 
   setHelpFileName("ellipse.htm");
@@ -142,7 +144,7 @@ void BasicGUI_EllipseDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
 
-  initName( tr( "GEOM_ELLIPSE" ) );
+  initName( tr( "GEOM_ELLIPSE" ).toStdString().c_str() );
 }
 
 
index 038700f535cb0acdb85330312800f0e7cde7fab5..6369a7469a6db7e0886edd2110c91d5fd9c4f220 100644 (file)
@@ -30,9 +30,8 @@
 #include "GEOM_BasicGUI.hxx"
 
 #include "GEOMBase_Skeleton.h"
-#include "DlgRef_2Sel2Spin.h"
 
-#include "BasicGUI.h"
+class DlgRef_2Sel2Spin;
 
 //=================================================================================
 // class    : BasicGUI_EllipseDlg
@@ -44,7 +43,7 @@ class GEOM_BASICGUI_EXPORT BasicGUI_EllipseDlg : public GEOMBase_Skeleton
 
 public:
     BasicGUI_EllipseDlg(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);
     ~BasicGUI_EllipseDlg();
 
 protected:
index f71fc7a18fc900f004c2ec11668c26c9d480f491..099bfbeedec98b0687d447db8c4ab20be8bc6145 100644 (file)
 
 #include "BasicGUI_LineDlg.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,32 +48,37 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 BasicGUI_LineDlg::BasicGUI_LineDlg(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_LINE_2P")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM",tr("ICON_SELECT")));
 
-  setCaption(tr("GEOM_LINE_TITLE"));
+  setWindowTitle(tr("GEOM_LINE_TITLE"));
 
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_LINE"));
-  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_POINTS"));
   GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg("1"));
   GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg("2"));
-  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("line.htm");
@@ -123,7 +127,7 @@ void BasicGUI_LineDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
   
-  initName( tr("GEOM_LINE") );
+  initName( tr("GEOM_LINE").toStdString().c_str() );
 }
 
 
index 65eba2b981801028e2943a84a9dea8cd0a4af640..dfa709d7e4f1a0ef2e6032b873e90be20a3f6b19 100644 (file)
@@ -43,7 +43,7 @@ class GEOM_BASICGUI_EXPORT BasicGUI_LineDlg : public GEOMBase_Skeleton
 
 public:
     BasicGUI_LineDlg(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);
     ~BasicGUI_LineDlg();
 
 protected:
@@ -61,7 +61,7 @@ private :
     GEOM::GEOM_Object_var myPoint1;   
     GEOM::GEOM_Object_var myPoint2;
 
-    DlgRef_2Sel_QTD* GroupPoints;
+    Ui::DlgRef_2Sel_QTD* GroupPoints;
     
 private slots:
     void ClickOnOk();
index 99e7ff9a54406434ed32179fefa0dbad00bcbf26..d77a68a95b425d34168f72d2ce98df19d9a7f142 100644 (file)
 #include "BasicGUI_MarkerDlg.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 <QLabel>
 
 #include "GEOMImpl_Types.hxx"
 
-#include "utilities.h"
-
 // OCCT Includes
 #include <BRep_Tool.hxx>
 #include <TopExp.hxx>
 //=================================================================================
 BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* theParent )
   : GEOMBase_Skeleton(theGeometryGUI, theParent, "BasicGUI_MarkerDlg", false,
-                      WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+                      Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
 {
   QPixmap iconCS1   ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER" ) ) );
   QPixmap iconCS2   ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER2" ) ) );
   QPixmap iconCS3   ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER3" ) ) );
   QPixmap iconSelect( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
 
-  setCaption( tr( "CAPTION" ) );
+  setWindowTitle( tr( "CAPTION" ) );
 
   GroupConstructors->setTitle( tr( "LOCALCS" ) );
-  RadioButton1->setPixmap( iconCS1 );
-  RadioButton2->setPixmap( iconCS2 );
-  RadioButton3->setPixmap( iconCS3 );
+  RadioButton1->setIcon( iconCS1 );
+  RadioButton2->setIcon( iconCS2 );
+  RadioButton3->setIcon( iconCS3 );
+
+  Group1 = new Ui::DlgRef_1Sel_QTD();
+  QWidget* aGroup1Widget = new QWidget(this);
+  Group1->setupUi(aGroup1Widget);
+  aGroup1Widget->setObjectName("Group1");
 
-  Group1 = new DlgRef_1Sel_QTD(this, "Group1");
   Group1->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
   Group1->TextLabel1->setText(tr("GEOM_OBJECT"));
-  Group1->PushButton1->setPixmap(iconSelect);
+  Group1->PushButton1->setIcon(iconSelect);
+
+  Group2 = new Ui::DlgRef_3Sel_QTD();
+  QWidget* aGroup2Widget = new QWidget(this);
+  Group2->setupUi(aGroup2Widget);
+  aGroup2Widget->setObjectName("Group2");
 
-  Group2 = new DlgRef_3Sel_QTD(this, "Group2");
   Group2->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
   Group2->TextLabel1->setText(tr("GEOM_POINT"));
   Group2->TextLabel2->setText(tr("XDIR"));
   Group2->TextLabel3->setText(tr("YDIR"));
-  Group2->PushButton1->setPixmap(iconSelect);
-  Group2->PushButton2->setPixmap(iconSelect);
-  Group2->PushButton3->setPixmap(iconSelect);
+  Group2->PushButton1->setIcon(iconSelect);
+  Group2->PushButton2->setIcon(iconSelect);
+  Group2->PushButton3->setIcon(iconSelect);
 
-  aMainGrp = new QGroupBox( 1, Qt::Horizontal, this );
+  aMainGrp = new QFrame( this );
   aMainGrp->setFrameStyle( QFrame::NoFrame );
-  aMainGrp->setInsideMargin( 0 );
+  aMainGrp->setContentsMargins( 0, 0, 0, 0 );
+  QHBoxLayout* aMainGrpLayout = new QHBoxLayout( aMainGrp );
+  
+  QGroupBox* anOriGrp = new QGroupBox( tr( "ORIGIN" ), aMainGrp );
+  QVBoxLayout* anOriGrpLayout = new QVBoxLayout( anOriGrp );
 
-  QGroupBox* anOriGrp = new QGroupBox( 1, Qt::Vertical, tr( "ORIGIN" ), aMainGrp );
-  new QLabel( tr( "GEOM_X" ), anOriGrp );
+  anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), anOriGrp ) );
   myData[ X ] = new DlgRef_SpinBox( anOriGrp );
-  new QLabel( tr( "GEOM_Y" ), anOriGrp );
+  anOriGrpLayout->addWidget( myData[ X ] );
+  anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Y" ), anOriGrp ) );
   myData[ Y ] = new DlgRef_SpinBox( anOriGrp );
-  new QLabel( tr( "GEOM_Z" ), anOriGrp );
+  anOriGrpLayout->addWidget( myData[ Y ] );
+  anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Z" ), anOriGrp ) );
   myData[ Z ] = new DlgRef_SpinBox( anOriGrp );
+  anOriGrpLayout->addWidget( myData[ Z ] );
+
+  aMainGrpLayout->addWidget( anOriGrp );
 
-  QGroupBox* aXAxisGrp = new QGroupBox( 1, Qt::Vertical, tr( "XDIR" ), aMainGrp );
-  new QLabel( tr( "DX" ), aXAxisGrp );
+  QGroupBox* aXAxisGrp = new QGroupBox( tr( "XDIR" ), aMainGrp );
+  QVBoxLayout* aXAxisGrpLayout = new QVBoxLayout( aXAxisGrp );
+
+  aXAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), aXAxisGrp ) );
   myData[ DX1 ] = new DlgRef_SpinBox( aXAxisGrp );
-  new QLabel( tr( "DY" ), aXAxisGrp );
+  aXAxisGrpLayout->addWidget( myData[ DX1 ] );
+  aXAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), aXAxisGrp ) );
   myData[ DY1 ] = new DlgRef_SpinBox( aXAxisGrp );
-  new QLabel( tr( "DZ" ), aXAxisGrp );
+  aXAxisGrpLayout->addWidget( myData[ DY1 ] );
+  aXAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), aXAxisGrp ) );
   myData[ DZ1 ] = new DlgRef_SpinBox( aXAxisGrp );
+  aXAxisGrpLayout->addWidget( myData[ DZ1 ] );
+
+  aMainGrpLayout->addWidget( aXAxisGrp );
 
-  QGroupBox* anYAxisGrp = new QGroupBox( 1, Qt::Vertical, tr( "YDIR" ), aMainGrp );
-  new QLabel( tr( "DX" ), anYAxisGrp );
+  QGroupBox* anYAxisGrp = new QGroupBox( tr( "YDIR" ), aMainGrp );
+  QVBoxLayout* anYAxisGrpLayout = new QVBoxLayout( anYAxisGrp );
+
+  anYAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), anYAxisGrp ) );
   myData[ DX2 ] = new DlgRef_SpinBox( anYAxisGrp );
-  new QLabel( tr( "DY" ), anYAxisGrp );
+  anYAxisGrpLayout->addWidget( myData[ DX2 ] );
+  anYAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), anYAxisGrp ) );
   myData[ DY2 ] = new DlgRef_SpinBox( anYAxisGrp );
-  new QLabel( tr( "DZ" ), anYAxisGrp );
+  anYAxisGrpLayout->addWidget( myData[ DY2 ] );
+  anYAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), anYAxisGrp ) );
   myData[ DZ2 ] = new DlgRef_SpinBox( anYAxisGrp );
+  anYAxisGrpLayout->addWidget( myData[ DZ2 ] );
+
+  aMainGrpLayout->addWidget( anYAxisGrp );
 
-  Layout1->addWidget( aMainGrp, 2, 0 );
-  Layout1->addWidget( Group1, 2, 0 );
-  Layout1->addWidget( Group2, 2, 0 );
+  gridLayout1->addWidget( aMainGrp, 2, 0 );
+  gridLayout1->addWidget( aGroup1Widget, 2, 0 );
+  gridLayout1->addWidget( aGroup2Widget, 2, 0 );
 
   setHelpFileName("local_coordinate_system.htm");
 
@@ -169,21 +200,21 @@ void BasicGUI_MarkerDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
           SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) );
 
-  initName( tr( "LCS_NAME" ) );
+  initName( tr( "LCS_NAME" ).toStdString().c_str() );
 
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
   double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
 
   for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
   {
-    anIter.data()->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, 3 );
-    connect( anIter.data(), SIGNAL( valueChanged( double ) ),
+    anIter.value()->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, 3 );
+    connect( anIter.value(), SIGNAL( valueChanged( double ) ),
              this, SLOT( onValueChanged( double ) ) );
   }
 
   myBlockPreview = true;
   for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
-    anIter.data()->SetValue( 0 );
+    anIter.value()->SetValue( 0 );
   myData[ DX1 ]->SetValue( 1 );
   myData[ DY2 ]->SetValue( 1 );
   myBlockPreview = false;
@@ -231,8 +262,8 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
     {
     case 0:
     {
-      Group1->hide();
-      Group2->hide();
+      ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->hide();
+      ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
       resize(0, 0);
       aMainGrp->show();
       localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
@@ -241,10 +272,10 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
     }
     case 1:
       {
-       Group2->hide();
+       ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
        aMainGrp->hide();
        //PAL6669: resize(0, 0);
-       Group1->show();
+       ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->show();
 
        globalSelection( GEOM_ALLGEOM );
        myEditCurrentArgument = Group1->LineEdit1;
@@ -254,9 +285,9 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
     case 2:
       {
        aMainGrp->hide();
-       Group1->show();
+       ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->show();
        //PAL6669: resize(0, 0);
-       Group2->show();
+       ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->show();
 
        globalSelection( GEOM_POINT );
        myEditCurrentArgument = Group2->LineEdit1;
index 7ba75b60b52fa548a15b4179ceb1136ede81e237..897f9e85a609ec3b2ff4b510eefde3ec27ac5d0d 100644 (file)
@@ -34,7 +34,7 @@
 #include "DlgRef_1Sel_QTD.h"
 #include "DlgRef_3Sel_QTD.h"
 
-#include <qmap.h>
+#include <QMap>
 
 class DlgRef_SpinBox;
 
@@ -82,9 +82,9 @@ private:
   int                           myConstructorId;
   int                           myBlockPreview;
 
-  QGroupBox*                    aMainGrp;
-  DlgRef_1Sel_QTD*              Group1;
-  DlgRef_3Sel_QTD*              Group2;
+  QFrame*                       aMainGrp;
+  Ui::DlgRef_1Sel_QTD*          Group1;
+  Ui::DlgRef_3Sel_QTD*          Group2;
 
 };
 
index a48162902d3307fbe105b1da8552bcfc92f6836c..6db4f8a9a3d94375a7456461eea83241c49da475 100644 (file)
 //  $Header$
 
 #include "BasicGUI_PlaneDlg.h"
+#include "DlgRef_1Sel1Spin.h"
+#include "DlgRef_2Sel1Spin.h"
+#include "DlgRef_3Sel1Spin.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 <TColStd_MapOfInteger.hxx>
 
-#include <qlabel.h>
-
 #include "GEOMImpl_Types.hxx"
 
 using namespace std;
@@ -49,30 +54,29 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(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_PLANE_PV")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_PLANE_3PNTS")));
   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_PLANE_FACE")));
   QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
 
-  setCaption(tr("GEOM_PLANE_TITLE"));
+  setWindowTitle(tr("GEOM_PLANE_TITLE"));
 
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_PLANE"));
-  RadioButton1->setPixmap(image0);
-  RadioButton2->setPixmap(image1);
-  RadioButton3->setPixmap(image2);
+  RadioButton1->setIcon(image0);
+  RadioButton2->setIcon(image1);
+  RadioButton3->setIcon(image2);
 
   GroupPntDir = new DlgRef_2Sel1Spin(this, "GroupPointDirection");
   GroupPntDir->GroupBox1->setTitle(tr("GEOM_PLANE_PV"));
   GroupPntDir->TextLabel1->setText(tr("GEOM_POINT"));
   GroupPntDir->TextLabel2->setText(tr("GEOM_VECTOR"));
   GroupPntDir->TextLabel3->setText(tr("GEOM_PLANE_SIZE"));
-  GroupPntDir->PushButton1->setPixmap(image3);
-  GroupPntDir->PushButton2->setPixmap(image3);
+  GroupPntDir->PushButton1->setIcon(image3);
+  GroupPntDir->PushButton2->setIcon(image3);
   GroupPntDir->LineEdit1->setReadOnly( true );
   GroupPntDir->LineEdit2->setReadOnly( true );
 
@@ -82,9 +86,9 @@ BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(GeometryGUI* theGeometryGUI, QWidget* paren
   Group3Pnts->TextLabel2->setText(tr("GEOM_POINT2"));
   Group3Pnts->TextLabel3->setText(tr("GEOM_POINT3"));
   Group3Pnts->TextLabel4->setText(tr("GEOM_PLANE_SIZE"));
-  Group3Pnts->PushButton1->setPixmap(image3);
-  Group3Pnts->PushButton2->setPixmap(image3);
-  Group3Pnts->PushButton3->setPixmap(image3);
+  Group3Pnts->PushButton1->setIcon(image3);
+  Group3Pnts->PushButton2->setIcon(image3);
+  Group3Pnts->PushButton3->setIcon(image3);
 
   Group3Pnts->LineEdit1->setReadOnly( true );
   Group3Pnts->LineEdit2->setReadOnly( true );
@@ -94,13 +98,13 @@ BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(GeometryGUI* theGeometryGUI, QWidget* paren
   GroupFace->GroupBox1->setTitle(tr("GEOM_FACE_OR_LCS"));
   GroupFace->TextLabel1->setText(tr("GEOM_SELECTION"));
   GroupFace->TextLabel2->setText(tr("GEOM_PLANE_SIZE"));
-  GroupFace->PushButton1->setPixmap(image3);
+  GroupFace->PushButton1->setIcon(image3);
 
   GroupFace->LineEdit1->setReadOnly( true );
 
-  Layout1->addWidget(GroupPntDir, 2, 0);
-  Layout1->addWidget(Group3Pnts, 2, 0);
-  Layout1->addWidget(GroupFace, 2, 0);
+  gridLayout1->addWidget(GroupPntDir, 2, 0);
+  gridLayout1->addWidget(Group3Pnts, 2, 0);
+  gridLayout1->addWidget(GroupFace, 2, 0);
   /***************************************************************/
 
   setHelpFileName("plane.htm");
@@ -178,7 +182,7 @@ void BasicGUI_PlaneDlg::Init()
 
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
-  initName( tr( "GEOM_PLANE" ) );
+  initName( tr( "GEOM_PLANE" ).toStdString().c_str() );
 
   Group3Pnts->hide();
   GroupFace->hide();
index 05e8c69ecbb7e08f12dbd28c5b7ca0a9acca4337..aadf477a7bc89e23d3c8edf2ffef32117d55595b 100644 (file)
 #include "GEOM_BasicGUI.hxx"
 
 #include "GEOMBase_Skeleton.h"
-#include "DlgRef_1Sel1Spin.h"
-#include "DlgRef_2Sel1Spin.h"
-#include "DlgRef_3Sel1Spin.h"
+
+class DlgRef_1Sel1Spin;
+class DlgRef_2Sel1Spin;
+class DlgRef_3Sel1Spin;
 
 //=================================================================================
 // class    : BasicGUI_PlaneDlg
@@ -45,7 +46,7 @@ class GEOM_BASICGUI_EXPORT BasicGUI_PlaneDlg : public GEOMBase_Skeleton
 
 public:
     BasicGUI_PlaneDlg( 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);
     ~BasicGUI_PlaneDlg();
 
 protected:
index 16b642130b87f0c34d9dfe781022cc60dd178bf1..abc0b4193f220cbbf38d8a5b54b0039c1d3c8ca3 100644 (file)
 
 #include "BasicGUI_PointDlg.h"
 
+#include "SUIT_ResourceMgr.h"
 #include "SUIT_Session.h"
 #include "SalomeApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 
-#include "GEOMImpl_Types.hxx"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+
+#include "DlgRef_SpinBox.h"
+#include "DlgRef_1Sel1Spin.h"
+#include "DlgRef_3Spin.h"
+#include "DlgRef_1Sel3Spin.h"
 
-#include <qlabel.h>
+#include "GEOMImpl_Types.hxx"
 
-#include "utilities.h"
+#include <QApplication>
+#include <QLabel>
 
 #include <gp_Pnt.hxx>
 #include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
 #include <TopAbs_ShapeEnum.hxx>
 #include <TopoDS.hxx>
 #include <BRep_Tool.hxx>
@@ -48,7 +55,6 @@
 #include <TColStd_IndexedMapOfInteger.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
 
-#include <qapplication.h>
 using namespace std;
 //=================================================================================
 // class    : BasicGUI_PointDlg()
@@ -58,7 +64,7 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 BasicGUI_PointDlg::BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
-                                     const char* name, bool modal, WFlags fl)
+                                     const char* name, bool modal, Qt::WindowFlags fl)
   :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, fl )
 {
   QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_POINT")));
@@ -66,48 +72,56 @@ BasicGUI_PointDlg::BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* paren
   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
   QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_POINT_REF")));
 
-  setCaption(tr("GEOM_POINT_TITLE"));
+  setWindowTitle(tr("GEOM_POINT_TITLE"));
 
-  QGroupBox* aFrame = new QGroupBox( 1, Qt::Horizontal, this );
-  aFrame->setInsideMargin( 0 );
+  QFrame* aFrame = new QFrame( this );
+  aFrame->setContentsMargins( 0, 0, 0, 0 );
   aFrame->setFrameStyle( QFrame::NoFrame );
-
+  QHBoxLayout* aFrameLayout = new QHBoxLayout( aFrame );
+  
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_POINTS"));
-  RadioButton1->setPixmap(image0);
-  RadioButton2->setPixmap(image3);
-  RadioButton3->setPixmap(image1);
+  RadioButton1->setIcon(image0);
+  RadioButton2->setIcon(image3);
+  RadioButton3->setIcon(image1);
 
   GroupXYZ = new DlgRef_3Spin( aFrame, "GroupXYZ" );
   GroupXYZ->GroupBox1->setTitle(tr("GEOM_COORDINATES"));
   GroupXYZ->TextLabel1->setText(tr("GEOM_X"));
   GroupXYZ->TextLabel2->setText(tr("GEOM_Y"));
   GroupXYZ->TextLabel3->setText(tr("GEOM_Z"));
+  aFrameLayout->addWidget(GroupXYZ);
 
   GroupOnCurve = new DlgRef_1Sel1Spin( aFrame, "GroupOnCurve" );
   GroupOnCurve->GroupBox1->setTitle(tr("GEOM_PARAM_POINT"));
   GroupOnCurve->TextLabel1->setText(tr("GEOM_EDGE"));
   GroupOnCurve->TextLabel2->setText(tr("GEOM_PARAMETER"));
-  GroupOnCurve->PushButton1->setPixmap(image2);
+  GroupOnCurve->PushButton1->setIcon(image2);
+  aFrameLayout->addWidget(GroupOnCurve);
 
   GroupRefPoint = new DlgRef_1Sel3Spin( aFrame, "GoupRefPoint" );
   GroupRefPoint->GroupBox1->setTitle(tr("GEOM_REF_POINT"));
   GroupRefPoint->TextLabel1->setText(tr("GEOM_POINT"));
-  GroupRefPoint->PushButton1->setPixmap(image2);
+  GroupRefPoint->PushButton1->setIcon(image2);
   GroupRefPoint->TextLabel2->setText(tr("GEOM_DX"));
   GroupRefPoint->TextLabel3->setText(tr("GEOM_DY"));
   GroupRefPoint->TextLabel4->setText(tr("GEOM_DZ"));
+  aFrameLayout->addWidget(GroupRefPoint);
 
-  Layout1->addWidget( aFrame, 2, 0 );
+  gridLayout1->addWidget( aFrame, 2, 0 );
   /***************************************************************/
 
-  myCoordGrp = new QGroupBox( 2, Qt::Horizontal, tr( "GEOM_COORDINATES" ), aFrame );
-  new QLabel( tr( "GEOM_X" ), myCoordGrp );
+  myCoordGrp = new QGroupBox( tr( "GEOM_COORDINATES" ), aFrame );
+  QGridLayout* myCoordGrpLayout = new QGridLayout( myCoordGrp );
+  myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), myCoordGrp ), 0, 0 );
   myX = new QLineEdit( myCoordGrp );
-  new QLabel( tr( "GEOM_Y" ), myCoordGrp );
+  myCoordGrpLayout->addWidget( myX, 0, 1 );
+  myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_Y" ), myCoordGrp ), 1, 0 );
   myY = new QLineEdit( myCoordGrp );
-  new QLabel( tr( "GEOM_Z" ), myCoordGrp );
+  myCoordGrpLayout->addWidget( myY, 1, 1 );
+  myCoordGrpLayout->addWidget( new QLabel( tr( "GEOM_Z" ), myCoordGrp ), 2, 0 );
   myZ = new QLineEdit( myCoordGrp );
+  myCoordGrpLayout->addWidget( myZ, 2, 1 );
 
   myX->setReadOnly( true );
   myY->setReadOnly( true );
@@ -118,7 +132,7 @@ BasicGUI_PointDlg::BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* paren
   myZ->setEnabled( false );
 
   QPalette aPal = myX->palette();
-  aPal.setColor( QPalette::Disabled, QColorGroup::Text, QColor( 0, 0, 0 ) ) ;
+  aPal.setColor( QPalette::Disabled, QPalette::Text, QColor( 0, 0, 0 ) ) ;
   myX->setPalette( aPal );
   myY->setPalette( aPal );
   myZ->setPalette( aPal );
@@ -206,7 +220,7 @@ void BasicGUI_PointDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));  
   
-  initName( tr("GEOM_VERTEX") );
+  initName( tr("GEOM_VERTEX").toStdString().c_str() );
   
   ConstructorsClicked( 0 );
 }
index 5d9e7cd7f3d5851e75c41eb2a17317ed97aae076..b6dded3804d5e15d259d6944a3d9fce52722e7f1 100644 (file)
 #include "GEOM_BasicGUI.hxx"
 
 #include "GEOMBase_Skeleton.h"
-#include "DlgRef_1Sel1Spin.h"
-#include "DlgRef_3Spin.h"
-#include "DlgRef_1Sel3Spin.h"
+
+class DlgRef_1Sel1Spin;
+class DlgRef_3Spin;
+class DlgRef_1Sel3Spin;
 
 class QLineEdit;
 class QGroupBox;
 
+class gp_Pnt;
+
 //=================================================================================
 // class    : BasicGUI_PointDlg
 // purpose  :
@@ -48,7 +51,7 @@ class GEOM_BASICGUI_EXPORT BasicGUI_PointDlg : public GEOMBase_Skeleton
 
 public:
     BasicGUI_PointDlg(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);
 
     ~BasicGUI_PointDlg();
 
index 48fb526cda7259e7f481418c0c284f4ae153136c..c8acfeb52393c04a4ede01031700fdbf10441786 100644 (file)
 //  $Header$
 
 #include "BasicGUI_VectorDlg.h"
+#include "DlgRef_3Spin1Check.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,27 +50,32 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 BasicGUI_VectorDlg::BasicGUI_VectorDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
-                                       const char* name, bool modal, WFlags fl)
+                                       const char* name, bool modal, Qt::WindowFlags fl)
   :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, fl)
 {
   QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_VECTOR_2P")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_VECTOR_DXYZ")));
   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
 
-  setCaption(tr("GEOM_VECTOR_TITLE"));
+  setWindowTitle(tr("GEOM_VECTOR_TITLE"));
 
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_VECTOR"));
-  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_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);
 
   GroupPoints->LineEdit1->setReadOnly( true );
   GroupPoints->LineEdit2->setReadOnly( true );
@@ -81,8 +87,8 @@ BasicGUI_VectorDlg::BasicGUI_VectorDlg(GeometryGUI* theGeometryGUI, QWidget* par
   GroupDimensions->TextLabel3->setText(tr("GEOM_DZ"));
   GroupDimensions->CheckBox1->setText(tr("GEOM_REVERSE_VECTOR"));
 
-  Layout1->addWidget(GroupPoints, 2, 0);
-  Layout1->addWidget(GroupDimensions, 2, 0);
+  gridLayout1->addWidget(aGroupPointsWidget, 2, 0);
+  gridLayout1->addWidget(GroupDimensions, 2, 0);
   /***************************************************************/
 
   setHelpFileName("vector.htm");
@@ -157,7 +163,7 @@ void BasicGUI_VectorDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
-  initName( tr("GEOM_VECTOR") );
+  initName( tr("GEOM_VECTOR").toStdString().c_str() );
 
   GroupDimensions->hide();
   ConstructorsClicked( 0 );
@@ -180,7 +186,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId )
       {
        GroupDimensions->hide();
        resize(0, 0);
-       GroupPoints->show();
+       ::qobject_cast<QWidget*>( GroupPoints->gridLayout->parent() )->show();
 
        myEditCurrentArgument = GroupPoints->LineEdit1;
        GroupPoints->LineEdit1->setText("");
@@ -193,7 +199,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId )
       }
     case 1:
       {
-       GroupPoints->hide();
+       ::qobject_cast<QWidget*>( GroupPoints->gridLayout->parent() )->hide();
        resize( 0, 0 );
        GroupDimensions->show();
        
index a9dcb51b8cdcc17e9795dc096d94d4420f9c45ba..fd444db37eb38ab7da09b1d93959b9306efc983f 100644 (file)
@@ -32,9 +32,8 @@
 
 #include "GEOMBase_Skeleton.h"
 #include "DlgRef_2Sel_QTD.h"
-#include "DlgRef_3Spin1Check.h"
 
-#include "BasicGUI.h"
+class DlgRef_3Spin1Check;
 
 //=================================================================================
 // class    : BasicGUI_VectorDlg
@@ -46,7 +45,7 @@ class GEOM_BASICGUI_EXPORT BasicGUI_VectorDlg : public GEOMBase_Skeleton
 
 public:
     BasicGUI_VectorDlg(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);
     ~BasicGUI_VectorDlg();
 
 protected:
@@ -62,8 +61,8 @@ private :
     GEOM::GEOM_Object_var myPoint1;   
     GEOM::GEOM_Object_var myPoint2;
 
-    DlgRef_2Sel_QTD* GroupPoints;
-    DlgRef_3Spin1Check* GroupDimensions;
+    Ui::DlgRef_2Sel_QTD* GroupPoints;
+    DlgRef_3Spin1Check*  GroupDimensions;
 
 private slots:
     void ClickOnOk();
index 97a7421c27820464c1965c5628998f83271ed981..35eba3f63964ac6c51288b762705973fe815ed3e 100644 (file)
 
 #include "BasicGUI_WorkingPlaneDlg.h"
 
+#include "GeometryGUI.h"
 #include "GEOMBase.h"
 
-#include "SUIT_Desktop.h"
+#include "SUIT_ResourceMgr.h"
 #include "SUIT_Session.h"
 #include "SalomeApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 
 // OCCT Includes
 #include <BRep_Tool.hxx>
-#include <TopoDS.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <TopExp.hxx>
@@ -45,8 +45,7 @@
 #include <TColStd_MapOfInteger.hxx>
 
 // QT Includes
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <QCheckBox>
 
 #include "GEOMImpl_Types.hxx"
 
@@ -60,57 +59,70 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg(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_SELECT")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_WPLANE_FACE")));
   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_WPLANE_VECTOR")));
   QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_WPLANE_ORIGIN")));
 
-  setCaption(tr("GEOM_WPLANE_TITLE"));
+  setWindowTitle(tr("GEOM_WPLANE_TITLE"));
 
   /***************************************************************/
   GroupConstructors->setTitle(tr("GEOM_WPLANE"));
-  RadioButton1->setPixmap(image1);
-  RadioButton2->setPixmap(image2);
-  RadioButton3->setPixmap(image3);
+  RadioButton1->setIcon(image1);
+  RadioButton2->setIcon(image2);
+  RadioButton3->setIcon(image3);
+
+  Group1 = new Ui::DlgRef_1Sel_QTD();
+  QWidget* aGroup1Widget = new QWidget(this);
+  Group1->setupUi(aGroup1Widget);
+  aGroup1Widget->setObjectName("Group1");
 
-  Group1 = new DlgRef_1Sel_QTD(this, "Group1");
   Group1->GroupBox1->setTitle(tr("GEOM_WPLANE_FACE"));
   Group1->TextLabel1->setText(tr("GEOM_SELECTION"));
-  Group1->PushButton1->setPixmap(image0);
+  Group1->PushButton1->setIcon(image0);
   Group1->LineEdit1->setReadOnly( true );
 
-  Group2 = new DlgRef_2Sel_QTD(this, "Group2");
+  Group2 = new Ui::DlgRef_2Sel_QTD();
+  QWidget* aGroup2Widget = new QWidget(this);
+  Group2->setupUi(aGroup2Widget);
+  aGroup2Widget->setObjectName("Group2");
+
   Group2->GroupBox1->setTitle(tr("GEOM_WPLANE_VECTOR"));
   Group2->TextLabel1->setText(tr("GEOM_WPLANE_VX"));
   Group2->TextLabel2->setText(tr("GEOM_WPLANE_VZ"));
-  Group2->PushButton1->setPixmap(image0);
-  Group2->PushButton2->setPixmap(image0);
+  Group2->PushButton1->setIcon(image0);
+  Group2->PushButton2->setIcon(image0);
   Group2->LineEdit1->setReadOnly( true );
   Group2->LineEdit2->setReadOnly( true );
 
-  Group3 = new DlgRef_3Check_QTD(this, "Group3");
+  Group3 = new Ui::DlgRef_3Check_QTD();
+  QWidget* aGroup3Widget = new QWidget(this);
+  Group3->setupUi(aGroup3Widget);
+  aGroup3Widget->setObjectName("Group3");
+
   Group3->GroupBox1->setTitle(tr("GEOM_WPLANE_ORIGIN"));
   Group3->RadioButton1->setText(tr("GEOM_WPLANE_OXY"));
   Group3->RadioButton2->setText(tr("GEOM_WPLANE_OYZ"));
   Group3->RadioButton3->setText(tr("GEOM_WPLANE_OZX"));
 
-  Layout1->addWidget(Group1, 1, 0);
-  Layout1->addWidget(Group2, 1, 0);
-  Layout1->addWidget(Group3, 1, 0);
+  gridLayout1->addWidget(aGroup1Widget, 1, 0);
+  gridLayout1->addWidget(aGroup2Widget, 1, 0);
+  gridLayout1->addWidget(aGroup3Widget, 1, 0);
   /***************************************************************/
-  QGroupBox* aReverseGroupBox = new QGroupBox(this, "aReverseGroupBox");
-  aReverseGroupBox->setTitle(tr(""));
-  aReverseGroupBox->setColumnLayout(1, Qt::Horizontal);
-  aReverseGroupBox->setInsideMargin(10);
-  
-  myReverseCB = new QCheckBox(aReverseGroupBox, "myReverseCB");
+  QFrame* aReverseGroupBox = new QFrame(this);
+  aReverseGroupBox->setObjectName("aReverseGroupBox");
+  aReverseGroupBox->setContentsMargins(10, 10, 10, 10);
+  QHBoxLayout* aReverseGroupBoxLayout = new QHBoxLayout( aReverseGroupBox );
+    
+  myReverseCB = new QCheckBox(aReverseGroupBox);
+  myReverseCB->setObjectName("myReverseCB");
   myReverseCB->setText(tr("GEOM_REVERSE_PLANE"));
+  aReverseGroupBoxLayout->addWidget(myReverseCB);
     
-  Layout1->addWidget(aReverseGroupBox, 2, 0);
+  gridLayout1->addWidget(aReverseGroupBox, 2, 0);
   
 
   setHelpFileName("working_plane.htm");
@@ -171,7 +183,7 @@ void BasicGUI_WorkingPlaneDlg::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
-  initName( tr( "GEOM_WPLANE" ) );
+  initName( tr( "GEOM_WPLANE" ).toStdString().c_str() );
   ConstructorsClicked(0);
 }
 
@@ -195,10 +207,10 @@ void BasicGUI_WorkingPlaneDlg::ConstructorsClicked(int constructorId)
         aMap.Add( GEOM_MARKER );
         globalSelection( aMap );
 
-        Group2->hide();
-        Group3->hide();
+        ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
+        ::qobject_cast<QWidget*>( Group3->gridLayout->parent() )->hide();
         resize(0, 0);
-        Group1->show();
+        ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->show();
 
         myEditCurrentArgument = Group1->LineEdit1;
         Group1->LineEdit1->setText("");
@@ -211,10 +223,10 @@ void BasicGUI_WorkingPlaneDlg::ConstructorsClicked(int constructorId)
       {
         globalSelection( GEOM_LINE );
 
-        Group1->hide();
-        Group3->hide();
+        ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->hide();
+        ::qobject_cast<QWidget*>( Group3->gridLayout->parent() )->hide();
         resize(0, 0);
-        Group2->show();
+        ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->show();
 
         myEditCurrentArgument = Group2->LineEdit1;
         Group2->LineEdit1->setText("");
@@ -227,10 +239,10 @@ void BasicGUI_WorkingPlaneDlg::ConstructorsClicked(int constructorId)
       }
     case 2:
       {
-        Group1->hide();
-        Group2->hide();
+        ::qobject_cast<QWidget*>( Group1->gridLayout->parent() )->hide();
+        ::qobject_cast<QWidget*>( Group2->gridLayout->parent() )->hide();
         resize(0, 0);
-        Group3->show();
+        ::qobject_cast<QWidget*>( Group3->gridLayout->parent() )->show();
 
         Group3->RadioButton1->setChecked(true);
         aOriginType = 1;
index 40cddf74307d1b751fb9b03f0f0737baafdda803..da6d6ad03417d213475c4035a6dbad796046e35a 100644 (file)
@@ -35,6 +35,8 @@
 #include "DlgRef_2Sel_QTD.h"
 #include "DlgRef_3Check_QTD.h"
 
+#include <gp_Ax3.hxx>
+
 class QCheckBox;
 
 //=================================================================================
@@ -47,7 +49,7 @@ class GEOM_BASICGUI_EXPORT BasicGUI_WorkingPlaneDlg : public GEOMBase_Skeleton
 
 public:
     BasicGUI_WorkingPlaneDlg( 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 );
     ~BasicGUI_WorkingPlaneDlg();
     virtual void closeEvent( QCloseEvent* e );
 
@@ -63,9 +65,9 @@ private:
 
     int aOriginType;
 
-    DlgRef_1Sel_QTD* Group1;
-    DlgRef_2Sel_QTD* Group2;
-    DlgRef_3Check_QTD* Group3;
+    Ui::DlgRef_1Sel_QTD* Group1;
+    Ui::DlgRef_2Sel_QTD* Group2;
+    Ui::DlgRef_3Check_QTD* Group3;
 
     QCheckBox* myReverseCB;
 
index 8f127780179cd14100f814c4f15e3aab957d2b26..fcc1d260e50c11a1f0c276d4c92d2f09a2037808 100644 (file)
@@ -26,7 +26,7 @@ SUBDIRS += GEOMGUI
 SUBDIRS += GEOMBase
 SUBDIRS += GEOMToolsGUI
 SUBDIRS += DisplayGUI
-#SUBDIRS += BasicGUI
+SUBDIRS += BasicGUI
 #SUBDIRS += PrimitiveGUI
 #SUBDIRS += GenerationGUI
 #SUBDIRS += EntityGUI