Salome HOME
updated copyright message
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetSelectionFilter.h
index 4862581b89559f93174489232afa4137d16117e0..3303fce0ea699bc0e33e484e6f253f35212619c2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -41,6 +41,8 @@ class QVBoxLayout;
 class QPushButton;
 class QCheckBox;
 
+class ModelAPI_Filter;
+
 class ModuleBase_IWorkshop;
 
 /**
@@ -217,6 +219,15 @@ private:
   /// Add a filter by name
   ModuleBase_FilterItem* onAddFilter(const std::string& theFilter);
 
+  /// Return currently created filter items
+  QList<ModuleBase_FilterItem*> itemsList() const;
+
+  /// Translate a string
+  QString translate(const std::string& theString) const;
+
+  /// Store translated names of filters and their instances
+  void storeFilters(const std::list<std::shared_ptr<ModelAPI_Filter> >& theFilters);
+
 private:
   ModuleBase_IWorkshop* myWorkshop;
 
@@ -231,12 +242,6 @@ private:
   /// Type of selection mode
   int mySelectionType;
 
-  /// List of non-used filters
-  std::list<std::string> myFilters;
-
-  /// List of used filters
-  std::list<std::string> myUseFilters;
-
   /// Result of filtering
   QList<ModuleBase_ViewerPrsPtr> myValues;
 
@@ -251,6 +256,9 @@ private:
 
   /// Attribute name which will get result of filtering
   std::string mySelectorAttribute;
+
+  /// Translated name and the corresponding filter
+  std::map<std::string, std::shared_ptr<ModelAPI_Filter> > myFilters;
 };