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 "SUIT_Selector.h"
24 #include "LightApp_DataOwner.h"
26 #ifndef DISABLE_VTKVIEWER
27 #include <vtkSmartPointer.h>
28 #include <TColStd_IndexedMapOfInteger.hxx>
29 #include "SVTK_Selection.h"
30 #ifndef DISABLE_SALOMEOBJECT
31 #include "SALOME_InteractiveObject.hxx"
34 class SVTK_ViewModelBase;
38 Provide salome vtk data owner list.
40 class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner
43 #ifndef DISABLE_VTKVIEWER
44 #ifndef DISABLE_SALOMEOBJECT
45 LightApp_SVTKDataOwner( const Handle(SALOME_InteractiveObject)& theIO,
46 const TColStd_IndexedMapOfInteger& theIds,
47 Selection_Mode theMode = ActorSelection,
48 SALOME_Actor* theActor = NULL);
50 virtual ~LightApp_SVTKDataOwner();
52 /*!Gets dataowners ids list.*/
53 const TColStd_IndexedMapOfInteger& GetIds() const
58 /*!Gets selection mode.*/
59 Selection_Mode GetMode() const
61 return mySelectionMode;
64 SALOME_Actor* GetActor() const;
67 TColStd_IndexedMapOfInteger myIds;
68 Selection_Mode mySelectionMode;
69 vtkSmartPointer<SALOME_Actor> myActor;
71 LightApp_SVTKDataOwner( const QString& );
77 Provide vtk selection of data owners.
79 class LIGHTAPP_EXPORT LightApp_VTKSelector : public SUIT_Selector
84 #ifndef DISABLE_VTKVIEWER
85 LightApp_VTKSelector( SVTK_ViewModelBase*, SUIT_SelectionMgr* );
86 virtual ~LightApp_VTKSelector();
88 SVTK_ViewModelBase* viewer() const;
90 virtual QString type() const;
92 LightApp_VTKSelector( SUIT_SelectionMgr* );
96 void onSelectionChanged();
98 #ifndef DISABLE_VTKVIEWER
100 virtual void getSelection( SUIT_DataOwnerPtrList& ) const;
101 virtual void setSelection( const SUIT_DataOwnerPtrList& );
104 SVTK_ViewModelBase* myViewer;