X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Selection.h;h=f766841d6edea79f9134a863816e55bd52b400ad;hb=9c54fb01877c455abb5b5ff22e384468f795b328;hp=4868a9a80f7ffad28785f15f05cc8d354a26d158;hpb=979ad873ba8ebe5ec3c8e6eae08f359b94768766;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Selection.h b/src/XGUI/XGUI_Selection.h index 4868a9a80..f766841d6 100644 --- a/src/XGUI/XGUI_Selection.h +++ b/src/XGUI/XGUI_Selection.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> + // File: XGUI_Selection.h // Created: 8 July 2014 // Author: Vitaly SMETANNIKOV @@ -16,11 +18,19 @@ #include #include +#include + class XGUI_Workshop; +/** +* \ingroup GUI +* Implementation of \ref ModuleBase_ISelection interface. +*/ class XGUI_EXPORT XGUI_Selection : public ModuleBase_ISelection { public: + /// Constructor + /// \param theWorkshop reference to workshop instance XGUI_Selection(XGUI_Workshop* theWorkshop); /// Returns a list of viewer selected presentations @@ -34,14 +44,14 @@ class XGUI_EXPORT XGUI_Selection : public ModuleBase_ISelection virtual QList getHighlighted(int theShapeTypeToSkip = -1) const; /** - * Returns list of currently selected objects + * Returns list of currently selected objects in object browser */ - virtual QList selectedObjects() const; + virtual QObjectPtrList selectedObjects() const; /** * Returns list of currently selected results */ - virtual QList selectedPresentations() const; + virtual QObjectPtrList selectedPresentations() const; //! Returns list of currently selected QModelIndexes virtual QModelIndexList selectedIndexes() const; @@ -53,6 +63,17 @@ class XGUI_EXPORT XGUI_Selection : public ModuleBase_ISelection virtual void selectedShapes(NCollection_List& theShapes, std::list& theOwners) const; + //! Returns list of currently selected owners + /// \return list of owners + void selectedOwners(SelectMgr_IndexedMapOfOwner& theSelectedOwners) const; + + //! Returns a list of selection entity owners of the interactive object + /// It depends on the modes, in which the object is activated in the context + /// \param theObject an object + /// \param theOwners a map of entity owners + void entityOwners(const Handle_AIS_InteractiveObject& theObject, + SelectMgr_IndexedMapOfOwner& theOwners) const; + private: XGUI_Workshop* myWorkshop; };