20 #ifndef ModuleBase_ISelection_H
21 #define ModuleBase_ISelection_H
23 #include "ModuleBase.h"
24 #include "ModuleBase_Definitions.h"
26 #include <ModelAPI_Result.h>
27 #include <GeomAPI_Shape.h>
28 #include <GeomAPI_Vertex.h>
30 #include <QModelIndexList>
31 #include <AIS_ListOfInteractive.hxx>
32 #include <NCollection_List.hxx>
33 #include <TopoDS_Shape.hxx>
38 class SelectMgr_EntityOwner;
53 virtual QList<std::shared_ptr<ModuleBase_ViewerPrs>>
60 static void appendSelected(
const QList<std::shared_ptr<ModuleBase_ViewerPrs>> theValues,
61 QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValuesTo);
65 virtual QList<std::shared_ptr<ModuleBase_ViewerPrs>>
getHighlighted()
const = 0;
71 const Handle(SelectMgr_EntityOwner)& theOwner)
const = 0;
89 ResultPtr getResult(
const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
95 GeomShapePtr getShape(
const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
101 getIO(
const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs) = 0;
106 static QList<std::shared_ptr<ModuleBase_ViewerPrs>> getViewerPrs(
107 const QObjectPtrList& theObjects);
111 static void filterSelectionOnEqualPoints
112 (QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theSelected);
115 virtual ObjectPtr getSelectableObject(
const Handle(SelectMgr_EntityOwner)& theOwner)
const = 0;
121 static std::shared_ptr<GeomAPI_Vertex> getPresentationVertex(
122 const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
A class which provides access to selection.
Definition: ModuleBase_ISelection.h:44
virtual QModelIndexList selectedIndexes() const =0
Returns list of currently selected QModelIndexes.
virtual QObjectPtrList selectedPresentations() const =0
Returns list of currently selected results.
virtual QMap< ResultPtr, QList< GeomShapePtr > > selectedObjectsAndSubObjects() const =0
Returns map of selected results and their selected subobjects.
virtual QObjectPtrList selectedObjects() const =0
Returns list of features currently selected in object browser.
SelectionPlace
Types of the selection place, where the selection is obtained.
Definition: ModuleBase_ISelection.h:47
virtual void fillPresentation(std::shared_ptr< ModuleBase_ViewerPrs > &thePrs, const Handle &&theOwner) const =0
Fills the viewer presentation parameters by the parameters from the owner.
virtual QList< std::shared_ptr< ModuleBase_ViewerPrs > > getSelected(const SelectionPlace &thePlace=Browser) const =0
Returns a list of viewer selected presentations.
virtual QList< std::shared_ptr< ModuleBase_ViewerPrs > > getHighlighted() const =0
Returns a list of viewer highlited presentations.
Presentation.
Definition: ModuleBase_ViewerPrs.h:37