32 #ifndef pqPresetDialog_h 33 #define pqPresetDialog_h 37 #include <QModelIndex> 38 #include <QScopedPointer> 56 typedef QDialog Superclass;
67 SHOW_NON_INDEXED_COLORS_ONLY
76 void setMode(
Modes mode);
81 void setCurrentPreset(
const char* presetName);
86 const Json::Value& currentPreset();
92 bool loadColors()
const;
98 bool loadOpacities()
const;
104 bool loadAnnotations()
const;
109 QRegularExpression regularExpression();
116 bool usePresetRange()
const;
121 void setCustomizableLoadColors(
bool state,
bool defaultValue =
true);
126 void setCustomizableLoadAnnotations(
bool state,
bool defaultValue =
true);
131 void setCustomizableAnnotationsRegexp(
bool state,
bool defaultValue =
false);
136 void setCustomizableLoadOpacities(
bool state,
bool defaultValue =
true);
141 void setCustomizableUsePresetRange(
bool state,
bool defaultValue =
false);
144 void applyPreset(
const Json::Value& preset);
147 void updateEnabledStateForSelection();
148 void updateForSelectedIndex(
const QModelIndex& proxyIndex);
149 void triggerApply(
const QModelIndex& proxyIndex = QModelIndex());
150 void removePreset(
const QModelIndex& idx = QModelIndex());
151 void importPresets();
152 void exportPresets();
154 void setPresetIsAdvanced(
int newState);
157 void showEvent(QShowEvent* e)
override;
158 void closeEvent(QCloseEvent* e)
override;
166 const QScopedPointer<pqInternals> Internals;
#define PQCOMPONENTS_EXPORT
pqPresetDialog is the dialog used by to show the user with a choice of color maps/opacity maps/preset...
Modes
Used to control what kinds of presets are shown in the dialog.