pqPythonMacroSettings.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 
4 #ifndef pqPythonMacroSettings_h
5 #define pqPythonMacroSettings_h
6 
7 #include "pqPythonModule.h" // for exports
8 
9 #include <QMap>
10 #include <QString>
11 
17 {
18 public:
20  {
21  ToolTip,
22  Name,
23  Unused
24  };
25 
26  explicit pqPythonMacroSettings(MacroItemCategories currentCategory);
27 
31  void setItemInSettings(const QString& macroPath, const QString& value);
32 
36  QString getItemFromSettings(const QString& macroPath);
37 
42  QMap<QString, QString> getItemSettings();
43 
49  void writeItemSettings(const QMap<QString, QString>& settingsMap);
50 
55  void removeItemFromSettings(const QString& macroPath);
56 
57 private:
62  bool getItemIndexInSettings(const QString& macroPath, int& idx, int& size);
63 
64  MacroItemCategories CurrentCategory = MacroItemCategories::Unused;
65 };
66 
67 #endif // pqPythonMacroSettings_h
#define PQPYTHON_EXPORT
size
value
pqPythonMacroSettings is a class to handle macro settings like names and tooltips.