/*!
Constructor
*/
+#ifndef DISABLE_OCCVIEWER
LightApp_OCCSelector::LightApp_OCCSelector( OCCViewer_Viewer* viewer, SUIT_SelectionMgr* mgr )
: SUIT_Selector( mgr, viewer ),
myViewer( viewer )
if ( myViewer )
connect( myViewer, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
}
+#else
+LightApp_OCCSelector::LightApp_OCCSelector( SUIT_SelectionMgr* mgr )
+: SUIT_Selector( mgr )
+{}
+#endif
/*!
Destructor.
/*!
Gets viewer.
*/
+#ifndef DISABLE_OCCVIEWER
OCCViewer_Viewer* LightApp_OCCSelector::viewer() const
{
return myViewer;
}
+#endif
/*!On selection changed.*/
void LightApp_OCCSelector::onSelectionChanged()
/*!Gets selection list.*/
void LightApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
{
+#ifndef DISABLE_OCCVIEWER
if ( !myViewer )
return;
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;
myViewer->unHighlightAll( false );
myViewer->setObjectsSelected( aSelList );
+#endif
}
+#ifndef DISABLE_OCCVIEWER
/*!Gets entry ob object.*/
QString LightApp_OCCSelector::entry( const Handle(AIS_InteractiveObject)& anAIS ) const
{
return res;
}
+#endif
+
#include <SUIT_Selector.h>
+#ifndef DISABLE_OCCVIEWER
#include <OCCViewer_ViewModel.h>
class Handle_AIS_InteractiveObject;
+#endif
/*!
\class LightApp_OCCSelector
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();
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