mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 17:00:05 +00:00
Add show map center to settings
This commit is contained in:
parent
201010a5cc
commit
4424c19d7f
5 changed files with 333 additions and 295 deletions
|
|
@ -58,6 +58,7 @@ public:
|
|||
mapboxApiKey_.SetDefault("?");
|
||||
maptilerApiKey_.SetDefault("?");
|
||||
showMapAttribution_.SetDefault(true);
|
||||
showMapCenter_.SetDefault(false);
|
||||
showMapLogo_.SetDefault(true);
|
||||
theme_.SetDefault(defaultThemeValue);
|
||||
trackLocation_.SetDefault(false);
|
||||
|
|
@ -122,6 +123,7 @@ public:
|
|||
SettingsVariable<std::string> mapboxApiKey_ {"mapbox_api_key"};
|
||||
SettingsVariable<std::string> maptilerApiKey_ {"maptiler_api_key"};
|
||||
SettingsVariable<bool> showMapAttribution_ {"show_map_attribution"};
|
||||
SettingsVariable<bool> showMapCenter_ {"show_map_center"};
|
||||
SettingsVariable<bool> showMapLogo_ {"show_map_logo"};
|
||||
SettingsVariable<std::string> theme_ {"theme"};
|
||||
SettingsVariable<bool> trackLocation_ {"track_location"};
|
||||
|
|
@ -147,6 +149,7 @@ GeneralSettings::GeneralSettings() :
|
|||
&p->mapboxApiKey_,
|
||||
&p->maptilerApiKey_,
|
||||
&p->showMapAttribution_,
|
||||
&p->showMapCenter_,
|
||||
&p->showMapLogo_,
|
||||
&p->theme_,
|
||||
&p->trackLocation_,
|
||||
|
|
@ -240,6 +243,11 @@ SettingsVariable<bool>& GeneralSettings::show_map_attribution() const
|
|||
return p->showMapAttribution_;
|
||||
}
|
||||
|
||||
SettingsVariable<bool>& GeneralSettings::show_map_center() const
|
||||
{
|
||||
return p->showMapCenter_;
|
||||
}
|
||||
|
||||
SettingsVariable<bool>& GeneralSettings::show_map_logo() const
|
||||
{
|
||||
return p->showMapLogo_;
|
||||
|
|
@ -297,6 +305,7 @@ bool operator==(const GeneralSettings& lhs, const GeneralSettings& rhs)
|
|||
lhs.p->mapboxApiKey_ == rhs.p->mapboxApiKey_ &&
|
||||
lhs.p->maptilerApiKey_ == rhs.p->maptilerApiKey_ &&
|
||||
lhs.p->showMapAttribution_ == rhs.p->showMapAttribution_ &&
|
||||
lhs.p->showMapCenter_ == rhs.p->showMapCenter_ &&
|
||||
lhs.p->showMapLogo_ == rhs.p->showMapLogo_ &&
|
||||
lhs.p->theme_ == rhs.p->theme_ &&
|
||||
lhs.p->trackLocation_ == rhs.p->trackLocation_ &&
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ public:
|
|||
SettingsVariable<std::string>& mapbox_api_key() const;
|
||||
SettingsVariable<std::string>& maptiler_api_key() const;
|
||||
SettingsVariable<bool>& show_map_attribution() const;
|
||||
SettingsVariable<bool>& show_map_center() const;
|
||||
SettingsVariable<bool>& show_map_logo() const;
|
||||
SettingsVariable<std::string>& theme() const;
|
||||
SettingsVariable<bool>& track_location() const;
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ public:
|
|||
&defaultTimeZone_,
|
||||
&antiAliasingEnabled_,
|
||||
&showMapAttribution_,
|
||||
&showMapCenter_,
|
||||
&showMapLogo_,
|
||||
&updateNotificationsEnabled_,
|
||||
&debugEnabled_,
|
||||
|
|
@ -233,6 +234,7 @@ public:
|
|||
settings::SettingsInterface<std::string> theme_ {};
|
||||
settings::SettingsInterface<bool> antiAliasingEnabled_ {};
|
||||
settings::SettingsInterface<bool> showMapAttribution_ {};
|
||||
settings::SettingsInterface<bool> showMapCenter_ {};
|
||||
settings::SettingsInterface<bool> showMapLogo_ {};
|
||||
settings::SettingsInterface<bool> updateNotificationsEnabled_ {};
|
||||
settings::SettingsInterface<bool> debugEnabled_ {};
|
||||
|
|
@ -666,6 +668,9 @@ void SettingsDialogImpl::SetupGeneralTab()
|
|||
generalSettings.show_map_attribution());
|
||||
showMapAttribution_.SetEditWidget(self_->ui->showMapAttributionCheckBox);
|
||||
|
||||
showMapCenter_.SetSettingsVariable(generalSettings.show_map_center());
|
||||
showMapCenter_.SetEditWidget(self_->ui->showMapCenterCheckBox);
|
||||
|
||||
showMapLogo_.SetSettingsVariable(generalSettings.show_map_logo());
|
||||
showMapLogo_.SetEditWidget(self_->ui->showMapLogoCheckBox);
|
||||
|
||||
|
|
|
|||
|
|
@ -117,13 +117,25 @@
|
|||
</property>
|
||||
<widget class="QWidget" name="general">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea_2">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>513</width>
|
||||
<height>454</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="leftMargin">
|
||||
|
|
@ -138,15 +150,26 @@
|
|||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="defaultAlertActionLabel">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Default Alert Action</string>
|
||||
<string>Default Radar Site</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="themeComboBox"/>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>Default Time Zone</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Map Provider</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QToolButton" name="resetThemeButton">
|
||||
|
|
@ -159,20 +182,24 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QComboBox" name="defaultAlertActionComboBox"/>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QLineEdit" name="mapboxApiKeyLineEdit">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
<item row="8" column="4">
|
||||
<widget class="QToolButton" name="resetDefaultAlertActionButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<item row="9" column="2">
|
||||
<widget class="QComboBox" name="clockFormatComboBox"/>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Default Time Zone</string>
|
||||
<string>Mapbox API Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -183,20 +210,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Theme</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Map Provider</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
|
|
@ -204,6 +217,31 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="4">
|
||||
<widget class="QToolButton" name="resetDefaultTimeZoneButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QComboBox" name="defaultAlertActionComboBox"/>
|
||||
</item>
|
||||
<item row="7" column="4">
|
||||
<widget class="QToolButton" name="resetMapTilerApiKeyButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QToolButton" name="resetGridHeightButton">
|
||||
<property name="text">
|
||||
|
|
@ -215,68 +253,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QComboBox" name="mapProviderComboBox"/>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QComboBox" name="defaultTimeZoneComboBox"/>
|
||||
</item>
|
||||
<item row="7" column="4">
|
||||
<widget class="QToolButton" name="resetMapTilerApiKeyButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<widget class="QToolButton" name="resetMapProviderButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QToolButton" name="resetGridWidthButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string>Clock Format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="4">
|
||||
<widget class="QToolButton" name="resetClockFormatButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QSpinBox" name="gridWidthSpinBox"/>
|
||||
</item>
|
||||
<item row="9" column="2">
|
||||
<widget class="QComboBox" name="clockFormatComboBox"/>
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="radarSiteComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QToolButton" name="resetRadarSiteButton">
|
||||
|
|
@ -289,51 +267,25 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="radarSiteComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Default Radar Site</string>
|
||||
<item row="6" column="2">
|
||||
<widget class="QLineEdit" name="mapboxApiKeyLineEdit">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Mapbox API Key</string>
|
||||
<string>Theme</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QToolButton" name="resetMapboxApiKeyButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="themeComboBox"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Grid Height</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="4">
|
||||
<widget class="QToolButton" name="resetDefaultAlertActionButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="10" column="2">
|
||||
<widget class="QComboBox" name="defaultTimeZoneComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QToolButton" name="radarSiteSelectButton">
|
||||
|
|
@ -349,11 +301,15 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QSpinBox" name="gridHeightSpinBox"/>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="defaultAlertActionLabel">
|
||||
<property name="text">
|
||||
<string>Default Alert Action</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="4">
|
||||
<widget class="QToolButton" name="resetDefaultTimeZoneButton">
|
||||
<item row="2" column="4">
|
||||
<widget class="QToolButton" name="resetGridWidthButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
|
|
@ -363,6 +319,62 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QComboBox" name="mapProviderComboBox"/>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<widget class="QToolButton" name="resetMapProviderButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QToolButton" name="resetMapboxApiKeyButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="4">
|
||||
<widget class="QToolButton" name="resetClockFormatButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QSpinBox" name="gridHeightSpinBox"/>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QSpinBox" name="gridWidthSpinBox"/>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string>Clock Format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Grid Height</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
@ -380,6 +392,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showMapCenterCheckBox">
|
||||
<property name="text">
|
||||
<string>Show Map Center</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showMapLogoCheckBox">
|
||||
<property name="text">
|
||||
|
|
@ -416,6 +435,10 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="palettes">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
|
|
@ -438,8 +461,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>498</width>
|
||||
<height>383</height>
|
||||
<width>63</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 260b340030487b01ce9aa37135d949008c972f27
|
||||
Subproject commit ab32df5b0731d70aa5b977453c9aa4786eb0bd3f
|
||||
Loading…
Add table
Add a link
Reference in a new issue