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