1 // File: XGUI_Selection.h
2 // Created: 8 July 2014
3 // Author: Vitaly SMETANNIKOV
5 #ifndef XGUI_Selection_H
6 #define XGUI_Selection_H
10 #include <ModuleBase_ViewerPrs.h>
11 #include <ModuleBase_Definitions.h>
12 #include <ModuleBase_ISelection.h>
14 #include <QModelIndexList>
15 #include <AIS_ListOfInteractive.hxx>
16 #include <NCollection_List.hxx>
17 #include <TopoDS_Shape.hxx>
23 class XGUI_EXPORT XGUI_Selection : public ModuleBase_ISelection
26 XGUI_Selection(XGUI_Workshop* theWorkshop);
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;
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;
39 * Returns list of currently selected objects
41 virtual QList<ObjectPtr> selectedObjects() const;
44 * Returns list of currently selected results
46 virtual QList<ObjectPtr> selectedPresentations() const;
48 //! Returns list of currently selected QModelIndexes
49 virtual QModelIndexList selectedIndexes() const;
51 //! Returns list of currently selected AIS objects
52 virtual void selectedAISObjects(AIS_ListOfInteractive& theList) const;
54 //! Returns list of currently selected shapes
55 virtual void selectedShapes(NCollection_List<TopoDS_Shape>& theList) const;
58 XGUI_Workshop* myWorkshop;