]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Porting to Qt4.
authormkr <mkr@opencascade.com>
Tue, 10 Jul 2007 12:49:13 +0000 (12:49 +0000)
committermkr <mkr@opencascade.com>
Tue, 10 Jul 2007 12:49:13 +0000 (12:49 +0000)
src/BooleanGUI/BooleanGUI.pro [new file with mode: 0644]
src/BooleanGUI/BooleanGUI_Dialog.cxx
src/BooleanGUI/BooleanGUI_Dialog.h
src/src.pro

diff --git a/src/BooleanGUI/BooleanGUI.pro b/src/BooleanGUI/BooleanGUI.pro
new file mode 100644 (file)
index 0000000..3d92347
--- /dev/null
@@ -0,0 +1,40 @@
+TEMPLATE = lib
+TARGET = BuildGUI
+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 -lGEOMBase
+
+CONFIG -= debug release debug_and_release
+CONFIG += qt thread debug dll shared
+
+win32:DEFINES += WIN32 
+DEFINES += BOOLEANGUI_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  = BooleanGUI.cxx
+SOURCES += BooleanGUI_Dialog.cxx
+
+includes.files = $$HEADERS
+includes.path = ../../include
+
+INSTALLS += includes
index b777cddd43472d82efc6c0b25f5fa4edf0560c21..df4cdde3606794a03da4827acdbde69b94caea38 100644 (file)
 //  $Header$
 
 #include "BooleanGUI_Dialog.h"
-#include "BooleanGUI.h"
-#include "DlgRef_2Sel_QTD.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>
-
 using namespace std;
 
 //=================================================================================
@@ -46,7 +46,7 @@ using namespace std;
 //            TRUE to construct a modal dialog.
 //=================================================================================
 BooleanGUI_Dialog::BooleanGUI_Dialog( const int theOperation, GeometryGUI* theGeometryGUI,
-                                      QWidget* parent, const char* name, bool modal, WFlags fl)
+                                      QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
   :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, fl),
    myOperation( theOperation )
 {
@@ -60,36 +60,42 @@ BooleanGUI_Dialog::BooleanGUI_Dialog( const int theOperation, GeometryGUI* theGe
                        aCaption = tr("GEOM_COMMON_TITLE");
                        setHelpFileName("common.htm");
                        break;
-               case BooleanGUI::CUT:
+        case BooleanGUI::CUT:
          image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CUT")));
                        aTitle = tr("GEOM_CUT");
                        aCaption = tr("GEOM_CUT_TITLE");
                        setHelpFileName("cut.htm");
                        break;
-               case BooleanGUI::FUSE:
+       case BooleanGUI::FUSE:
          image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_FUSE")));
                        aTitle = tr("GEOM_FUSE");
                        aCaption = tr("GEOM_FUSE_TITLE");
                        setHelpFileName("fuse.htm");
                        break;
-               case BooleanGUI::SECTION:
+       case BooleanGUI::SECTION:
          image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SECTION")));
                        aTitle = tr("GEOM_SECTION");
                        aCaption = tr("GEOM_SECTION_TITLE");
                        setHelpFileName("section.htm");
                        break;
-       }
+  }
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
 
-  setCaption( aCaption );
+  setWindowTitle( aCaption );
 
   /***************************************************************/
   GroupConstructors->setTitle( aTitle );
-  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();
+
+  myGroup = new Ui::DlgRef_2Sel_QTD();
+  QWidget* aMyGroupWidget = new QWidget(this);
+  myGroup->setupUi(aMyGroupWidget);
+  aMyGroupWidget->setObjectName("GroupCommon");
 
-  myGroup = new DlgRef_2Sel_QTD(this, "GroupCommon");
   myGroup->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
   if ( myOperation != BooleanGUI::CUT )
   {
@@ -102,12 +108,12 @@ BooleanGUI_Dialog::BooleanGUI_Dialog( const int theOperation, GeometryGUI* theGe
        myGroup->TextLabel2->setText(tr("GEOM_TOOL_OBJECT"));
   }
   
-  myGroup->PushButton1->setPixmap(image1);
-  myGroup->PushButton2->setPixmap(image1);
+  myGroup->PushButton1->setIcon(image1);
+  myGroup->PushButton2->setIcon(image1);
   myGroup->LineEdit1->setReadOnly( true );
   myGroup->LineEdit2->setReadOnly( true );
 
-  Layout1->addWidget(myGroup, 2, 0);
+  gridLayout1->addWidget(aMyGroupWidget, 2, 0);
   /***************************************************************/
 
   /* Initialisation */
@@ -146,7 +152,7 @@ void BooleanGUI_Dialog::Init()
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
 
-  initName( GroupConstructors->title() );
+  initName( GroupConstructors->title().toStdString().c_str() );
 
   globalSelection( GEOM_ALLSHAPES );
 }
index e42fd2be241e4d639237eecd985ab312b38dc9e0..71fa365285e60f3c01e6e26b71d0552ad4a3787b 100644 (file)
@@ -31,8 +31,7 @@
 #include "BooleanGUI.h" //for wnt defines
 
 #include "GEOMBase_Skeleton.h"
-
-class DlgRef_2Sel_QTD;
+#include "DlgRef_2Sel_QTD.h"
 
 //=================================================================================
 // class    : BooleanGUI_Dialog
@@ -44,7 +43,7 @@ class GEOM_BOOLEANGUI_EXPORT BooleanGUI_Dialog : public GEOMBase_Skeleton
 
 public:
     BooleanGUI_Dialog( const int theOperation, 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);
     ~BooleanGUI_Dialog();
 
 protected:
@@ -62,7 +61,7 @@ private:
     GEOM::GEOM_Object_var myObject1;
     GEOM::GEOM_Object_var myObject2;
 
-    DlgRef_2Sel_QTD* myGroup;
+    Ui::DlgRef_2Sel_QTD* myGroup;
 
 private slots:
     void ClickOnOk();
index d78196d7d97ca84405e97c4713235f75b4686b37..cc4dd70d6b60c03086eb2f4457a8a2a4d7ea1426 100644 (file)
@@ -31,7 +31,7 @@ SUBDIRS += PrimitiveGUI
 SUBDIRS += GenerationGUI
 SUBDIRS += EntityGUI
 SUBDIRS += BuildGUI
-#SUBDIRS += BooleanGUI
+SUBDIRS += BooleanGUI
 #SUBDIRS += TransformationGUI
 #SUBDIRS += OperationGUI
 #SUBDIRS += RepairGUI