Adding update notifications setting option

This commit is contained in:
Dan Paulat 2023-04-23 00:30:18 -05:00
parent 19f0ab9898
commit a609f14f1f
6 changed files with 38 additions and 8 deletions

View file

@ -84,6 +84,7 @@ public:
&gridWidth_,
&gridHeight_,
&mapboxApiKey_,
&updateNotificationsEnabled_,
&debugEnabled_}}
{
// Configure default alert phenomena colors
@ -137,7 +138,8 @@ public:
settings::SettingsInterface<std::int64_t> gridWidth_ {};
settings::SettingsInterface<std::int64_t> gridHeight_ {};
settings::SettingsInterface<std::string> mapboxApiKey_ {};
settings::SettingsInterface<bool> debugEnabled_ {};
settings::SettingsInterface<bool> updateNotificationsEnabled_ {};
settings::SettingsInterface<bool> debugEnabled_ {};
std::unordered_map<std::string, settings::SettingsInterface<std::string>>
colorTables_ {};
@ -315,6 +317,11 @@ void SettingsDialogImpl::SetupGeneralTab()
mapboxApiKey_.SetEditWidget(self_->ui->mapboxApiKeyLineEdit);
mapboxApiKey_.SetResetButton(self_->ui->resetMapboxApiKeyButton);
updateNotificationsEnabled_.SetSettingsVariable(
generalSettings.update_notifications_enabled());
updateNotificationsEnabled_.SetEditWidget(
self_->ui->enableUpdateNotificationsCheckBox);
debugEnabled_.SetSettingsVariable(generalSettings.debug_enabled());
debugEnabled_.SetEditWidget(self_->ui->debugEnabledCheckBox);
}

View file

@ -224,6 +224,13 @@
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="enableUpdateNotificationsCheckBox">
<property name="text">
<string>Update Notifications Enabled</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="debugEnabledCheckBox">
<property name="text">
@ -268,8 +275,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>489</width>
<height>382</height>
<width>66</width>
<height>18</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_3">