1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: XGUI_Selection.h
4 // Created: 8 July 2014
5 // Author: Vitaly SMETANNIKOV
7 #ifndef XGUI_Selection_H
8 #define XGUI_Selection_H
12 #include <ModuleBase_ViewerPrs.h>
13 #include <ModuleBase_Definitions.h>
14 #include <ModuleBase_ISelection.h>
16 #include <QModelIndexList>
17 #include <AIS_ListOfInteractive.hxx>
18 #include <NCollection_List.hxx>
19 #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 QList<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 QList<ModuleBase_ViewerPrs> getHighlighted(int theShapeTypeToSkip = -1) const;
39 * Returns list of currently selected objects in object browser
41 virtual QObjectPtrList selectedObjects() const;
44 * Returns list of currently selected results
46 virtual QObjectPtrList 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>& theShapes,
56 std::list<ObjectPtr>& theOwners) const;
59 XGUI_Workshop* myWorkshop;