1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
19 #ifndef LIGHTAPP_VTKSELECTOR_H
20 #define LIGHTAPP_VTKSELECTOR_H
22 #include <vtkSmartPointer.h>
24 #include <TColStd_IndexedMapOfInteger.hxx>
26 #include "SUIT_Selector.h"
29 #include "LightApp_DataOwner.h"
31 #include "SVTK_Selection.h"
32 #include "SALOME_InteractiveObject.hxx"
38 Provide salome vtk data owner list.
40 class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner
43 LightApp_SVTKDataOwner( const Handle(SALOME_InteractiveObject)& theIO,
44 const TColStd_IndexedMapOfInteger& theIds,
45 Selection_Mode theMode = ActorSelection,
46 SALOME_Actor* theActor = NULL);
47 virtual ~LightApp_SVTKDataOwner();
49 /*!Gets dataowners ids list.*/
50 const TColStd_IndexedMapOfInteger& GetIds() const
55 /*!Gets selection mode.*/
56 Selection_Mode GetMode() const
58 return mySelectionMode;
61 SALOME_Actor* GetActor() const;
64 TColStd_IndexedMapOfInteger myIds;
65 Selection_Mode mySelectionMode;
66 vtkSmartPointer<SALOME_Actor> myActor;
71 Provide vtk selection of data owners.
73 class LIGHTAPP_EXPORT LightApp_VTKSelector : public SUIT_Selector
78 LightApp_VTKSelector( SVTK_Viewer*, SUIT_SelectionMgr* );
79 virtual ~LightApp_VTKSelector();
81 SVTK_Viewer* viewer() const;
83 virtual QString type() const;
86 void onSelectionChanged();
89 virtual void getSelection( SUIT_DataOwnerPtrList& ) const;
90 virtual void setSelection( const SUIT_DataOwnerPtrList& );
93 SVTK_Viewer* myViewer;