mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-31 13:45:36 -05:00
Add option to set default value on load
This commit is contained in:
@@ -22,9 +22,16 @@ public:
|
||||
return std::make_shared<Variable>();
|
||||
}
|
||||
|
||||
enum class SaveAction {
|
||||
DONT_SAVE,
|
||||
SAVE,
|
||||
SET_DEFAULT,
|
||||
};
|
||||
|
||||
private:
|
||||
bool _persist = false;
|
||||
SaveAction _saveAction = SaveAction::DONT_SAVE;
|
||||
std::string _value = "";
|
||||
std::string _defaultValue = "";
|
||||
|
||||
friend VariableSelection;
|
||||
friend VariableSettingsDialog;
|
||||
@@ -43,9 +50,13 @@ public:
|
||||
VariableSettingsDialog(QWidget *parent, const Variable &);
|
||||
static bool AskForSettings(QWidget *parent, Variable &settings);
|
||||
|
||||
private slots:
|
||||
void SaveActionChanged(int);
|
||||
|
||||
private:
|
||||
QLineEdit *_value;
|
||||
QCheckBox *_persist;
|
||||
QLineEdit *_defaultValue;
|
||||
QComboBox *_save;
|
||||
};
|
||||
|
||||
class VariableSelection : public ItemSelection {
|
||||
|
||||
Reference in New Issue
Block a user