diff --git a/scwx-qt/source/scwx/qt/settings/settings_interface.cpp b/scwx-qt/source/scwx/qt/settings/settings_interface.cpp index 41a81c9a..3c2c4962 100644 --- a/scwx-qt/source/scwx/qt/settings/settings_interface.cpp +++ b/scwx-qt/source/scwx/qt/settings/settings_interface.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -94,6 +95,24 @@ void SettingsInterface::SetEditWidget(QWidget* widget) // Attempt to stage the value p->stagedValid_ = p->variable_->StageValue(value); p->UpdateResetButton(); + + // TODO: Display invalid status + }); + } + } + else if (QCheckBox* checkBox = dynamic_cast(widget)) + { + if constexpr (std::is_same_v) + { + QObject::connect(checkBox, + &QCheckBox::toggled, + p->context_.get(), + [this](bool checked) + { + // Attempt to stage the value + p->stagedValid_ = + p->variable_->StageValue(checked); + p->UpdateResetButton(); }); } } @@ -248,6 +267,13 @@ void SettingsInterface::Impl::UpdateEditWidget() } } } + else if (QCheckBox* checkBox = dynamic_cast(editWidget_)) + { + if constexpr (std::is_same_v) + { + checkBox->setChecked(currentValue); + } + } else if (QComboBox* comboBox = dynamic_cast(editWidget_)) { if constexpr (std::is_same_v)