X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Filters.h;h=5c24462388dff4de104997bc53610f7b9809e25d;hb=485284976089df895e261395518201ccd85dae4d;hp=aba48302f78784315be71582cc63fc014fd4f608;hpb=a2686c838648dcf05659df3c31d9b90aca42b792;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Filters.h b/src/PartSet/PartSet_Filters.h index aba48302f..5c2446238 100644 --- a/src/PartSet/PartSet_Filters.h +++ b/src/PartSet/PartSet_Filters.h @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: PartSet_Filters.h -// Created: 08 Nov 2014 -// Author: Vitaly SMETANNIKOV +// Copyright (C) 2014-2017 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// 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 +// +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com +// #ifndef PartSet_Filters_H #define PartSet_Filters_H @@ -26,9 +40,39 @@ public: /// 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; + 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