-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
/*!
Constructor
*/
+#ifndef DISABLE_OCCVIEWER
LightApp_OCCSelector::LightApp_OCCSelector( OCCViewer_Viewer* viewer, SUIT_SelectionMgr* mgr )
: SUIT_Selector( mgr, viewer ),
myViewer( viewer )
connect( myViewer, SIGNAL( deselection() ), this, SLOT( onDeselection() ) );
}
}
+#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.*/
/*!Gets selection list.*/
void LightApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
{
+#ifndef DISABLE_OCCVIEWER
if ( !myViewer )
return;
+ if ( !myViewer->isSelectionEnabled() )
+ return;
+
AIS_ListOfInteractive aSelList;
myViewer->getSelectedObjects( aSelList );
for ( AIS_ListIteratorOfListOfInteractive anIt( aSelList ); anIt.More(); anIt.Next() )
for(anExtIter = mySelectedExternals.begin(); anExtIter != mySelectedExternals.end(); anExtIter++) {
aList.append(*anExtIter);
}
+#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
{
if ( anAIS.IsNull() || !anAIS->HasOwner() )
- return QString::null;
+ return QString();
QString res;
return res;
}
+#endif