Add custom style URL and draw layer to settings UI

This commit is contained in:
Dan Paulat 2024-06-21 23:33:40 -05:00
parent ec0e502516
commit a683778624
2 changed files with 60 additions and 5 deletions

View file

@ -117,6 +117,8 @@ public:
&theme_,
&defaultAlertAction_,
&clockFormat_,
&customStyleDrawLayer_,
&customStyleUrl_,
&defaultTimeZone_,
&positioningPlugin_,
&nmeaBaudRate_,
@ -222,6 +224,8 @@ public:
settings::SettingsInterface<std::string> mapTilerApiKey_ {};
settings::SettingsInterface<std::string> defaultAlertAction_ {};
settings::SettingsInterface<std::string> clockFormat_ {};
settings::SettingsInterface<std::string> customStyleDrawLayer_ {};
settings::SettingsInterface<std::string> customStyleUrl_ {};
settings::SettingsInterface<std::string> defaultTimeZone_ {};
settings::SettingsInterface<std::string> positioningPlugin_ {};
settings::SettingsInterface<std::int64_t> nmeaBaudRate_ {};
@ -566,6 +570,15 @@ void SettingsDialogImpl::SetupGeneralTab()
mapTilerApiKey_.SetEditWidget(self_->ui->mapTilerApiKeyLineEdit);
mapTilerApiKey_.SetResetButton(self_->ui->resetMapTilerApiKeyButton);
customStyleUrl_.SetSettingsVariable(generalSettings.custom_style_url());
customStyleUrl_.SetEditWidget(self_->ui->customMapUrlLineEdit);
customStyleUrl_.SetResetButton(self_->ui->resetCustomMapUrlButton);
customStyleDrawLayer_.SetSettingsVariable(
generalSettings.custom_style_draw_layer());
customStyleDrawLayer_.SetEditWidget(self_->ui->customMapLayerLineEdit);
customStyleDrawLayer_.SetResetButton(self_->ui->resetCustomMapLayerButton);
defaultAlertAction_.SetSettingsVariable(
generalSettings.default_alert_action());
SCWX_SETTINGS_COMBO_BOX(defaultAlertAction_,

View file

@ -135,9 +135,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>513</width>
<height>566</height>
<y>-113</y>
<width>511</width>
<height>669</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@ -482,6 +482,48 @@
</property>
</widget>
</item>
<item row="14" column="2">
<widget class="QLineEdit" name="customMapUrlLineEdit"/>
</item>
<item row="15" column="2">
<widget class="QLineEdit" name="customMapLayerLineEdit"/>
</item>
<item row="14" column="0">
<widget class="QLabel" name="label_26">
<property name="text">
<string>Custom Map URL</string>
</property>
</widget>
</item>
<item row="15" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>Custom Map Layer</string>
</property>
</widget>
</item>
<item row="14" column="4">
<widget class="QToolButton" name="resetCustomMapUrlButton">
<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="15" column="4">
<widget class="QToolButton" name="resetCustomMapLayerButton">
<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>
</layout>
</widget>
</item>
@ -568,8 +610,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>63</width>
<height>18</height>
<width>98</width>
<height>28</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_3">