Salome HOME
Issue #368 move constraint problem
[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 /**
22 * A class which provides access to selection.
23 * A selection can be obtained as from a viewer as from Object browser in various forms
24 */
25 class ModuleBase_ISelection
26 {
27  public:
28
29   /// Returns a list of viewer selected presentations
30   /// \param theShapeTypeToSkip the shapes with this type will be skipped during the result list build
31   /// \return list of presentations
32   virtual QList<ModuleBase_ViewerPrs> getSelected(int theShapeTypeToSkip = -1) const = 0;
33
34   /// Returns a list of viewer highlited presentations
35   /// \param theShapeTypeToSkip the shapes with this type will be skipped during the result list build
36   /// \return list of presentations
37   virtual QList<ModuleBase_ViewerPrs> getHighlighted(int theShapeTypeToSkip = -1) const = 0;
38
39   /**
40    * Returns list of features currently selected in object browser
41    */
42   virtual QObjectPtrList selectedObjects() const = 0;
43
44   /**
45    * Returns list of currently selected results
46    */
47   virtual QObjectPtrList selectedPresentations() const = 0;
48
49   //! Returns list of currently selected QModelIndexes
50   virtual QModelIndexList selectedIndexes() const = 0;
51
52   //! Returns list of currently selected AIS objects
53   //! \param theList returning list of selected AIS objects
54   virtual void selectedAISObjects(AIS_ListOfInteractive& theList) const = 0;
55
56   //! Returns list of currently selected shapes and their owners (objects).
57   //! Both lists are synchronized
58   //! \param theList returning list of selected AIS objects
59   //! \param theOwners list of objects
60   virtual void selectedShapes(NCollection_List<TopoDS_Shape>& theList, 
61     std::list<ObjectPtr>& theOwners) const = 0;
62
63 };
64
65 #endif