]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_Selection.h
Salome HOME
Selection validators improvements
[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   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   std::list<ModuleBase_ViewerPrs> getHighlighted(int theShapeTypeToSkip = -1) const;
37
38   /**
39   * Returns list of features currently selected in 3d viewer
40   */
41   QFeatureList selectedFeatures() const;
42   
43   //! Returns list of currently selected QModelIndexes
44   QModelIndexList selectedIndexes() const;
45
46   //! Returns list of currently selected AIS objects
47   void selectedAISObjects(AIS_ListOfInteractive& theList) const;
48
49   //! Returns list of currently selected shapes
50   void selectedShapes(NCollection_List<TopoDS_Shape>& theList) const;
51
52 private:
53   XGUI_Workshop* myWorkshop;
54 };
55
56 #endif