Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[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 #include <list>
20
21 class XGUI_Workshop;
22
23 class XGUI_EXPORT XGUI_Selection: public ModuleBase_ISelection
24 {
25 public:
26   XGUI_Selection(XGUI_Workshop* theWorkshop);
27
28   /// Returns a list of viewer selected 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> getSelected(int theShapeTypeToSkip = -1) const;
32
33   /// Returns a list of viewer highlited presentations
34   /// \param theShapeTypeToSkip the shapes with this type will be skipped during the result list build
35   /// \return list of presentations
36   virtual std::list<ModuleBase_ViewerPrs> getHighlighted(int theShapeTypeToSkip = -1) const;
37
38   /**
39   * Returns list of currently selected objects
40   */
41   virtual QList<ObjectPtr> selectedObjects() const;
42
43   /**
44   * Returns list of currently selected results
45   */
46   virtual QResultList selectedResults() const;
47   
48   //! Returns list of currently selected QModelIndexes
49   virtual QModelIndexList selectedIndexes() const;
50
51   //! Returns list of currently selected AIS objects
52   virtual void selectedAISObjects(AIS_ListOfInteractive& theList) const;
53
54   //! Returns list of currently selected shapes
55   virtual void selectedShapes(NCollection_List<TopoDS_Shape>& theList) const;
56
57 private:
58   XGUI_Workshop* myWorkshop;
59 };
60
61 #endif