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>
21 class XGUI_EXPORT XGUI_Selection : public ModuleBase_ISelection
24 XGUI_Selection(XGUI_Workshop* theWorkshop);
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;
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;
37 * Returns list of currently selected objects
39 virtual QList<ObjectPtr> selectedObjects() const;
42 * Returns list of currently selected results
44 virtual QList<ObjectPtr> selectedPresentations() const;
46 //! Returns list of currently selected QModelIndexes
47 virtual QModelIndexList selectedIndexes() const;
49 //! Returns list of currently selected AIS objects
50 virtual void selectedAISObjects(AIS_ListOfInteractive& theList) const;
52 //! Returns list of currently selected shapes
53 virtual void selectedShapes(NCollection_List<TopoDS_Shape>& theShapes,
54 std::list<ObjectPtr>& theOwners) const;
57 XGUI_Workshop* myWorkshop;