X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Filters.h;h=00481706173a3ed2eb07b27895dba8896d153bd9;hb=32208dedf0b2b5bd50b5b86c464f37a8e0eb07d0;hp=56715069de4cc854d9ca4e6bcbcd90a8948ebaa7;hpb=a7f44a41bdf29e7bd978ff3b8c8bd514d1223be7;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Filters.h b/src/PartSet/PartSet_Filters.h index 56715069d..004817061 100644 --- a/src/PartSet/PartSet_Filters.h +++ b/src/PartSet/PartSet_Filters.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: PartSet_Filters.h // Created: 08 Nov 2014 // Author: Vitaly SMETANNIKOV @@ -9,18 +11,54 @@ /** +* \class PartSet_GlobalFilter +* \ingroup Modules * A class which filters groups object in addition to documents (see issue #310) */ DEFINE_STANDARD_HANDLE(PartSet_GlobalFilter, ModuleBase_ShapeDocumentFilter); class PartSet_GlobalFilter: public ModuleBase_ShapeDocumentFilter { public: + /// Constructor + /// \param theWorkshop a pointer to workshop PartSet_GlobalFilter(ModuleBase_IWorkshop* theWorkshop) : ModuleBase_ShapeDocumentFilter(theWorkshop) {} - Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; + /// Returns True if selected presentation can be selected + /// \param theOwner an owner of the persentation + Standard_EXPORT virtual Standard_Boolean + IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; + + DEFINE_STANDARD_RTTIEXT(PartSet_GlobalFilter, ModuleBase_ShapeDocumentFilter) +}; + + +/// \class PartSet_CirclePointFilter +/// \ingroup GUI +/// \brief A filter which provide filtering of selection in 3d viewer. +/// Installing of this filter disables selection of point on circle in sketch +DEFINE_STANDARD_HANDLE(PartSet_CirclePointFilter, SelectMgr_Filter); +class PartSet_CirclePointFilter: public SelectMgr_Filter +{ +public: + + /// Constructor + /// \param theWorkshop instance of workshop interface + Standard_EXPORT PartSet_CirclePointFilter(ModuleBase_IWorkshop* theWorkshop): + SelectMgr_Filter(), + myWorkshop(theWorkshop) {}; + + /// Returns True if the given owner is acceptable for selection + /// \param theOwner the selected owner + Standard_EXPORT virtual Standard_Boolean + IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; + + DEFINE_STANDARD_RTTIEXT(PartSet_CirclePointFilter, SelectMgr_Filter) + +private: - DEFINE_STANDARD_RTTI(PartSet_GlobalFilter) + /// Reference to workshop + ModuleBase_IWorkshop* myWorkshop; }; #endif \ No newline at end of file