diff options
author | Simon Rettberg | 2019-06-03 11:39:54 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-06-03 11:39:54 +0200 |
commit | 9e28d36029ac34d8739115d27cb72cb7d92d02f1 (patch) | |
tree | aa2b99b7205e8ff93eefd3636c36c469bb9dc0c4 /src | |
parent | Don't replace window flags, just add new one (diff) | |
download | vmchooser2-9e28d36029ac34d8739115d27cb72cb7d92d02f1.tar.gz vmchooser2-9e28d36029ac34d8739115d27cb72cb7d92d02f1.tar.xz vmchooser2-9e28d36029ac34d8739115d27cb72cb7d92d02f1.zip |
Add option to show the "disable screensaver" checkbox
Diffstat (limited to 'src')
-rw-r--r-- | src/config.cpp | 1 | ||||
-rw-r--r-- | src/config.h | 1 | ||||
-rw-r--r-- | src/dialog.cpp | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/config.cpp b/src/config.cpp index d70b504..c338ed7 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -40,6 +40,7 @@ struct ConfigOption } }; +const ConfigOption* const Config::ALLOW_SCREENSAVER_DISABLE = new ConfigOption("", "allow-screensaver-disable", "allow-screensaver-disable", "", "", "Show checkbox to disable the screen saver for this session"); const ConfigOption* const Config::ALLOW_VM_EDIT = new ConfigOption("", "allow-vm-edit", "allow-vm-edit", "", "", "Show edit checkbox for VMs/lectures where meta data allows editing"); const ConfigOption* const Config::AUTOQUIT = new ConfigOption("", "autoquit", "autoquit", "seconds", "120", "Time after which vmchooser will quit if no user interaction is detected"); const ConfigOption* const Config::BASEDIR = new ConfigOption("b", "base", "base", "path", "/mnt/vmstore", "Base directory where vm meta data is relative to"); diff --git a/src/config.h b/src/config.h index f1a20ea..011e82a 100644 --- a/src/config.h +++ b/src/config.h @@ -8,6 +8,7 @@ struct ConfigOption; class Config { public: + static const ConfigOption* const ALLOW_SCREENSAVER_DISABLE; static const ConfigOption* const ALLOW_VM_EDIT; static const ConfigOption* const AUTOQUIT; static const ConfigOption* const BASEDIR; diff --git a/src/dialog.cpp b/src/dialog.cpp index fb64c8f..298efc4 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -71,6 +71,8 @@ Dialog::Dialog(QWidget *parent) ui->PVS_checkbox->setVisible(Config::isSet(Config::PVS)); ui->PVS_checkbox->setChecked(Config::isSet(Config::PVS_CHECKED)); + ui->chkNoScreenSaver->setVisible(Config::isSet(Config::ALLOW_SCREENSAVER_DISABLE)); + activeTab_ = -1; if (Config::isSet(Config::EXAM_MODE)) { ui->tabButtonLocal->setEnabled(false); |