]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Compilation without OCC viewer fixed
authorsln <sln@opencascade.com>
Fri, 20 Oct 2006 15:19:25 +0000 (15:19 +0000)
committersln <sln@opencascade.com>
Fri, 20 Oct 2006 15:19:25 +0000 (15:19 +0000)
src/LightApp/LightApp_OCCSelector.cxx
src/LightApp/LightApp_OCCSelector.h

index 446ae593bf46bdbea8381408e4d4823d1f35c556..616091a1ebf9aa5c5708d7c4ac14664cea175036 100644 (file)
@@ -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
+
index c358efe8aa48fd387c1442201afb0a880a17783d..d8cc273b82554c79ce8420e006ba3075d3e6a658 100644 (file)
 
 #include <SUIT_Selector.h>
 
+#ifndef DISABLE_OCCVIEWER
 #include <OCCViewer_ViewModel.h>
 
 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