Layer manager dialog stub

This commit is contained in:
Dan Paulat 2023-10-11 05:31:37 -05:00
parent f2addd29e6
commit ad55ec7f51
11 changed files with 283 additions and 0 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 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="M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"/></svg>

After

Width:  |  Height:  |  Size: 416 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z"/></svg>

After

Width:  |  Height:  |  Size: 416 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M246.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L224 402.7 361.4 265.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-160 160zm160-352l-160 160c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L224 210.7 361.4 73.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3z"/></svg>

After

Width:  |  Height:  |  Size: 583 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M246.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 109.3 361.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160zm160 352l-160-160c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 301.3 361.4 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3z"/></svg>

After

Width:  |  Height:  |  Size: 583 B

View file

@ -181,6 +181,7 @@ set(HDR_UI source/scwx/qt/ui/about_dialog.hpp
source/scwx/qt/ui/flow_layout.hpp
source/scwx/qt/ui/imgui_debug_dialog.hpp
source/scwx/qt/ui/imgui_debug_widget.hpp
source/scwx/qt/ui/layer_dialog.hpp
source/scwx/qt/ui/left_elided_item_delegate.hpp
source/scwx/qt/ui/level2_products_widget.hpp
source/scwx/qt/ui/level2_settings_widget.hpp
@ -199,6 +200,7 @@ set(SRC_UI source/scwx/qt/ui/about_dialog.cpp
source/scwx/qt/ui/flow_layout.cpp
source/scwx/qt/ui/imgui_debug_dialog.cpp
source/scwx/qt/ui/imgui_debug_widget.cpp
source/scwx/qt/ui/layer_dialog.cpp
source/scwx/qt/ui/left_elided_item_delegate.cpp
source/scwx/qt/ui/level2_products_widget.cpp
source/scwx/qt/ui/level2_settings_widget.cpp
@ -215,6 +217,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/layer_dialog.ui
source/scwx/qt/ui/open_url_dialog.ui
source/scwx/qt/ui/placefile_dialog.ui
source/scwx/qt/ui/placefile_settings_widget.ui

View file

@ -20,8 +20,12 @@
<file>res/fonts/Inconsolata-Regular.ttf</file>
<file>res/icons/scwx-256.ico</file>
<file>res/icons/scwx-256.png</file>
<file>res/icons/font-awesome-6/angle-down-solid.svg</file>
<file>res/icons/font-awesome-6/angle-left-solid.svg</file>
<file>res/icons/font-awesome-6/angle-right-solid.svg</file>
<file>res/icons/font-awesome-6/angle-up-solid.svg</file>
<file>res/icons/font-awesome-6/angles-down-solid.svg</file>
<file>res/icons/font-awesome-6/angles-up-solid.svg</file>
<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>

View file

@ -22,6 +22,7 @@
#include <scwx/qt/ui/collapsible_group.hpp>
#include <scwx/qt/ui/flow_layout.hpp>
#include <scwx/qt/ui/imgui_debug_dialog.hpp>
#include <scwx/qt/ui/layer_dialog.hpp>
#include <scwx/qt/ui/level2_products_widget.hpp>
#include <scwx/qt/ui/level2_settings_widget.hpp>
#include <scwx/qt/ui/level3_products_widget.hpp>
@ -78,6 +79,7 @@ public:
animationDockWidget_ {nullptr},
aboutDialog_ {nullptr},
imGuiDebugDialog_ {nullptr},
layerDialog_ {nullptr},
placefileDialog_ {nullptr},
radarSiteDialog_ {nullptr},
settingsDialog_ {nullptr},
@ -167,6 +169,7 @@ public:
ui::AnimationDockWidget* animationDockWidget_;
ui::AboutDialog* aboutDialog_;
ui::ImGuiDebugDialog* imGuiDebugDialog_;
ui::LayerDialog* layerDialog_;
ui::PlacefileDialog* placefileDialog_;
ui::RadarSiteDialog* radarSiteDialog_;
ui::SettingsDialog* settingsDialog_;
@ -249,6 +252,9 @@ MainWindow::MainWindow(QWidget* parent) :
// Placefile Manager Dialog
p->placefileDialog_ = new ui::PlacefileDialog(this);
// Layer Dialog
p->layerDialog_ = new ui::LayerDialog(this);
// Settings Dialog
p->settingsDialog_ = new ui::SettingsDialog(this);
@ -454,6 +460,11 @@ void MainWindow::on_actionPlacefileManager_triggered()
p->placefileDialog_->show();
}
void MainWindow::on_actionLayerManager_triggered()
{
p->layerDialog_->show();
}
void MainWindow::on_actionImGuiDebug_triggered()
{
p->imGuiDebugDialog_->show();

View file

@ -37,6 +37,7 @@ private slots:
void on_actionSettings_triggered();
void on_actionExit_triggered();
void on_actionPlacefileManager_triggered();
void on_actionLayerManager_triggered();
void on_actionImGuiDebug_triggered();
void on_actionDumpRadarProductRecords_triggered();
void on_actionUserManual_triggered();

View file

@ -0,0 +1,38 @@
#include "layer_dialog.hpp"
#include "ui_layer_dialog.h"
#include <scwx/util/logger.hpp>
namespace scwx
{
namespace qt
{
namespace ui
{
static const std::string logPrefix_ = "scwx::qt::ui::layer_dialog";
static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
class LayerDialogImpl
{
public:
explicit LayerDialogImpl() {}
~LayerDialogImpl() = default;
};
LayerDialog::LayerDialog(QWidget* parent) :
QDialog(parent),
p {std::make_unique<LayerDialogImpl>()},
ui(new Ui::LayerDialog)
{
ui->setupUi(this);
}
LayerDialog::~LayerDialog()
{
delete ui;
}
} // namespace ui
} // namespace qt
} // namespace scwx

View file

@ -0,0 +1,35 @@
#pragma once
#include <QDialog>
namespace Ui
{
class LayerDialog;
}
namespace scwx
{
namespace qt
{
namespace ui
{
class LayerDialogImpl;
class LayerDialog : public QDialog
{
Q_OBJECT
public:
explicit LayerDialog(QWidget* parent = nullptr);
~LayerDialog();
private:
friend class LayerDialogImpl;
std::unique_ptr<LayerDialogImpl> p;
Ui::LayerDialog* ui;
};
} // namespace ui
} // namespace qt
} // namespace scwx

View file

@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LayerDialog</class>
<widget class="QDialog" name="LayerDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Layer Manager</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<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="QTreeView" name="layerTreeView"/>
</item>
<item>
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_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>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="moveTopButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../scwx-qt.qrc">
<normaloff>:/res/icons/font-awesome-6/angles-up-solid.svg</normaloff>:/res/icons/font-awesome-6/angles-up-solid.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="moveUpButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../scwx-qt.qrc">
<normaloff>:/res/icons/font-awesome-6/angle-up-solid.svg</normaloff>:/res/icons/font-awesome-6/angle-up-solid.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="moveDownButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../scwx-qt.qrc">
<normaloff>:/res/icons/font-awesome-6/angle-down-solid.svg</normaloff>:/res/icons/font-awesome-6/angle-down-solid.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="moveBottomButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../scwx-qt.qrc">
<normaloff>:/res/icons/font-awesome-6/angles-down-solid.svg</normaloff>:/res/icons/font-awesome-6/angles-down-solid.svg</iconset>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>60</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../../../../scwx-qt.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>LayerDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>LayerDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>