From: nds Date: Mon, 6 Mar 2006 08:31:58 +0000 (+0000) Subject: Change configuration X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b9f51457fa0d3aff449da36960673b559f31f2d9;p=modules%2Fgui.git Change configuration --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index ca93892ff..030947638 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -3,7 +3,10 @@ // Author: Natalia Donis // Copyright (C) CEA 2005 -#include "PythonConsole_PyInterp.h" // WARNING! This include must be the first! +#ifndef DISABLE_PYCONSOLE + #include "PythonConsole_PyInterp.h" // WARNING! This include must be the first! + #include +#endif #include "LightApp_Application.h" #include "LightApp_WidgetContainer.h" @@ -17,10 +20,7 @@ #include "LightApp_OBFilter.h" -#include "LightApp_GLSelector.h" #include "LightApp_OBSelector.h" -#include "LightApp_OCCSelector.h" -#include "LightApp_VTKSelector.h" #include "LightApp_SelectionMgr.h" #include @@ -42,25 +42,50 @@ #include #include #include -#include -#include -#include +#ifndef DISABLE_GLVIEWER + #include + #include + #include "LightApp_GLSelector.h" +#endif -#include -#include -#include +#ifndef DISABLE_PLOT2DVIEWER + #include + #include +#ifndef DISABLE_SALOMEOBJECT + #include +#else + #include +#endif +#endif -#include -#include +#ifndef DISABLE_OCCVIEWER + #include +#ifndef DISABLE_SALOMEOBJECT + #include +#else + #include +#endif + #include "LightApp_OCCSelector.h" +#endif -#include -#include -#include +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT + #include + #include + #include "LightApp_VTKSelector.h" +#else + #include + #include +#endif + #include +#endif -#include -#include -#include +#ifndef DISABLE_SUPERVGRAPHVIEWER + #include + #include + #include +#endif #include @@ -81,8 +106,10 @@ #define FIRST_HELP_ID 1000000 -#include "SALOME_InteractiveObject.hxx" -#include "SALOME_ListIO.hxx" +#ifndef DISABLE_SALOMEOBJECT + #include "SALOME_InteractiveObject.hxx" + #include "SALOME_ListIO.hxx" +#endif static const char* imageEmptyIcon[] = { "20 20 1 1", @@ -147,6 +174,7 @@ myPrefs( 0 ) mySelMgr = new LightApp_SelectionMgr( this ); myAccel = new SUIT_Accel( desktop() ); +#ifndef DISABLE_OCCVIEWER myAccel->setActionKey( SUIT_Accel::PanLeft, CTRL+Key_Left, OCCViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::PanRight, CTRL+Key_Right, OCCViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::PanUp, CTRL+Key_Up, OCCViewer_Viewer::Type() ); @@ -158,6 +186,8 @@ myPrefs( 0 ) myAccel->setActionKey( SUIT_Accel::RotateRight, ALT+Key_Right, OCCViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::RotateUp, ALT+Key_Up, OCCViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::RotateDown, ALT+Key_Down, OCCViewer_Viewer::Type() ); +#endif +#ifndef DISABLE_VTKVIEWER myAccel->setActionKey( SUIT_Accel::PanLeft, CTRL+Key_Left, VTKViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::PanRight, CTRL+Key_Right, VTKViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::PanUp, CTRL+Key_Up, VTKViewer_Viewer::Type() ); @@ -169,6 +199,7 @@ myPrefs( 0 ) myAccel->setActionKey( SUIT_Accel::RotateRight, ALT+Key_Right, VTKViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::RotateUp, ALT+Key_Up, VTKViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::RotateDown, ALT+Key_Down, VTKViewer_Viewer::Type() ); +#endif connect( mySelMgr, SIGNAL( selectionChanged() ), this, SLOT( onSelection() ) ); } @@ -320,6 +351,19 @@ LightApp_SelectionMgr* LightApp_Application::selectionMgr() const return mySelMgr; } +/*!Creat action "New window" for certain type of viewer:*/ +void LightApp_Application::createActionForViewer( const int id, + const int parentId, + const QString& suffix, + const int accel ) +{ + QAction* a = createAction( id, tr( QString( "NEW_WINDOW_%1" ).arg( suffix ) ), QIconSet(), + tr( QString( "NEW_WINDOW_%1" ).arg( suffix ) ), + tr( QString( "NEW_WINDOW_%1" ).arg( suffix ) ), + accel, desktop(), false, this, SLOT( onNewWindow() ) ); + createMenu( a, parentId, -1 ); +} + /*!Create actions:*/ void LightApp_Application::createActions() { @@ -463,20 +507,20 @@ void LightApp_Application::createActions() int newWinMenu = createMenu( tr( "MEN_DESK_NEWWINDOW" ), windowMenu, -1, 0 ); createMenu( separator(), windowMenu, -1, 1 ); - QMap accelMap; - accelMap[NewGLViewId] = ALT+Key_G; - accelMap[NewPlot2dId] = ALT+Key_P; - accelMap[NewOCCViewId] = ALT+Key_O; - accelMap[NewVTKViewId] = ALT+Key_K; - for ( id = NewGLViewId; id <= NewVTKViewId; id++ ) - { - QAction* a = createAction( id, tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), QIconSet(), - tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), - tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), - accelMap.contains( id ) ? accelMap[id] : 0, desk, false, this, SLOT( onNewWindow() ) ); - createMenu( a, newWinMenu, -1 ); - } +#ifndef DISABLE_GLVIEWER + createActionForViewer( NewGLViewId, newWinMenu, QString::number( 0 ), ALT+Key_G ); +#endif +#ifndef DISABLE_PLOT2DVIEWER + createActionForViewer( NewPlot2dId, newWinMenu, QString::number( 1 ), ALT+Key_P ); +#endif +#ifndef DISABLE_OCCVIEWER + createActionForViewer( NewOCCViewId, newWinMenu, QString::number( 2 ), ALT+Key_O ); +#endif +#ifndef DISABLE_VTKVIEWER + createActionForViewer( NewVTKViewId, newWinMenu, QString::number( 3 ), ALT+Key_K ); +#endif + createAction( RenameId, tr( "TOT_RENAME" ), QIconSet(), tr( "MEN_DESK_RENAME" ), tr( "PRP_RENAME" ), SHIFT+Key_R, desk, false, this, SLOT( onRenameWindow() ) ); @@ -560,18 +604,26 @@ void LightApp_Application::onNewWindow() int id = actionId( (QAction*)obj ); switch ( id ) { +#ifndef DISABLE_GLVIEWER case NewGLViewId: type = GLViewer_Viewer::Type(); break; +#endif +#ifndef DISABLE_PLOT2DVIEWER case NewPlot2dId: type = Plot2d_Viewer::Type(); break; +#endif +#ifndef DISABLE_OCCVIEWER case NewOCCViewId: type = OCCViewer_Viewer::Type(); break; +#endif +#ifndef DISABLE_VTKVIEWER case NewVTKViewId: type = VTKViewer_Viewer::Type(); break; +#endif } if ( !type.isEmpty() ) @@ -737,13 +789,31 @@ void LightApp_Application::setActiveStudy( SUIT_Study* study ) void LightApp_Application::updateCommandsStatus() { CAM_Application::updateCommandsStatus(); + QAction* a = 0; - for ( int id = NewGLViewId; id <= NewVTKViewId; id++ ) - { - QAction* a = action( id ); - if ( a ) - a->setEnabled( activeStudy() ); - } +#ifndef DISABLE_GLVIEWER + a = action( NewGLViewId ); + if( a ) + a->setEnabled( activeStudy() ); +#endif + +#ifndef DISABLE_PLOT2DVIEWER + a = action( NewPlot2dId ); + if( a ) + a->setEnabled( activeStudy() ); +#endif + +#ifndef DISABLE_OCCVIEWER + a = action( NewOCCViewId ); + if( a ) + a->setEnabled( activeStudy() ); +#endif + +#ifndef DISABLE_VTKVIEWER + a = action( NewVTKViewId ); + if( a ) + a->setEnabled( activeStudy() ); +#endif } // Helps to execute command @@ -889,6 +959,7 @@ void LightApp_Application::addWindow( QWidget* wid, const int flag, const int st } QFont f; +#ifndef DISABLE_PYCONSOLE if( wid->inherits( "PythonConsole" ) ) { if( resourceMgr()->hasValue( "PyConsole", "font" ) ) @@ -900,6 +971,7 @@ void LightApp_Application::addWindow( QWidget* wid, const int flag, const int st } } else +#endif f = wid->font(); myWindows[flag]->insert( sId, wid ); @@ -994,6 +1066,7 @@ LogWindow* LightApp_Application::logWindow() return lw; } +#ifndef DISABLE_PYCONSOLE /*!Get "PythonConsole"*/ PythonConsole* LightApp_Application::pythonConsole() { @@ -1003,6 +1076,7 @@ PythonConsole* LightApp_Application::pythonConsole() console = (PythonConsole*)wid; return console; } +#endif /*!Update obect browser*/ void LightApp_Application::updateObjectBrowser( const bool updateModels ) @@ -1062,15 +1136,23 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType SUIT_ResourceMgr* resMgr = resourceMgr(); SUIT_ViewManager* viewMgr = 0; +#ifndef DISABLE_GLVIEWER if( vmType == GLViewer_Viewer::Type() ) { viewMgr = new GLViewer_ViewManager( activeStudy(), desktop() ); new LightApp_GLSelector( (GLViewer_Viewer2d*)viewMgr->getViewModel(), mySelMgr ); } - else if( vmType == Plot2d_Viewer::Type() ) +#endif +#ifndef DISABLE_PLOT2DVIEWER + if( vmType == Plot2d_Viewer::Type() ) { viewMgr = new Plot2d_ViewManager( activeStudy(), desktop() ); - SPlot2d_Viewer* vm = new SPlot2d_Viewer(); + Plot2d_Viewer* vm; +#ifndef DISABLE_SALOMEOBJECT + vm = new SPlot2d_Viewer(); +#else + vm = new Plot2d_Viewer(); +#endif viewMgr->setViewModel( vm );// custom view model, which extends SALOME_View interface Plot2d_ViewWindow* wnd = dynamic_cast( viewMgr->getActiveView() ); if( wnd ) @@ -1079,7 +1161,9 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType frame->setBackgroundColor( resMgr->colorValue( "Plot2d", "Background", frame->backgroundColor() ) ); } } - else if( vmType == SUPERVGraph_Viewer::Type() ) +#endif +#ifndef DISABLE_SUPERVGRAPHVIEWER + if( vmType == SUPERVGraph_Viewer::Type() ) { viewMgr = new SUPERVGraph_ViewManager( activeStudy(), desktop() ); SUPERVGraph_Viewer* vm = new SUPERVGraph_Viewer(); @@ -1087,10 +1171,17 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType if( view ) view->setBackgroundColor( resMgr->colorValue( "SUPERVGraph", "Background", view->backgroundColor() ) ); } - else if( vmType == OCCViewer_Viewer::Type() ) +#endif +#ifndef DISABLE_OCCVIEWER + if( vmType == OCCViewer_Viewer::Type() ) { viewMgr = new OCCViewer_ViewManager( activeStudy(), desktop() ); - SOCC_Viewer* vm = new SOCC_Viewer(); + OCCViewer_Viewer* vm; +#ifndef DISABLE_SALOMEOBJECT + vm = new SOCC_Viewer(); +#else + vm = new OCCViewer_Viewer(); +#endif vm->setBackgroundColor( resMgr->colorValue( "OCCViewer", "background", vm->backgroundColor() ) ); vm->setTrihedronSize( resMgr->integerValue( "OCCViewer", "trihedron_size", vm->trihedronSize() ) ); int u( 1 ), v( 1 ); @@ -1101,8 +1192,11 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType viewMgr->setViewModel( vm );// custom view model, which extends SALOME_View interface new LightApp_OCCSelector( (OCCViewer_Viewer*)viewMgr->getViewModel(), mySelMgr ); } - else if ( vmType == SVTK_Viewer::Type() ) +#endif +#ifndef DISABLE_VTKVIEWER + if ( vmType == VTKViewer_Viewer::Type() ) { +#ifndef DISABLE_SALOMEOBJECT viewMgr = new SVTK_ViewManager( activeStudy(), desktop() ); SVTK_Viewer* vm = dynamic_cast( viewMgr->getViewModel() ); if( vm ) @@ -1111,7 +1205,14 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType vm->setTrihedronSize( resMgr->integerValue( "VTKViewer", "trihedron_size", vm->trihedronSize() ) ); new LightApp_VTKSelector( vm, mySelMgr ); } +#else + viewMgr = new VTKViewer_ViewManager( activeStudy(), desktop() ); + VTKViewer_Viewer* vm = dynamic_cast( viewMgr->getViewModel() ); + if ( vm ) + vm->setBackgroundColor( resMgr->colorValue( "VTKViewer", "background", vm->backgroundColor() ) ); +#endif } +#endif if ( !viewMgr ) return 0; @@ -1346,6 +1447,7 @@ QWidget* LightApp_Application::createWindow( const int flag ) ob->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) ); } +#ifndef DISABLE_PYCONSOLE else if ( flag == WT_PyConsole ) { PythonConsole* pyCons = new PythonConsole( desktop() ); @@ -1353,6 +1455,7 @@ QWidget* LightApp_Application::createWindow( const int flag ) wid = pyCons; // pyCons->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) ); } +#endif else if ( flag == WT_LogWindow ) { LogWindow* logWin = new LogWindow( desktop() ); @@ -1369,7 +1472,9 @@ QWidget* LightApp_Application::createWindow( const int flag ) void LightApp_Application::defaultWindows( QMap& aMap ) const { aMap.insert( WT_ObjectBrowser, Qt::DockLeft ); +#ifndef DISABLE_PYCONSOLE aMap.insert( WT_PyConsole, Qt::DockBottom ); +#endif // aMap.insert( WT_LogWindow, Qt::DockBottom ); } @@ -1621,6 +1726,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString if ( !resMgr ) return; +#ifndef DISABLE_OCCVIEWER if ( sec == QString( "OCCViewer" ) && param == QString( "trihedron_size" ) ) { int sz = resMgr->integerValue( sec, param, -1 ); @@ -1637,18 +1743,20 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString occVM->getAISContext()->UpdateCurrentViewer(); } } +#endif +#ifndef DISABLE_VTKVIEWER if ( sec == QString( "VTKViewer" ) && (param == QString( "trihedron_size" ) || param == QString( "relative_size" )) ) { int sz = resMgr->integerValue( "VTKViewer", "trihedron_size", -1 ); QPtrList lst; - viewManagers( SVTK_Viewer::Type(), lst ); + viewManagers( VTKViewer_Viewer::Type(), lst ); +#ifndef DISABLE_SALOMEOBJECT for ( QPtrListIterator it( lst ); it.current() && sz >= 0; ++it ) { SUIT_ViewModel* vm = it.current()->getViewModel(); if ( !vm || !vm->inherits( "SVTK_Viewer" ) ) continue; - SVTK_Viewer* vtkVM = dynamic_cast( vm ); if( vtkVM ) { @@ -1656,8 +1764,11 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString vtkVM->Repaint(); } } +#endif } +#endif +#ifndef DISABLE_OCCVIEWER if ( sec == QString( "OCCViewer" ) && ( param == QString( "iso_number_u" ) || param == QString( "iso_number_v" ) ) ) { QPtrList lst; @@ -1671,6 +1782,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString mgr->getOCCViewer()->setIsos( u, v ); } } +#endif if( sec=="ObjectBrowser" ) { @@ -1694,12 +1806,14 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString updateWindows(); } +#ifndef DISABLE_PYCONSOLE if( sec=="PyConsole" ) { if( param=="font" ) if( pythonConsole() ) pythonConsole()->setFont( resMgr->fontValue( "PyConsole", "font" ) ); } +#endif } /*!Update desktop title.*/ diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index 14d2e4c23..2ff2f968f 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -15,7 +15,9 @@ class LogWindow; class OB_Browser; -class PythonConsole; +#ifndef DISABLE_PYCONSOLE + class PythonConsole; +#endif class STD_Application; class LightApp_WidgetContainer; class LightApp_Preferences; @@ -42,10 +44,33 @@ class LIGHTAPP_EXPORT LightApp_Application : public CAM_Application Q_OBJECT public: - typedef enum { WT_ObjectBrowser, WT_PyConsole, WT_LogWindow, WT_User } WindowTypes; + typedef enum { WT_ObjectBrowser, +#ifndef DISABLE_PYCONSOLE + WT_PyConsole, +#endif + WT_LogWindow, + WT_User } + WindowTypes; + + enum { RenameId = CAM_Application::UserID, + +#ifndef DISABLE_GLVIEWER + NewGLViewId , +#endif + +#ifndef DISABLE_PLOT2DVIEWER + NewPlot2dId, +#endif + +#ifndef DISABLE_OCCVIEWER + NewOCCViewId, +#endif - enum { NewGLViewId = CAM_Application::UserID, NewPlot2dId, NewOCCViewId, NewVTKViewId, - PreferencesId, MRUId, RenameId, UserID }; +#ifndef DISABLE_VTKVIEWER + NewVTKViewId, +#endif + + PreferencesId, MRUId, UserID }; public: LightApp_Application(); virtual ~LightApp_Application(); @@ -62,7 +87,9 @@ public: LogWindow* logWindow(); OB_Browser* objectBrowser(); +#ifndef DISABLE_PYCONSOLE PythonConsole* pythonConsole(); +#endif virtual void updateObjectBrowser( const bool = true ); @@ -111,6 +138,10 @@ public slots: protected: virtual void createActions(); + virtual void createActionForViewer( const int id, + const int parentId, + const QString& suffix, + const int accel ); virtual SUIT_Study* createNewStudy(); virtual QWidget* createWindow( const int ); virtual void defaultWindows( QMap& ) const; diff --git a/src/LightApp/LightApp_DataOwner.cxx b/src/LightApp/LightApp_DataOwner.cxx index add34d91f..62d0977d1 100644 --- a/src/LightApp/LightApp_DataOwner.cxx +++ b/src/LightApp/LightApp_DataOwner.cxx @@ -37,6 +37,7 @@ LightApp_DataOwner { } +#ifndef DISABLE_SALOMEOBJECT /*!Constructor. Initialize by \a SALOME_InteractiveObject.*/ LightApp_DataOwner ::LightApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ): @@ -44,6 +45,7 @@ LightApp_DataOwner myIO(theIO) { } +#endif /*!Destructor. Do nothing.*/ LightApp_DataOwner @@ -61,6 +63,12 @@ LightApp_DataOwner return other && entry() == other->entry(); } +bool LightApp_DataOwner::operator<( const SUIT_DataOwner& obj ) const +{ + const LightApp_DataOwner* other = dynamic_cast( &obj ); + return entry() < other->entry(); +} + /*!Gets entry.*/ QString LightApp_DataOwner @@ -69,6 +77,7 @@ LightApp_DataOwner return myEntry; } +#ifndef DISABLE_SALOMEOBJECT /*!Gets SALOME_InteractiveObject.*/ const Handle(SALOME_InteractiveObject)& LightApp_DataOwner @@ -76,3 +85,4 @@ LightApp_DataOwner { return myIO; } +#endif diff --git a/src/LightApp/LightApp_DataOwner.h b/src/LightApp/LightApp_DataOwner.h index d76e6d411..849840bab 100644 --- a/src/LightApp/LightApp_DataOwner.h +++ b/src/LightApp/LightApp_DataOwner.h @@ -22,7 +22,10 @@ #include "LightApp.h" #include "SUIT_DataOwner.h" -#include "SALOME_InteractiveObject.hxx" + +#ifndef DISABLE_SALOMEOBJECT + #include "SALOME_InteractiveObject.hxx" +#endif /*! This class provide data owner objects. @@ -30,17 +33,25 @@ class LIGHTAPP_EXPORT LightApp_DataOwner : public SUIT_DataOwner { public: +#ifndef DISABLE_SALOMEOBJECT LightApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ); +#endif LightApp_DataOwner( const QString& ); virtual ~LightApp_DataOwner(); virtual bool isEqual( const SUIT_DataOwner& ) const; + virtual bool operator<( const SUIT_DataOwner& ) const; + +#ifndef DISABLE_SALOMEOBJECT const Handle(SALOME_InteractiveObject)& IO() const; +#endif QString entry() const; private: QString myEntry; +#ifndef DISABLE_SALOMEOBJECT Handle(SALOME_InteractiveObject) myIO; +#endif }; typedef SMART(LightApp_DataOwner) LightApp_DataOwnerPtr; diff --git a/src/LightApp/LightApp_Displayer.cxx b/src/LightApp/LightApp_Displayer.cxx index 65ce0fa3c..f06c8c10b 100644 --- a/src/LightApp/LightApp_Displayer.cxx +++ b/src/LightApp/LightApp_Displayer.cxx @@ -23,8 +23,6 @@ #include -#include - #include #include #include @@ -32,6 +30,9 @@ #include #include +#ifndef DISABLE_SALOMEOBJECT + #include "SALOME_InteractiveObject.hxx" +#endif LightApp_Displayer::LightApp_Displayer() { @@ -122,14 +123,16 @@ void LightApp_Displayer::EraseAll( const bool forced, const bool updateViewer, S bool LightApp_Displayer::IsDisplayed( const QString& entry, SALOME_View* theViewFrame ) const { SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView(); + bool res = false; if( vf ) { +#ifndef DISABLE_SALOMEOBJECT Handle( SALOME_InteractiveObject ) temp = new SALOME_InteractiveObject(); temp->setEntry( entry.latin1() ); - return vf->isVisible( temp ); + res = vf->isVisible( temp ); +#endif } - else - return false; + return res; } void LightApp_Displayer::UpdateViewer() const diff --git a/src/LightApp/LightApp_GLSelector.cxx b/src/LightApp/LightApp_GLSelector.cxx index 7913b4edf..c9415eb41 100644 --- a/src/LightApp/LightApp_GLSelector.cxx +++ b/src/LightApp/LightApp_GLSelector.cxx @@ -20,8 +20,6 @@ #include "LightApp_DataOwner.h" -#include - #include /*!Constructor. Initialize by GLViewer_Viewer2d and SUIT_SelectionMgr.*/ @@ -66,7 +64,7 @@ void LightApp_GLSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const GLViewer_Object* obj = cont->SelectedObject(); if ( obj ) { - SALOME_GLOwner* owner = dynamic_cast< SALOME_GLOwner* >( obj->owner() ); + LightApp_GLOwner* owner = dynamic_cast< LightApp_GLOwner* >( obj->owner() ); if( owner ) aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( owner->entry() ) ) ); } @@ -90,7 +88,7 @@ void LightApp_GLSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) GLViewer_Object* obj = *it; if ( obj && obj->getVisible() ) { - SALOME_GLOwner* owner = dynamic_cast< SALOME_GLOwner* >( obj->owner() ); + LightApp_GLOwner* owner = dynamic_cast< LightApp_GLOwner* >( obj->owner() ); if ( owner ) aDisplayed.insert( owner->entry(), obj ); } @@ -115,3 +113,24 @@ void LightApp_GLSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) if ( Nb > 0 ) myViewer->updateAll(); } + + +LightApp_GLOwner::LightApp_GLOwner( const char* entry ) +: GLViewer_Owner() +{ + setEntry( entry ); +} + +LightApp_GLOwner::~LightApp_GLOwner() +{ +} + +const char* LightApp_GLOwner::entry() const +{ + return myEntry.c_str(); +} + +void LightApp_GLOwner::setEntry( const char* entry ) +{ + myEntry = entry; +} diff --git a/src/LightApp/LightApp_GLSelector.h b/src/LightApp/LightApp_GLSelector.h index 069669a87..f58bb761a 100644 --- a/src/LightApp/LightApp_GLSelector.h +++ b/src/LightApp/LightApp_GLSelector.h @@ -25,6 +25,9 @@ #include +#include +#include + class LIGHTAPP_EXPORT LightApp_GLSelector : public SUIT_Selector { Q_OBJECT @@ -48,4 +51,21 @@ private: GLViewer_Viewer2d* myViewer; }; + +/*! + This class provide data owner objects for GLViewer. +*/ +class LIGHTAPP_EXPORT LightApp_GLOwner : public GLViewer_Owner +{ +public: + LightApp_GLOwner( const char* ); + ~LightApp_GLOwner(); + + const char* entry() const; + void setEntry( const char* ); + +private: + std::string myEntry; +}; + #endif diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index 6b4de40b6..f80754ec4 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -23,16 +23,29 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT + #include + #include +#else + #include +#endif + #include +#endif +#ifndef DISABLE_OCCVIEWER + #include + #include + #include +#endif +#ifndef DISABLE_GLVIEWER + #include + #include +#endif +#ifndef DISABLE_PLOT2DVIEWER + #include + #include + #include +#endif #include @@ -196,14 +209,27 @@ void LightApp_Module::update( const int theFlags ) if ( SUIT_ViewManager* viewMgr = getApp()->activeViewManager() ) if ( SUIT_ViewWindow* viewWnd = viewMgr->getActiveView() ) { +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT if ( viewWnd->inherits( "SVTK_ViewWindow" ) ) ( (SVTK_ViewWindow*)viewWnd )->Repaint(); - else if ( viewWnd->inherits( "OCCViewer_ViewWindow" ) ) +#else + if ( viewWnd->inherits( "VTKViewer_ViewWindow" ) ) + ( (VTKViewer_ViewWindow*)viewWnd )->Repaint(); +#endif +#endif +#ifndef DISABLE_OCCVIEWER + if ( viewWnd->inherits( "OCCViewer_ViewWindow" ) ) ( (OCCViewer_ViewWindow*)viewWnd )->getViewPort()->onUpdate(); - else if ( viewWnd->inherits( "Plot2d_ViewWindow" ) ) +#endif +#ifndef DISABLE_PLOT2DVIEWER + if ( viewWnd->inherits( "Plot2d_ViewWindow" ) ) ( (Plot2d_ViewWindow*)viewWnd )->getViewFrame()->Repaint(); - else if ( viewWnd->inherits( "GLViewer_ViewFrame" ) ) +#endif +#ifndef DISABLE_GLVIEWER + if ( viewWnd->inherits( "GLViewer_ViewFrame" ) ) ( (GLViewer_ViewFrame*)viewWnd )->getViewPort()->onUpdate(); +#endif } } } @@ -280,9 +306,27 @@ QtxPopupMgr* LightApp_Module::popupMgr() myPopupMgr->setRule( disp, /*QString( "( not isVisible ) and " ) + */ uniform, true ); myPopupMgr->setRule( erase, /*QString( "( isVisible ) and " ) + */ uniform, true ); myPopupMgr->setRule( dispOnly, uniform, true ); - QString viewers = "{ '%1' '%2' '%3' }"; - viewers = viewers.arg( SOCC_Viewer::Type() ).arg( SVTK_Viewer::Type() ).arg( SPlot2d_Viewer::Type() ); - myPopupMgr->setRule( eraseAll, QString( "client in %1" ).arg( viewers ), true ); + + QStringList viewers; +#ifndef DISABLE_OCCVIEWER + viewers.append( OCCViewer_Viewer::Type() ); +#endif +#ifndef DISABLE_VTKVIEWER + viewers.append( VTKViewer_Viewer::Type() ); +#endif +#ifndef DISABLE_PLOT2DVIEWER + viewers.append( Plot2d_Viewer::Type() ); +#endif + + if( !viewers.isEmpty() ) + { + QString strViewers = "{ ", temp = "'%1' "; + QStringList::const_iterator anIt = viewers.begin(), aLast = viewers.end(); + for( ; anIt!=aLast; anIt++ ) + strViewers+=temp.arg( *anIt ); + strViewers+="}"; + myPopupMgr->setRule( eraseAll, QString( "client in %1" ).arg( strViewers ), true ); + } } return myPopupMgr; } diff --git a/src/LightApp/LightApp_OBSelector.cxx b/src/LightApp/LightApp_OBSelector.cxx index ebe8571b4..22867b5f6 100644 --- a/src/LightApp/LightApp_OBSelector.cxx +++ b/src/LightApp/LightApp_OBSelector.cxx @@ -71,9 +71,13 @@ void LightApp_OBSelector::getSelection( SUIT_DataOwnerPtrList& theList ) const LightApp_DataObject* obj = dynamic_cast( it.current() ); if ( obj ) { +#ifndef DISABLE_SALOMEOBJECT Handle(SALOME_InteractiveObject) aSObj = new SALOME_InteractiveObject ( obj->entry(), obj->componentDataType(), obj->name() ); LightApp_DataOwner* owner = new LightApp_DataOwner( aSObj ); +#else + LightApp_DataOwner* owner = new LightApp_DataOwner( obj->entry() ); +#endif that->mySelectedList.append( SUIT_DataOwnerPtr( owner ) ); } } diff --git a/src/LightApp/LightApp_OCCSelector.cxx b/src/LightApp/LightApp_OCCSelector.cxx index d0b07bb7b..abd30415a 100644 --- a/src/LightApp/LightApp_OCCSelector.cxx +++ b/src/LightApp/LightApp_OCCSelector.cxx @@ -20,8 +20,9 @@ #include "LightApp_DataOwner.h" #include "LightApp_OCCSelector.h" -#include - +#ifndef DISABLE_SALOMEOBJECT + #include +#endif #include #include @@ -68,9 +69,13 @@ void LightApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const for ( AIS_ListIteratorOfListOfInteractive anIt( aSelList ); anIt.More(); anIt.Next() ) if ( !anIt.Value().IsNull() ) { +#ifndef DISABLE_SALOMEOBJECT Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast(anIt.Value()->GetOwner()); if( !anObj.IsNull() ) aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( anObj ) ) ); +#else + aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( entry( anIt.Value() ) ) ) ); +#endif } } @@ -112,10 +117,13 @@ QString LightApp_OCCSelector::entry( const Handle(AIS_InteractiveObject)& anAIS if ( anAIS.IsNull() || !anAIS->HasOwner() ) return QString::null; - Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast(anAIS->GetOwner()); - QString res; + +#ifndef DISABLE_SALOMEOBJECT + Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast(anAIS->GetOwner()); if ( !anObj.IsNull() ) res = QString( anObj->getEntry() ); +#endif + return res; } diff --git a/src/LightApp/LightApp_SelectionMgr.cxx b/src/LightApp/LightApp_SelectionMgr.cxx index ab7a4f8b1..a46e906c0 100644 --- a/src/LightApp/LightApp_SelectionMgr.cxx +++ b/src/LightApp/LightApp_SelectionMgr.cxx @@ -25,13 +25,15 @@ #include -#include -#include +#ifndef DISABLE_SALOMEOBJECT + #include + #include -// Open CASCADE Include -#include -#include -#include + // Open CASCADE Include + #include + #include + #include +#endif /*! Constructor. @@ -57,6 +59,7 @@ LightApp_Application* LightApp_SelectionMgr::application() const return myApp; } +#ifndef DISABLE_SALOMEOBJECT /*! Get all selected objects from selection manager */ @@ -117,6 +120,37 @@ void LightApp_SelectionMgr::setSelectedObjects( const SALOME_ListIO& lst, const setSelected( owners, append ); } +#else +/*! + Get all selected objects from selection manager +*/ +void LightApp_SelectionMgr::selectedObjects( QStringList& theList, const QString& theType, + const bool convertReferences ) const +{ + theList.clear(); + + SUIT_DataOwnerPtrList aList; + selected( aList, theType ); + + QString entry; + for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr ) + { + const LightApp_DataOwner* owner = dynamic_cast( (*itr).operator->() ); + if( !owner ) + continue; + + LightApp_Study* study = dynamic_cast( application()->activeStudy() ); + if ( !study ) + return; + + entry = owner->entry(); + if( !theList.contains( entry ) ) + theList.append( entry ); + } +} + +#endif + /*! Emit current selection changed. */ @@ -127,6 +161,8 @@ void LightApp_SelectionMgr::selectionChanged( SUIT_Selector* theSel ) emit currentSelectionChanged(); } +#ifndef DISABLE_SALOMEOBJECT + /*! get map of indexes for the given SALOME_InteractiveObject */ @@ -287,3 +323,5 @@ void LightApp_SelectionMgr::selectedSubOwners( MapEntryOfMapOfInteger& theMap ) } } } + +#endif diff --git a/src/LightApp/LightApp_SelectionMgr.h b/src/LightApp/LightApp_SelectionMgr.h index c063b82be..8546dadfe 100644 --- a/src/LightApp/LightApp_SelectionMgr.h +++ b/src/LightApp/LightApp_SelectionMgr.h @@ -22,14 +22,19 @@ #include "LightApp.h" #include -#include -#include +#ifndef DISABLE_SALOMEOBJECT + #include + #include + + class SALOME_ListIO; + class TColStd_IndexedMapOfInteger; + class TColStd_MapOfInteger; +#else +#include +#endif -class SALOME_ListIO; class LightApp_Application; -class TColStd_IndexedMapOfInteger; -class TColStd_MapOfInteger; class LIGHTAPP_EXPORT LightApp_SelectionMgr : public SUIT_SelectionMgr { @@ -39,11 +44,12 @@ public: LightApp_SelectionMgr( LightApp_Application*, const bool = true ); virtual ~LightApp_SelectionMgr(); + LightApp_Application* application() const; + +#ifndef DISABLE_SALOMEOBJECT typedef QMap< Handle(SALOME_InteractiveObject), TColStd_IndexedMapOfInteger > MapIOOfMapOfInteger; typedef QMap< QString, TColStd_IndexedMapOfInteger > MapEntryOfMapOfInteger; - LightApp_Application* application() const; - void selectedObjects( SALOME_ListIO&, const QString& = QString::null, const bool = true ) const; void setSelectedObjects( const SALOME_ListIO&, const bool = false ); @@ -61,6 +67,9 @@ public: void selectObjects( MapIOOfMapOfInteger theMapIO, bool append ); void selectedSubOwners( MapEntryOfMapOfInteger& theMap ); +#else + void selectedObjects( QStringList&, const QString& = QString::null, const bool = true ) const; +#endif signals: void currentSelectionChanged(); diff --git a/src/LightApp/LightApp_ShowHideOp.cxx b/src/LightApp/LightApp_ShowHideOp.cxx index 52f16266f..76827c053 100644 --- a/src/LightApp/LightApp_ShowHideOp.cxx +++ b/src/LightApp/LightApp_ShowHideOp.cxx @@ -28,8 +28,10 @@ #include "LightApp_SelectionMgr.h" #include "LightApp_Selection.h" -#include -#include +#ifndef DISABLE_SALOMEOBJECT + #include + #include +#endif LightApp_ShowHideOp::LightApp_ShowHideOp( ActionType type ) : LightApp_Operation(), @@ -95,21 +97,33 @@ void LightApp_ShowHideOp::startOperation() } } + QStringList entries; + +#ifndef DISABLE_SALOMEOBJECT SALOME_ListIO selObjs; mgr->selectedObjects( selObjs ); - - QStringList entries; SALOME_ListIteratorOfListIO anIt( selObjs ); for( ; anIt.More(); anIt.Next() ) - { - if( anIt.Value().IsNull() ) - continue; + if( !anIt.Value().IsNull() ) +#else + QStringList selObjs; + mgr->selectedObjects( selObjs ); + QStringList::const_iterator anIt = selObjs.begin(), aLast = selObjs.end(); + for( ; ; anIt!=aLast ) +#endif + { + QString entry = +#ifndef DISABLE_SALOMEOBJECT + anIt.Value()->getEntry(); +#else + *anIt; +#endif - if( study->isComponent( anIt.Value()->getEntry() ) ) - study->children( anIt.Value()->getEntry(), entries ); - else - entries.append( anIt.Value()->getEntry() ); - } + if( study->isComponent( entry ) ) + study->children( entry, entries ); + else + entries.append( entry ); + } for( QStringList::const_iterator it = entries.begin(), last = entries.end(); it!=last; it++ ) { diff --git a/src/LightApp/LightApp_VTKSelector.cxx b/src/LightApp/LightApp_VTKSelector.cxx index b393b3043..a81891b59 100644 --- a/src/LightApp/LightApp_VTKSelector.cxx +++ b/src/LightApp/LightApp_VTKSelector.cxx @@ -19,18 +19,24 @@ #include "LightApp_VTKSelector.h" #include "LightApp_DataOwner.h" -#include "SVTK_ViewModelBase.h" -#include "SVTK_Selector.h" -#include "SVTK_ViewWindow.h" -#include "SVTK_Functor.h" +#ifndef DISABLE_VTKVIEWER + #include "SVTK_ViewModelBase.h" + #include "SVTK_Selector.h" + #include "SVTK_ViewWindow.h" + #include "SVTK_Functor.h" + #include "VTKViewer_Algorithm.h" + #include +#endif -#include "SALOME_Actor.h" -#include "SALOME_ListIteratorOfListIO.hxx" +#ifndef DISABLE_SALOMEOBJECT + #include "SALOME_Actor.h" + #include "SALOME_ListIteratorOfListIO.hxx" +#endif -#include "VTKViewer_Algorithm.h" -#include +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT /*! Constructor. */ @@ -45,6 +51,7 @@ LightApp_SVTKDataOwner { myIds = theIds; // workaround - there is no constructor copy for the container } +#endif /*! Destuctor. @@ -64,6 +71,10 @@ LightApp_SVTKDataOwner return myActor.GetPointer(); } +#endif + + +#ifndef DISABLE_VTKVIEWER /*! Constructor. */ @@ -105,6 +116,7 @@ LightApp_VTKSelector return myViewer->getType(); } +#endif /*! On selection changed. */ @@ -115,6 +127,8 @@ LightApp_VTKSelector selectionChanged(); } +#ifndef DISABLE_VTKVIEWER + /*! Gets list of selected data owners.(output \a aList). */ @@ -204,3 +218,5 @@ LightApp_VTKSelector } } } + +#endif diff --git a/src/LightApp/LightApp_VTKSelector.h b/src/LightApp/LightApp_VTKSelector.h index 14c6523ce..7c5dca73f 100644 --- a/src/LightApp/LightApp_VTKSelector.h +++ b/src/LightApp/LightApp_VTKSelector.h @@ -19,20 +19,20 @@ #ifndef LIGHTAPP_VTKSELECTOR_H #define LIGHTAPP_VTKSELECTOR_H -#include - -#include - #include "SUIT_Selector.h" - #include "LightApp.h" #include "LightApp_DataOwner.h" -#include "SVTK_Selection.h" -#include "SALOME_InteractiveObject.hxx" - -class SALOME_Actor; -class SVTK_ViewModelBase; +#ifndef DISABLE_VTKVIEWER + #include + #include + #include "SVTK_Selection.h" +#ifndef DISABLE_SALOMEOBJECT + #include "SALOME_InteractiveObject.hxx" +#endif + class SALOME_Actor; + class SVTK_ViewModelBase; +#endif /*! Provide salome vtk data owner list. @@ -40,10 +40,13 @@ class SVTK_ViewModelBase; class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner { public: +#ifndef DISABLE_VTKVIEWER + #ifndef DISABLE_SALOMEOBJECT LightApp_SVTKDataOwner( const Handle(SALOME_InteractiveObject)& theIO, const TColStd_IndexedMapOfInteger& theIds, Selection_Mode theMode = ActorSelection, SALOME_Actor* theActor = NULL); + #endif virtual ~LightApp_SVTKDataOwner(); /*!Gets dataowners ids list.*/ @@ -64,6 +67,9 @@ class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner TColStd_IndexedMapOfInteger myIds; Selection_Mode mySelectionMode; vtkSmartPointer myActor; +#else + LightApp_SVTKDataOwner( const QString& ); +#endif }; @@ -75,22 +81,29 @@ class LIGHTAPP_EXPORT LightApp_VTKSelector : public SUIT_Selector Q_OBJECT; public: +#ifndef DISABLE_VTKVIEWER LightApp_VTKSelector( SVTK_ViewModelBase*, SUIT_SelectionMgr* ); virtual ~LightApp_VTKSelector(); SVTK_ViewModelBase* viewer() const; virtual QString type() const; +#else + LightApp_VTKSelector( SUIT_SelectionMgr* ); +#endif private slots: void onSelectionChanged(); +#ifndef DISABLE_VTKVIEWER protected: virtual void getSelection( SUIT_DataOwnerPtrList& ) const; virtual void setSelection( const SUIT_DataOwnerPtrList& ); private: SVTK_ViewModelBase* myViewer; + +#endif }; #endif diff --git a/src/LightApp/Makefile.in b/src/LightApp/Makefile.in index 3ffef0449..fc43d9593 100755 --- a/src/LightApp/Makefile.in +++ b/src/LightApp/Makefile.in @@ -22,13 +22,11 @@ EXPORT_HEADERS= LightApp.h \ LightApp_Dialog.h \ LightApp_Displayer.h \ LightApp_Driver.h \ - LightApp_GLSelector.h \ LightApp_Module.h \ LightApp_ModuleDlg.h \ LightApp_NameDlg.h \ LightApp_OBFilter.h \ LightApp_OBSelector.h \ - LightApp_OCCSelector.h \ LightApp_Operation.h \ LightApp_Selection.h \ LightApp_SelectionMgr.h \ @@ -39,10 +37,21 @@ EXPORT_HEADERS= LightApp.h \ LightApp_PreferencesDlg.h \ LightApp_RootObject.h \ LightApp_UpdateFlags.h \ - LightApp_VTKSelector.h \ LightApp_WidgetContainer.h # LightApp_HDFDriver.h \ +ifneq ($(DISABLE_VTKVIEWER),yes) +ifneq ($(DISABLE_SALOMEOBJECT),yes) + EXPORT_HEADERS+= LightApp_VTKSelector.h +endif +endif +ifneq ($(DISABLE_OCCVIEWER),yes) + EXPORT_HEADERS+= LightApp_OCCSelector.h +endif +ifneq ($(DISABLE_GLVIEWER),yes) + EXPORT_HEADERS+= LightApp_GLSelector.h +endif + # .po files to transform in .qm PO_FILES = LightApp_images.po \ LightApp_msg_en.po @@ -59,13 +68,11 @@ LIB_SRC= LightApp_AboutDlg.cxx \ LightApp_Dialog.cxx \ LightApp_Displayer.cxx \ LightApp_Driver.cxx \ - LightApp_GLSelector.cxx \ LightApp_Module.cxx \ LightApp_ModuleDlg.cxx \ LightApp_NameDlg.cxx \ LightApp_OBFilter.cxx \ LightApp_OBSelector.cxx \ - LightApp_OCCSelector.cxx \ LightApp_Operation.cxx \ LightApp_Selection.cxx \ LightApp_SelectionMgr.cxx \ @@ -74,17 +81,26 @@ LIB_SRC= LightApp_AboutDlg.cxx \ LightApp_SwitchOp.cxx \ LightApp_Preferences.cxx \ LightApp_PreferencesDlg.cxx \ - LightApp_VTKSelector.cxx \ LightApp_WidgetContainer.cxx # LightApp_HDFDriver.cxx \ +ifneq ($(DISABLE_VTKVIEWER),yes) +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIB_SRC+= LightApp_VTKSelector.cxx +endif +endif +ifneq ($(DISABLE_OCCVIEWER),yes) + LIB_SRC+= LightApp_OCCSelector.cxx +endif +ifneq ($(DISABLE_GLVIEWER),yes) + LIB_SRC+= LightApp_GLSelector.cxx +endif + LIB_MOC = LightApp_AboutDlg.h \ LightApp_Application.h \ LightApp_DataModel.h \ LightApp_Dialog.h \ - LightApp_GLSelector.h \ LightApp_OBSelector.h \ - LightApp_OCCSelector.h \ LightApp_Operation.h \ LightApp_Module.h \ LightApp_ModuleDlg.h \ @@ -95,9 +111,20 @@ LIB_MOC = LightApp_AboutDlg.h \ LightApp_SwitchOp.h \ LightApp_Preferences.h \ LightApp_PreferencesDlg.h \ - LightApp_VTKSelector.h \ LightApp_WidgetContainer.h +ifneq ($(DISABLE_VTKVIEWER),yes) +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIB_MOC+= LightApp_VTKSelector.h +endif +endif +ifneq ($(DISABLE_OCCVIEWER),yes) + LIB_MOC+= LightApp_OCCSelector.h +endif +ifneq ($(DISABLE_GLVIEWER),yes) + LIB_MOC+= LightApp_GLSelector.h +endif + RESOURCES_FILES = icon_about.png \ icon_applogo.png \ icon_default.png \ @@ -107,11 +134,73 @@ RESOURCES_FILES = icon_about.png \ LightApp.ini \ LightApp.xml -CPPFLAGS+=$(PYTHON_INCLUDES) $(QT_INCLUDES) $(QWT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) +CPPFLAGS+=$(PYTHON_INCLUDES) $(QT_INCLUDES) $(OCC_INCLUDES) #$(HDF5_INCLUDES) -LDFLAGS+=$(PYTHON_LIBS) $(QT_MT_LIBS) -LIBS+= -lsuit -lstd -lCAM -lObjBrowser -lLogWindow $(CAS_KERNEL) -lGLViewer -lOCCViewer -lVTKViewer -lSalomeObject -lSOCC -lSVTK -lSPlot2d -lSUPERVGraph -lPyInterp -lPythonConsole +ifneq ($(DISABLE_VTKVIEWER),yes) + CPPFLAGS+= $(VTK_INCLUDES) +else + CPPFLAGS+= -DDISABLE_VTKVIEWER +endif +ifneq ($(DISABLE_PLOT2DVIEWER),yes) + CPPFLAGS+= $(QWT_INCLUDES) +else + CPPFLAGS+= -DDISABLE_PLOT2DVIEWER +endif +ifeq ($(DISABLE_OCCVIEWER),yes) + CPPFLAGS+= -DDISABLE_OCCVIEWER +endif +ifneq ($(DISABLE_PYCONSOLE),yes) + CPPFLAGS+= $(PYTHON_INCLUDES) +else + CPPFLAGS+= -DDISABLE_PYCONSOLE +endif +ifeq ($(DISABLE_GLVIEWER),yes) + CPPFLAGS+= -DDISABLE_GLVIEWER +endif +ifeq ($(DISABLE_SUPERVGRAPHVIEWER),yes) + CPPFLAGS+= -DDISABLE_SUPERVGRAPHVIEWER +endif +ifeq ($(DISABLE_SALOMEOBJECT),yes) + CPPFLAGS+= -DDISABLE_SALOMEOBJECT +endif + +LDFLAGS+=$(QT_MT_LIBS) +ifneq ($(DISABLE_PYCONSOLE),yes) + LDFLAGS+= $(PYTHON_LIBS) +endif + +LIBS+= -lsuit -lstd -lCAM -lObjBrowser -lLogWindow $(CAS_KERNEL) -lSalomePrs #$(HDF5_LIBS) -lSalomeHDFPersistCopy +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIBS+= -lSalomeObject +endif +ifneq ($(DISABLE_VTKVIEWER),yes) + LIBS+= -lVTKViewer +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIBS+= -lSVTK +endif +endif +ifneq ($(DISABLE_OCCVIEWER),yes) + LIBS+= -lOCCViewer +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIBS+= -lSOCC +endif +endif +ifneq ($(DISABLE_GLVIEWER),yes) + LIBS+= -lGLViewer +endif +ifneq ($(DISABLE_PLOT2DVIEWER),yes) + LIBS+= -lPlot2d +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIBS+= -lSPlot2d +endif +endif +ifneq ($(DISABLE_PYCONSOLE),yes) + LIBS+= -lPyInterp -lPythonConsole +endif +ifneq ($(DISABLE_SUPERVGRAPHVIEWER),yes) + LIBS+= -lSUPERVGraph +endif @CONCLUDE@