mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-01 08:00:05 +00:00
Toggle for smoothed range folding in settings dialog
This commit is contained in:
parent
3e681abfdb
commit
77e02b76b1
2 changed files with 41 additions and 25 deletions
|
|
@ -12,6 +12,7 @@
|
|||
#include <scwx/qt/settings/audio_settings.hpp>
|
||||
#include <scwx/qt/settings/general_settings.hpp>
|
||||
#include <scwx/qt/settings/palette_settings.hpp>
|
||||
#include <scwx/qt/settings/product_settings.hpp>
|
||||
#include <scwx/qt/settings/settings_interface.hpp>
|
||||
#include <scwx/qt/settings/text_settings.hpp>
|
||||
#include <scwx/qt/settings/unit_settings.hpp>
|
||||
|
|
@ -136,6 +137,7 @@ public:
|
|||
&showMapAttribution_,
|
||||
&showMapCenter_,
|
||||
&showMapLogo_,
|
||||
&showSmoothedRangeFolding_,
|
||||
&updateNotificationsEnabled_,
|
||||
&cursorIconAlwaysOn_,
|
||||
&debugEnabled_,
|
||||
|
|
@ -251,6 +253,7 @@ public:
|
|||
settings::SettingsInterface<bool> showMapAttribution_ {};
|
||||
settings::SettingsInterface<bool> showMapCenter_ {};
|
||||
settings::SettingsInterface<bool> showMapLogo_ {};
|
||||
settings::SettingsInterface<bool> showSmoothedRangeFolding_ {};
|
||||
settings::SettingsInterface<bool> updateNotificationsEnabled_ {};
|
||||
settings::SettingsInterface<bool> cursorIconAlwaysOn_ {};
|
||||
settings::SettingsInterface<bool> debugEnabled_ {};
|
||||
|
|
@ -527,21 +530,22 @@ void SettingsDialogImpl::SetupGeneralTab()
|
|||
{
|
||||
settings::GeneralSettings& generalSettings =
|
||||
settings::GeneralSettings::Instance();
|
||||
|
||||
settings::ProductSettings& productSettings =
|
||||
settings::ProductSettings::Instance();
|
||||
|
||||
QObject::connect(
|
||||
self_->ui->themeComboBox,
|
||||
&QComboBox::currentTextChanged,
|
||||
self_,
|
||||
[this](const QString& text)
|
||||
{
|
||||
types::UiStyle style = types::GetUiStyle(text.toStdString());
|
||||
bool themeFileEnabled = style == types::UiStyle::FusionCustom;
|
||||
self_->ui->themeComboBox,
|
||||
&QComboBox::currentTextChanged,
|
||||
self_,
|
||||
[this](const QString& text)
|
||||
{
|
||||
types::UiStyle style = types::GetUiStyle(text.toStdString());
|
||||
bool themeFileEnabled = style == types::UiStyle::FusionCustom;
|
||||
|
||||
self_->ui->themeFileLineEdit->setEnabled(themeFileEnabled);
|
||||
self_->ui->themeFileSelectButton->setEnabled(themeFileEnabled);
|
||||
self_->ui->resetThemeFileButton->setEnabled(themeFileEnabled);
|
||||
});
|
||||
self_->ui->themeFileLineEdit->setEnabled(themeFileEnabled);
|
||||
self_->ui->themeFileSelectButton->setEnabled(themeFileEnabled);
|
||||
self_->ui->resetThemeFileButton->setEnabled(themeFileEnabled);
|
||||
});
|
||||
|
||||
theme_.SetSettingsVariable(generalSettings.theme());
|
||||
SCWX_SETTINGS_COMBO_BOX(theme_,
|
||||
|
|
@ -759,6 +763,11 @@ void SettingsDialogImpl::SetupGeneralTab()
|
|||
showMapLogo_.SetSettingsVariable(generalSettings.show_map_logo());
|
||||
showMapLogo_.SetEditWidget(self_->ui->showMapLogoCheckBox);
|
||||
|
||||
showSmoothedRangeFolding_.SetSettingsVariable(
|
||||
productSettings.show_smoothed_range_folding());
|
||||
showSmoothedRangeFolding_.SetEditWidget(
|
||||
self_->ui->showSmoothedRangeFoldingCheckBox);
|
||||
|
||||
updateNotificationsEnabled_.SetSettingsVariable(
|
||||
generalSettings.update_notifications_enabled());
|
||||
updateNotificationsEnabled_.SetEditWidget(
|
||||
|
|
|
|||
|
|
@ -135,9 +135,9 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-246</y>
|
||||
<width>511</width>
|
||||
<height>703</height>
|
||||
<y>-272</y>
|
||||
<width>513</width>
|
||||
<height>702</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
|
|
@ -562,6 +562,19 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cursorIconAlwaysOnCheckBox">
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Multi-Pane Cursor Marker Always On</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showMapAttributionCheckBox">
|
||||
<property name="text">
|
||||
|
|
@ -584,22 +597,16 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableUpdateNotificationsCheckBox">
|
||||
<widget class="QCheckBox" name="showSmoothedRangeFoldingCheckBox">
|
||||
<property name="text">
|
||||
<string>Update Notifications Enabled</string>
|
||||
<string>Show Range Folding when Smoothing Radar Data</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cursorIconAlwaysOnCheckBox">
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="enableUpdateNotificationsCheckBox">
|
||||
<property name="text">
|
||||
<string>Multi-Pane Cursor Marker Always On</string>
|
||||
<string>Update Notifications Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue