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