X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ViewerFilters.h;h=8cc3bdaefabaafd4ed7856f91ba8aa818b786db0;hb=88ee9b2b81cf93a6324336b57e30cc8a3a487499;hp=7481d9f5d0a29f4ec0641d359431fd32404fb70b;hpb=c4eab94a20a0d93100549a210582d46409fec1cc;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ViewerFilters.h b/src/ModuleBase/ModuleBase_ViewerFilters.h index 7481d9f5d..8cc3bdaef 100644 --- a/src/ModuleBase/ModuleBase_ViewerFilters.h +++ b/src/ModuleBase/ModuleBase_ViewerFilters.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 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 @@ -53,11 +53,35 @@ public: Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; + /// Add an object type name to list of non selectable objects + /// \param theType - a name of an object type + Standard_EXPORT void addNonSelectableType(const QString& theType) + { + if (!myNonSelectableTypes.contains(theType)) + myNonSelectableTypes.append(theType); + } + + /// Removes an object type name from list of non selectable objects + /// \param theType - a name of an object type + Standard_EXPORT void removeNonSelectableType(const QString& theType) + { + if (myNonSelectableTypes.contains(theType)) + myNonSelectableTypes.removeAll(theType); + } + + /// Returns list of non-selectable an object type names + Standard_EXPORT QStringList nonSelectableTypes() const + { + return myNonSelectableTypes; + } + DEFINE_STANDARD_RTTIEXT(ModuleBase_ShapeDocumentFilter, SelectMgr_Filter) protected: /// Reference to workshop ModuleBase_IWorkshop* myWorkshop; + + QStringList myNonSelectableTypes; }; /**