mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:50:05 +00:00
Add placefile settings initial layout
This commit is contained in:
parent
ae1bca3602
commit
4c685e5abb
8 changed files with 207 additions and 4 deletions
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M57.7 193l9.4 16.4c8.3 14.5 21.9 25.2 38 29.8L163 255.7c17.2 4.9 29 20.6 29 38.5v39.9c0 11 6.2 21 16 25.9s16 14.9 16 25.9v39c0 15.6 14.9 26.9 29.9 22.6c16.1-4.6 28.6-17.5 32.7-33.8l2.8-11.2c4.2-16.9 15.2-31.4 30.3-40l8.1-4.6c15-8.5 24.2-24.5 24.2-41.7v-8.3c0-12.7-5.1-24.9-14.1-33.9l-3.9-3.9c-9-9-21.2-14.1-33.9-14.1H257c-11.1 0-22.1-2.9-31.8-8.4l-34.5-19.7c-4.3-2.5-7.6-6.5-9.2-11.2c-3.2-9.6 1.1-20 10.2-24.5l5.9-3c6.6-3.3 14.3-3.9 21.3-1.5l23.2 7.7c8.2 2.7 17.2-.4 21.9-7.5c4.7-7 4.2-16.3-1.2-22.8l-13.6-16.3c-10-12-9.9-29.5 .3-41.3l15.7-18.3c8.8-10.3 10.2-25 3.5-36.7l-2.4-4.2c-3.5-.2-6.9-.3-10.4-.3C163.1 48 84.4 108.9 57.7 193zM464 256c0-36.8-9.6-71.4-26.4-101.5L412 164.8c-15.7 6.3-23.8 23.8-18.5 39.8l16.9 50.7c3.5 10.4 12 18.3 22.6 20.9l29.1 7.3c1.2-9 1.8-18.2 1.8-27.5zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"/></svg>
|
||||
|
After Width: | Height: | Size: 1 KiB |
|
|
@ -160,6 +160,7 @@ set(HDR_UI source/scwx/qt/ui/about_dialog.hpp
|
|||
source/scwx/qt/ui/level2_products_widget.hpp
|
||||
source/scwx/qt/ui/level2_settings_widget.hpp
|
||||
source/scwx/qt/ui/level3_products_widget.hpp
|
||||
source/scwx/qt/ui/placefile_settings_widget.hpp
|
||||
source/scwx/qt/ui/radar_site_dialog.hpp
|
||||
source/scwx/qt/ui/settings_dialog.hpp
|
||||
source/scwx/qt/ui/update_dialog.hpp)
|
||||
|
|
@ -174,6 +175,7 @@ set(SRC_UI source/scwx/qt/ui/about_dialog.cpp
|
|||
source/scwx/qt/ui/level2_products_widget.cpp
|
||||
source/scwx/qt/ui/level2_settings_widget.cpp
|
||||
source/scwx/qt/ui/level3_products_widget.cpp
|
||||
source/scwx/qt/ui/placefile_settings_widget.cpp
|
||||
source/scwx/qt/ui/radar_site_dialog.cpp
|
||||
source/scwx/qt/ui/settings_dialog.cpp
|
||||
source/scwx/qt/ui/update_dialog.cpp)
|
||||
|
|
@ -183,6 +185,7 @@ set(UI_UI source/scwx/qt/ui/about_dialog.ui
|
|||
source/scwx/qt/ui/animation_dock_widget.ui
|
||||
source/scwx/qt/ui/collapsible_group.ui
|
||||
source/scwx/qt/ui/imgui_debug_dialog.ui
|
||||
source/scwx/qt/ui/placefile_settings_widget.ui
|
||||
source/scwx/qt/ui/radar_site_dialog.ui
|
||||
source/scwx/qt/ui/settings_dialog.ui
|
||||
source/scwx/qt/ui/update_dialog.ui)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
<file>res/icons/font-awesome-6/backward-step-solid.svg</file>
|
||||
<file>res/icons/font-awesome-6/book-solid.svg</file>
|
||||
<file>res/icons/font-awesome-6/discord.svg</file>
|
||||
<file>res/icons/font-awesome-6/earth-americas-solid.svg</file>
|
||||
<file>res/icons/font-awesome-6/forward-step-solid.svg</file>
|
||||
<file>res/icons/font-awesome-6/gears-solid.svg</file>
|
||||
<file>res/icons/font-awesome-6/github.svg</file>
|
||||
|
|
|
|||
38
scwx-qt/source/scwx/qt/ui/placefile_settings_widget.cpp
Normal file
38
scwx-qt/source/scwx/qt/ui/placefile_settings_widget.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#include "placefile_settings_widget.hpp"
|
||||
#include "ui_placefile_settings_widget.h"
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace ui
|
||||
{
|
||||
|
||||
class PlacefileSettingsWidgetImpl
|
||||
{
|
||||
public:
|
||||
explicit PlacefileSettingsWidgetImpl(PlacefileSettingsWidget* self) :
|
||||
self_ {self}
|
||||
{
|
||||
}
|
||||
~PlacefileSettingsWidgetImpl() = default;
|
||||
|
||||
PlacefileSettingsWidget* self_;
|
||||
};
|
||||
|
||||
PlacefileSettingsWidget::PlacefileSettingsWidget(QWidget* parent) :
|
||||
QFrame(parent),
|
||||
p {std::make_unique<PlacefileSettingsWidgetImpl>(this)},
|
||||
ui(new Ui::PlacefileSettingsWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
PlacefileSettingsWidget::~PlacefileSettingsWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
35
scwx-qt/source/scwx/qt/ui/placefile_settings_widget.hpp
Normal file
35
scwx-qt/source/scwx/qt/ui/placefile_settings_widget.hpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class PlacefileSettingsWidget;
|
||||
}
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace ui
|
||||
{
|
||||
|
||||
class PlacefileSettingsWidgetImpl;
|
||||
|
||||
class PlacefileSettingsWidget : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PlacefileSettingsWidget(QWidget* parent = nullptr);
|
||||
~PlacefileSettingsWidget();
|
||||
|
||||
private:
|
||||
friend class PlacefileSettingsWidgetImpl;
|
||||
std::unique_ptr<PlacefileSettingsWidgetImpl> p;
|
||||
Ui::PlacefileSettingsWidget* ui;
|
||||
};
|
||||
|
||||
} // namespace ui
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
88
scwx-qt/source/scwx/qt/ui/placefile_settings_widget.ui
Normal file
88
scwx-qt/source/scwx/qt/ui/placefile_settings_widget.ui
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PlacefileSettingsWidget</class>
|
||||
<widget class="QFrame" name="PlacefileSettingsWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTreeView" name="placefileView"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="buttonFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="placefileFilter">
|
||||
<property name="placeholderText">
|
||||
<string>Filter</string>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="addButton">
|
||||
<property name="text">
|
||||
<string>&Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="removeButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
#include <scwx/qt/map/map_provider.hpp>
|
||||
#include <scwx/qt/settings/settings_interface.hpp>
|
||||
#include <scwx/qt/types/alert_types.hpp>
|
||||
#include <scwx/qt/ui/placefile_settings_widget.hpp>
|
||||
#include <scwx/qt/ui/radar_site_dialog.hpp>
|
||||
#include <scwx/qt/util/color.hpp>
|
||||
#include <scwx/qt/util/file.hpp>
|
||||
|
|
@ -115,6 +116,7 @@ public:
|
|||
void SetupGeneralTab();
|
||||
void SetupPalettesColorTablesTab();
|
||||
void SetupPalettesAlertsTab();
|
||||
void SetupPlacefilesTab();
|
||||
|
||||
void ShowColorDialog(QLineEdit* lineEdit, QFrame* frame = nullptr);
|
||||
void UpdateRadarDialogLocation(const std::string& id);
|
||||
|
|
@ -136,8 +138,9 @@ public:
|
|||
RadarSiteLabel(std::shared_ptr<config::RadarSite>& radarSite);
|
||||
static void SetBackgroundColor(const std::string& value, QFrame* frame);
|
||||
|
||||
SettingsDialog* self_;
|
||||
RadarSiteDialog* radarSiteDialog_;
|
||||
SettingsDialog* self_;
|
||||
PlacefileSettingsWidget* placefileSettingsWidget_;
|
||||
RadarSiteDialog* radarSiteDialog_;
|
||||
|
||||
settings::SettingsInterface<std::string> defaultRadarSite_ {};
|
||||
settings::SettingsInterface<std::vector<std::int64_t>> fontSizes_ {};
|
||||
|
|
@ -178,6 +181,9 @@ SettingsDialog::SettingsDialog(QWidget* parent) :
|
|||
// Palettes > Alerts
|
||||
p->SetupPalettesAlertsTab();
|
||||
|
||||
// Placefiles
|
||||
p->SetupPlacefilesTab();
|
||||
|
||||
p->ConnectSignals();
|
||||
}
|
||||
|
||||
|
|
@ -618,6 +624,12 @@ void SettingsDialogImpl::SetupPalettesAlertsTab()
|
|||
}
|
||||
}
|
||||
|
||||
void SettingsDialogImpl::SetupPlacefilesTab()
|
||||
{
|
||||
placefileSettingsWidget_ = new PlacefileSettingsWidget(self_);
|
||||
self_->ui->placefiles->layout()->addWidget(placefileSettingsWidget_);
|
||||
}
|
||||
|
||||
QImage SettingsDialogImpl::GenerateColorTableImage(
|
||||
std::shared_ptr<common::ColorTable> colorTable,
|
||||
std::uint16_t min,
|
||||
|
|
|
|||
|
|
@ -73,6 +73,15 @@
|
|||
<normaloff>:/res/icons/font-awesome-6/palette-solid.svg</normaloff>:/res/icons/font-awesome-6/palette-solid.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Placefiles</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../scwx-qt.qrc">
|
||||
<normaloff>:/res/icons/font-awesome-6/earth-americas-solid.svg</normaloff>:/res/icons/font-awesome-6/earth-americas-solid.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
|
@ -338,8 +347,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>66</width>
|
||||
<height>18</height>
|
||||
<width>481</width>
|
||||
<height>382</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
|
|
@ -410,6 +419,22 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="placefiles">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue