Porting to Qt4.

This commit is contained in:
mkr 2007-07-10 12:49:13 +00:00
parent d5db2b50f4
commit fbb735b93a
4 changed files with 68 additions and 23 deletions

View File

@ -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

View File

@ -27,15 +27,15 @@
// $Header$ // $Header$
#include "BooleanGUI_Dialog.h" #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 "SUIT_Session.h"
#include "SalomeApp_Application.h" #include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h" #include "LightApp_SelectionMgr.h"
#include <qlabel.h>
using namespace std; using namespace std;
//================================================================================= //=================================================================================
@ -46,7 +46,7 @@ using namespace std;
// TRUE to construct a modal dialog. // TRUE to construct a modal dialog.
//================================================================================= //=================================================================================
BooleanGUI_Dialog::BooleanGUI_Dialog( const int theOperation, GeometryGUI* theGeometryGUI, 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), :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, fl),
myOperation( theOperation ) myOperation( theOperation )
{ {
@ -60,36 +60,42 @@ BooleanGUI_Dialog::BooleanGUI_Dialog( const int theOperation, GeometryGUI* theGe
aCaption = tr("GEOM_COMMON_TITLE"); aCaption = tr("GEOM_COMMON_TITLE");
setHelpFileName("common.htm"); setHelpFileName("common.htm");
break; break;
case BooleanGUI::CUT: case BooleanGUI::CUT:
image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CUT"))); image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CUT")));
aTitle = tr("GEOM_CUT"); aTitle = tr("GEOM_CUT");
aCaption = tr("GEOM_CUT_TITLE"); aCaption = tr("GEOM_CUT_TITLE");
setHelpFileName("cut.htm"); setHelpFileName("cut.htm");
break; break;
case BooleanGUI::FUSE: case BooleanGUI::FUSE:
image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_FUSE"))); image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_FUSE")));
aTitle = tr("GEOM_FUSE"); aTitle = tr("GEOM_FUSE");
aCaption = tr("GEOM_FUSE_TITLE"); aCaption = tr("GEOM_FUSE_TITLE");
setHelpFileName("fuse.htm"); setHelpFileName("fuse.htm");
break; break;
case BooleanGUI::SECTION: case BooleanGUI::SECTION:
image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SECTION"))); image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SECTION")));
aTitle = tr("GEOM_SECTION"); aTitle = tr("GEOM_SECTION");
aCaption = tr("GEOM_SECTION_TITLE"); aCaption = tr("GEOM_SECTION_TITLE");
setHelpFileName("section.htm"); setHelpFileName("section.htm");
break; break;
} }
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption( aCaption ); setWindowTitle( aCaption );
/***************************************************************/ /***************************************************************/
GroupConstructors->setTitle( aTitle ); GroupConstructors->setTitle( aTitle );
RadioButton1->setPixmap( image0 ); RadioButton1->setIcon( image0 );
RadioButton2->close(TRUE); RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
RadioButton3->close(TRUE); 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")); myGroup->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
if ( myOperation != BooleanGUI::CUT ) 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->TextLabel2->setText(tr("GEOM_TOOL_OBJECT"));
} }
myGroup->PushButton1->setPixmap(image1); myGroup->PushButton1->setIcon(image1);
myGroup->PushButton2->setPixmap(image1); myGroup->PushButton2->setIcon(image1);
myGroup->LineEdit1->setReadOnly( true ); myGroup->LineEdit1->setReadOnly( true );
myGroup->LineEdit2->setReadOnly( true ); myGroup->LineEdit2->setReadOnly( true );
Layout1->addWidget(myGroup, 2, 0); gridLayout1->addWidget(aMyGroupWidget, 2, 0);
/***************************************************************/ /***************************************************************/
/* Initialisation */ /* Initialisation */
@ -146,7 +152,7 @@ void BooleanGUI_Dialog::Init()
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
initName( GroupConstructors->title() ); initName( GroupConstructors->title().toStdString().c_str() );
globalSelection( GEOM_ALLSHAPES ); globalSelection( GEOM_ALLSHAPES );
} }

View File

@ -31,8 +31,7 @@
#include "BooleanGUI.h" //for wnt defines #include "BooleanGUI.h" //for wnt defines
#include "GEOMBase_Skeleton.h" #include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel_QTD.h"
class DlgRef_2Sel_QTD;
//================================================================================= //=================================================================================
// class : BooleanGUI_Dialog // class : BooleanGUI_Dialog
@ -44,7 +43,7 @@ class GEOM_BOOLEANGUI_EXPORT BooleanGUI_Dialog : public GEOMBase_Skeleton
public: public:
BooleanGUI_Dialog( const int theOperation, GeometryGUI* theGeometryGUI, QWidget* parent = 0, 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(); ~BooleanGUI_Dialog();
protected: protected:
@ -62,7 +61,7 @@ private:
GEOM::GEOM_Object_var myObject1; GEOM::GEOM_Object_var myObject1;
GEOM::GEOM_Object_var myObject2; GEOM::GEOM_Object_var myObject2;
DlgRef_2Sel_QTD* myGroup; Ui::DlgRef_2Sel_QTD* myGroup;
private slots: private slots:
void ClickOnOk(); void ClickOnOk();

View File

@ -31,7 +31,7 @@ SUBDIRS += PrimitiveGUI
SUBDIRS += GenerationGUI SUBDIRS += GenerationGUI
SUBDIRS += EntityGUI SUBDIRS += EntityGUI
SUBDIRS += BuildGUI SUBDIRS += BuildGUI
#SUBDIRS += BooleanGUI SUBDIRS += BooleanGUI
#SUBDIRS += TransformationGUI #SUBDIRS += TransformationGUI
#SUBDIRS += OperationGUI #SUBDIRS += OperationGUI
#SUBDIRS += RepairGUI #SUBDIRS += RepairGUI