From: sln Date: Fri, 20 Oct 2006 15:19:25 +0000 (+0000) Subject: Compilation without OCC viewer fixed X-Git-Tag: For_CTH_V1_2a~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5d9d2adee1835c5affd5b7b706944619fe9c1bd6;p=modules%2Fgui.git Compilation without OCC viewer fixed --- diff --git a/src/LightApp/LightApp_OCCSelector.cxx b/src/LightApp/LightApp_OCCSelector.cxx index 446ae593b..616091a1e 100644 --- a/src/LightApp/LightApp_OCCSelector.cxx +++ b/src/LightApp/LightApp_OCCSelector.cxx @@ -29,6 +29,7 @@ /*! Constructor */ +#ifndef DISABLE_OCCVIEWER LightApp_OCCSelector::LightApp_OCCSelector( OCCViewer_Viewer* viewer, SUIT_SelectionMgr* mgr ) : SUIT_Selector( mgr, viewer ), myViewer( viewer ) @@ -36,6 +37,11 @@ LightApp_OCCSelector::LightApp_OCCSelector( OCCViewer_Viewer* viewer, SUIT_Selec if ( myViewer ) connect( myViewer, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) ); } +#else +LightApp_OCCSelector::LightApp_OCCSelector( SUIT_SelectionMgr* mgr ) +: SUIT_Selector( mgr ) +{} +#endif /*! Destructor. @@ -47,10 +53,12 @@ LightApp_OCCSelector::~LightApp_OCCSelector() /*! Gets viewer. */ +#ifndef DISABLE_OCCVIEWER OCCViewer_Viewer* LightApp_OCCSelector::viewer() const { return myViewer; } +#endif /*!On selection changed.*/ void LightApp_OCCSelector::onSelectionChanged() @@ -61,6 +69,7 @@ void LightApp_OCCSelector::onSelectionChanged() /*!Gets selection list.*/ void LightApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const { +#ifndef DISABLE_OCCVIEWER if ( !myViewer ) return; @@ -77,11 +86,13 @@ void LightApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( entry( anIt.Value() ) ) ) ); #endif } +#endif } /*!Sets selection list.*/ void LightApp_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) { +#ifndef DISABLE_OCCVIEWER if ( !myViewer ) return; @@ -109,8 +120,10 @@ void LightApp_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) myViewer->unHighlightAll( false ); myViewer->setObjectsSelected( aSelList ); +#endif } +#ifndef DISABLE_OCCVIEWER /*!Gets entry ob object.*/ QString LightApp_OCCSelector::entry( const Handle(AIS_InteractiveObject)& anAIS ) const { @@ -127,3 +140,5 @@ QString LightApp_OCCSelector::entry( const Handle(AIS_InteractiveObject)& anAIS return res; } +#endif + diff --git a/src/LightApp/LightApp_OCCSelector.h b/src/LightApp/LightApp_OCCSelector.h index c358efe8a..d8cc273b8 100644 --- a/src/LightApp/LightApp_OCCSelector.h +++ b/src/LightApp/LightApp_OCCSelector.h @@ -23,9 +23,11 @@ #include +#ifndef DISABLE_OCCVIEWER #include class Handle_AIS_InteractiveObject; +#endif /*! \class LightApp_OCCSelector @@ -36,13 +38,18 @@ class LIGHTAPP_EXPORT LightApp_OCCSelector : public SUIT_Selector Q_OBJECT public: +#ifndef DISABLE_OCCVIEWER LightApp_OCCSelector( OCCViewer_Viewer*, SUIT_SelectionMgr* ); +#else + LightApp_OCCSelector( SUIT_SelectionMgr* ); +#endif virtual ~LightApp_OCCSelector(); +#ifndef DISABLE_OCCVIEWER OCCViewer_Viewer* viewer() const; virtual QString type() const { return OCCViewer_Viewer::Type(); } - +#endif private slots: virtual void onSelectionChanged(); @@ -50,10 +57,12 @@ protected: virtual void getSelection( SUIT_DataOwnerPtrList& ) const; virtual void setSelection( const SUIT_DataOwnerPtrList& ); +#ifndef DISABLE_OCCVIEWER QString entry( const Handle_AIS_InteractiveObject& ) const; private: OCCViewer_Viewer* myViewer; +#endif }; #endif