|
|
@ -139,7 +139,7 @@ class ParamControl : public ToggleControl { |
|
|
|
Q_OBJECT |
|
|
|
Q_OBJECT |
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
public: |
|
|
|
ParamControl(const QString ¶m, const QString &title, const QString &desc, const QString &icon, const bool _confirm, QWidget *parent = nullptr) : confirm(_confirm), ToggleControl(title, desc, icon, false, parent) { |
|
|
|
ParamControl(const QString ¶m, const QString &title, const QString &desc, const QString &icon, QWidget *parent = nullptr) : ToggleControl(title, desc, icon, false, parent) { |
|
|
|
key = param.toStdString(); |
|
|
|
key = param.toStdString(); |
|
|
|
QObject::connect(this, &ParamControl::toggleFlipped, [=](bool state) { |
|
|
|
QObject::connect(this, &ParamControl::toggleFlipped, [=](bool state) { |
|
|
|
QString content("<body><h2 style=\"text-align: center;\">" + title + "</h2><br>" |
|
|
|
QString content("<body><h2 style=\"text-align: center;\">" + title + "</h2><br>" |
|
|
@ -156,8 +156,10 @@ public: |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool confirm = false; |
|
|
|
void setConfirmation(bool _confirm, bool _store_confirm) { |
|
|
|
bool store_confirm = false; |
|
|
|
confirm = _confirm; |
|
|
|
|
|
|
|
store_confirm = _store_confirm; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
void refresh() { |
|
|
|
void refresh() { |
|
|
|
if (params.getBool(key) != toggle.on) { |
|
|
|
if (params.getBool(key) != toggle.on) { |
|
|
@ -172,6 +174,8 @@ public: |
|
|
|
private: |
|
|
|
private: |
|
|
|
std::string key; |
|
|
|
std::string key; |
|
|
|
Params params; |
|
|
|
Params params; |
|
|
|
|
|
|
|
bool confirm = false; |
|
|
|
|
|
|
|
bool store_confirm = false; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class ListWidget : public QWidget { |
|
|
|
class ListWidget : public QWidget { |
|
|
|