From 29fb3f73cc46878cb8e2192f7c62e5dcbee56a53 Mon Sep 17 00:00:00 2001 From: mkr Date: Wed, 30 May 2007 08:45:39 +0000 Subject: [PATCH] Porting to Qt4. --- src/Makefile.am | 2 +- src/SOCC/SOCC.pro | 33 +++++++++++++++++++++++++++++++++ src/SOCC/SOCC_Prs.cxx | 3 +++ src/SOCC/SOCC_Prs.h | 3 ++- src/SOCC/SOCC_ViewModel.cxx | 6 ++++-- src/SOCC/SOCC_ViewModel.h | 3 ++- src/src.pro | 1 + 7 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 src/SOCC/SOCC.pro diff --git a/src/Makefile.am b/src/Makefile.am index 3c72ce588..db733d24b 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -61,7 +61,7 @@ if ENABLE_SALOMEOBJECT # VSR: this is the original packages list # SUBDIRS += SOCC # VSR: already migrated to Qt4 packages - SUBDIRS += + SUBDIRS += SOCC endif endif if ENABLE_PYCONSOLE diff --git a/src/SOCC/SOCC.pro b/src/SOCC/SOCC.pro new file mode 100644 index 000000000..44e49388f --- /dev/null +++ b/src/SOCC/SOCC.pro @@ -0,0 +1,33 @@ +TEMPLATE = lib +TARGET = SOCC +DESTDIR = ../../lib +MOC_DIR = ../../moc +OBJECTS_DIR = ../../obj/$$TARGET + +CASROOT = $$(CASROOT) +CAS_CPPFLAGS = $${CASROOT}/inc + +BOOST_CPPFLAGS = $$(BOOSTDIR)/include + +INCLUDEPATH += ../../include $${CAS_CPPFLAGS} $${BOOST_CPPFLAGS} ../Qtx ../SUIT ../OBJECT ../Prs ../OCCViewer +LIBS += -L../../lib -lsuit -lSalomeObject -lSalomePrs -lOCCViewer + +CONFIG -= debug release debug_and_release +CONFIG += qt thread debug dll shared + +win32:DEFINES += WIN32 +DEFINES += SOCC_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 + +HEADERS = SOCC.h +HEADERS += SOCC_ViewModel.h +HEADERS += SOCC_Prs.h +HEADERS += SOCC_ViewWindow.h + +SOURCES = SOCC_ViewModel.cxx +SOURCES += SOCC_Prs.cxx +SOURCES += SOCC_ViewWindow.cxx + +includes.files = $$HEADERS +includes.path = ../../include + +INSTALLS += includes diff --git a/src/SOCC/SOCC_Prs.cxx b/src/SOCC/SOCC_Prs.cxx index eb2cb6821..ad6f3154d 100644 --- a/src/SOCC/SOCC_Prs.cxx +++ b/src/SOCC/SOCC_Prs.cxx @@ -27,6 +27,9 @@ // $Header$ #include "SOCC_Prs.h" + +#include + using namespace std; /*! diff --git a/src/SOCC/SOCC_Prs.h b/src/SOCC/SOCC_Prs.h index 06fbce141..60dca4b3b 100644 --- a/src/SOCC/SOCC_Prs.h +++ b/src/SOCC/SOCC_Prs.h @@ -33,9 +33,10 @@ #include -#include #include +class Handle(AIS_InteractiveObject); + class SOCC_EXPORT SOCC_Prs : public SALOME_OCCPrs { public: diff --git a/src/SOCC/SOCC_ViewModel.cxx b/src/SOCC/SOCC_ViewModel.cxx index 8d27c10a7..fd046f662 100755 --- a/src/SOCC/SOCC_ViewModel.cxx +++ b/src/SOCC/SOCC_ViewModel.cxx @@ -22,7 +22,8 @@ #include "SOCC_ViewWindow.h" #include "SUIT_Session.h" -#include "SUIT_Application.h" +#include "SUIT_ResourceMgr.h" +//#include "SUIT_Application.h" //#include "ToolsGUI.h" @@ -37,6 +38,7 @@ #include #include +#include // Temporarily commented to avoid awful dependecy on SALOMEDS // TODO: better mechanism of storing display/erse status in a study @@ -289,7 +291,7 @@ void SOCC_Viewer::rename( const Handle(SALOME_InteractiveObject)& obj, Handle(SALOME_InteractiveObject) IO = aSh->getIO(); if ( IO->isSame( obj ) ) { - aSh->setName( (char*)name.latin1() ); + aSh->setName( name.toLatin1().data() ); break; } } diff --git a/src/SOCC/SOCC_ViewModel.h b/src/SOCC/SOCC_ViewModel.h index 6d2d04025..792616a62 100755 --- a/src/SOCC/SOCC_ViewModel.h +++ b/src/SOCC/SOCC_ViewModel.h @@ -26,7 +26,8 @@ #include "SOCC.h" #include "SALOME_Prs.h" #include "OCCViewer_ViewModel.h" -#include "SALOME_InteractiveObject.hxx" + +class Handle(SALOME_InteractiveObject); class SOCC_EXPORT SOCC_Viewer: public OCCViewer_Viewer, public SALOME_View { diff --git a/src/src.pro b/src/src.pro index 3ef5689f0..67b89f293 100644 --- a/src/src.pro +++ b/src/src.pro @@ -16,5 +16,6 @@ SUBDIRS += Prs SUBDIRS += OBJECT SUBDIRS += VTKViewer SUBDIRS += OCCViewer +SUBDIRS += SOCC SUBDIRS += Event -- 2.39.2