Salome HOME
Create selection validator and selection object
[modules/shaper.git] / src / ModuleBase / ModuleBase_ISelection.h
1 // File:        ModuleBase_ISelection.h
2 // Created:     2 June 2014
3 // Author:      Vitaly Smetannikov
4
5 #ifndef ModuleBase_ISelection_H
6 #define ModuleBase_ISelection_H
7
8 #include "ModuleBase.h"
9 #include "ModuleBase_Definitions.h"
10 #include "ModuleBase_ViewerPrs.h"
11
12 #include <QModelIndexList>
13 #include <AIS_ListOfInteractive.hxx>
14 #include <NCollection_List.hxx>
15 #include <TopoDS_Shape.hxx>
16
17 #include <list>
18
19 class ModuleBase_ISelection
20 {
21 public:
22
23   /// Returns a list of viewer selected presentations
24   /// \param theShapeTypeToSkip the shapes with this type will be skipped during the result list build
25   /// \return list of presentations
26   virtual std::list<ModuleBase_ViewerPrs> getSelected(int theShapeTypeToSkip = -1) const = 0;
27
28   /// Returns a list of viewer highlited presentations
29   /// \param theShapeTypeToSkip the shapes with this type will be skipped during the result list build
30   /// \return list of presentations
31   virtual std::list<ModuleBase_ViewerPrs> getHighlighted(int theShapeTypeToSkip = -1) const = 0;
32
33   /**
34   * Returns list of features currently selected in 3d viewer
35   */
36   virtual QFeatureList selectedFeatures() const = 0;
37   
38   //! Returns list of currently selected QModelIndexes
39   virtual QModelIndexList selectedIndexes() const = 0;
40
41   //! Returns list of currently selected AIS objects
42   virtual void selectedAISObjects(AIS_ListOfInteractive& theList) const = 0;
43
44   //! Returns list of currently selected shapes
45   virtual void selectedShapes(NCollection_List<TopoDS_Shape>& theList) const = 0;
46
47 };
48
49 #endif