1 #ifndef SALOMEAPP_VTKSELECTOR_H
2 #define SALOMEAPP_VTKSELECTOR_H
4 #include <vtkSmartPointer.h>
6 #include <TColStd_IndexedMapOfInteger.hxx>
8 #include "SUIT_Selector.h"
10 #include "SalomeApp.h"
11 #include "SalomeApp_DataOwner.h"
13 #include "SVTK_Selection.h"
14 #include "SALOME_InteractiveObject.hxx"
20 Provide salome vtk data owner list.
22 class SalomeApp_SVTKDataOwner : public SalomeApp_DataOwner
25 SalomeApp_SVTKDataOwner( const Handle(SALOME_InteractiveObject)& theIO,
26 const TColStd_IndexedMapOfInteger& theIds,
27 Selection_Mode theMode = ActorSelection,
28 SALOME_Actor* theActor = NULL);
29 virtual ~SalomeApp_SVTKDataOwner();
31 /*!Gets dataowners ids list.*/
32 const TColStd_IndexedMapOfInteger& GetIds() const
37 /*!Gets selection mode.*/
38 Selection_Mode GetMode() const
40 return mySelectionMode;
43 SALOME_Actor* GetActor() const;
46 TColStd_IndexedMapOfInteger myIds;
47 Selection_Mode mySelectionMode;
48 vtkSmartPointer<SALOME_Actor> myActor;
53 Provide salome vtk selection of data owners.
55 class SALOMEAPP_EXPORT SalomeApp_VTKSelector : public SUIT_Selector
60 SalomeApp_VTKSelector( SVTK_Viewer*, SUIT_SelectionMgr* );
61 virtual ~SalomeApp_VTKSelector();
63 SVTK_Viewer* viewer() const;
65 virtual QString type() const;
68 void onSelectionChanged();
71 virtual void getSelection( SUIT_DataOwnerPtrList& ) const;
72 virtual void setSelection( const SUIT_DataOwnerPtrList& );
75 SVTK_Viewer* myViewer;