Salome HOME
Copyright update 2022
[modules/shaper.git] / src / ModuleBase / ModuleBase_ViewerFilters.h
index 7481d9f5d0a29f4ec0641d359431fd32404fb70b..8cc3bdaefabaafd4ed7856f91ba8aa818b786db0 100644 (file)
@@ -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;
 };
 
 /**