X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Filters.h;h=d0cae78a4b83d6d2ddd71858f4088fdbee87a05e;hb=1fd15bed1c62f994a3438bc4a12f44d0361f98c9;hp=5c24462388dff4de104997bc53610f7b9809e25d;hpb=7074394f8f08413d885f63be01df6bd5007b868c;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Filters.h b/src/PartSet/PartSet_Filters.h index 5c2446238..d0cae78a4 100644 --- a/src/PartSet/PartSet_Filters.h +++ b/src/PartSet/PartSet_Filters.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2021 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef PartSet_Filters_H @@ -23,6 +22,8 @@ #include +#include +#include /** * \class PartSet_GlobalFilter @@ -35,8 +36,7 @@ class PartSet_GlobalFilter: public ModuleBase_ShapeDocumentFilter public: /// Constructor /// \param theWorkshop a pointer to workshop - PartSet_GlobalFilter(ModuleBase_IWorkshop* theWorkshop) - : ModuleBase_ShapeDocumentFilter(theWorkshop) {} + PartSet_GlobalFilter(ModuleBase_IWorkshop* theWorkshop); /// Returns True if selected presentation can be selected /// \param theOwner an owner of the persentation @@ -46,6 +46,31 @@ public: DEFINE_STANDARD_RTTIEXT(PartSet_GlobalFilter, ModuleBase_ShapeDocumentFilter) }; +/// \class PartSet_ResultGroupNameFilter +/// \ingroup Modules +/// A class which filters results with groupName() result in filter parameters +DEFINE_STANDARD_HANDLE(PartSet_ResultGroupNameFilter, SelectMgr_Filter); +class PartSet_ResultGroupNameFilter: public SelectMgr_Filter +{ +public: + /// Constructor + /// \param theWorkshop a pointer to workshop + PartSet_ResultGroupNameFilter(ModuleBase_IWorkshop* theWorkshop) + : SelectMgr_Filter(), myWorkshop(theWorkshop) {} + + void setGroupNames(const std::set& theGroupNames); + + /// 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_ResultGroupNameFilter, SelectMgr_Filter) + +private: + ModuleBase_IWorkshop* myWorkshop; + std::set myGroupNames; +}; /// \class PartSet_CirclePointFilter /// \ingroup GUI