From 32cca43bdc2330ff9ae87da893a8736d7f0bdcf0 Mon Sep 17 00:00:00 2001 From: Alexis Morel Date: Fri, 10 Apr 2020 15:19:41 -0400 Subject: [PATCH] restart warning label when a setting is changed --- src/View/Components/SettingsDialog.cpp | 5 +++++ src/View/gui/SettingsDialog.ui | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/View/Components/SettingsDialog.cpp b/src/View/Components/SettingsDialog.cpp index e0fa5a3..bb2e6d2 100644 --- a/src/View/Components/SettingsDialog.cpp +++ b/src/View/Components/SettingsDialog.cpp @@ -12,6 +12,7 @@ namespace View { m_ui.setupUi( this ); setWindowFlag( Qt::WindowContextHelpButtonHint, false ); + m_ui.restartWarningLabel->hide(); m_ui.logoffCheckBox->setChecked( m_pConfig->get( Model::Config::Keys::LOGOFF_ACTIVATED ).toBool() ); connect( m_ui.logoffCheckBox, &QCheckBox::stateChanged, @@ -32,21 +33,25 @@ namespace View void SettingsDialog::onLogonChanged( const QCheckBox& checkbox_ ) { + m_ui.restartWarningLabel->show(); m_pConfig->set( Model::Config::Keys::LOGON_ACTIVATED, checkbox_.isChecked() ); } void SettingsDialog::onLogoffChanged( const QCheckBox& checkbox_ ) { + m_ui.restartWarningLabel->show(); m_pConfig->set( Model::Config::Keys::LOGOFF_ACTIVATED, checkbox_.isChecked() ); } void SettingsDialog::onLockedChanged( const QCheckBox& checkbox_ ) { + m_ui.restartWarningLabel->show(); m_pConfig->set( Model::Config::Keys::LOCKED_ACTIVATED, checkbox_.isChecked() ); } void SettingsDialog::onUnlockedChanged( const QCheckBox& checkbox_ ) { + m_ui.restartWarningLabel->show(); m_pConfig->set( Model::Config::Keys::UNLOCKED_ACTIVATED, checkbox_.isChecked() ); } } // namespace View diff --git a/src/View/gui/SettingsDialog.ui b/src/View/gui/SettingsDialog.ui index 5c9fde6..1300abc 100644 --- a/src/View/gui/SettingsDialog.ui +++ b/src/View/gui/SettingsDialog.ui @@ -177,6 +177,22 @@ + + + + 20 + 130 + 251 + 21 + + + + color: rgb(255, 0, 0) + + + *** Application restart required *** + +