From 54f38b6c1a188efbe68119c776dcbae633d52433 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Wed, 12 Oct 2022 22:51:00 -0500 Subject: [PATCH] Alert dock --- .../icons/font-awesome-6/sliders-solid.svg | 1 + scwx-qt/scwx-qt.qrc | 1 + scwx-qt/source/scwx/qt/main/main_window.cpp | 15 +++- scwx-qt/source/scwx/qt/main/main_window.ui | 90 +++++++++++++++++++ 4 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 scwx-qt/res/icons/font-awesome-6/sliders-solid.svg diff --git a/scwx-qt/res/icons/font-awesome-6/sliders-solid.svg b/scwx-qt/res/icons/font-awesome-6/sliders-solid.svg new file mode 100644 index 00000000..16599163 --- /dev/null +++ b/scwx-qt/res/icons/font-awesome-6/sliders-solid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/scwx-qt/scwx-qt.qrc b/scwx-qt/scwx-qt.qrc index cf31a039..87539432 100644 --- a/scwx-qt/scwx-qt.qrc +++ b/scwx-qt/scwx-qt.qrc @@ -13,6 +13,7 @@ res/config/radar_sites.json res/fonts/din1451alt.ttf res/fonts/din1451alt_g.ttf + res/icons/font-awesome-6/sliders-solid.svg res/icons/font-awesome-6/square-minus-regular.svg res/icons/font-awesome-6/square-plus-regular.svg res/textures/lines/default-1x7.png diff --git a/scwx-qt/source/scwx/qt/main/main_window.cpp b/scwx-qt/source/scwx/qt/main/main_window.cpp index 4c560580..ba14585b 100644 --- a/scwx-qt/source/scwx/qt/main/main_window.cpp +++ b/scwx-qt/source/scwx/qt/main/main_window.cpp @@ -129,6 +129,9 @@ MainWindow::MainWindow(QWidget* parent) : { ui->setupUi(this); + // Assign the bottom left corner to the left dock widget + setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea); + ui->vcpLabel->setVisible(false); ui->vcpValueLabel->setVisible(false); ui->vcpDescriptionLabel->setVisible(false); @@ -145,12 +148,22 @@ MainWindow::MainWindow(QWidget* parent) : tr("&Resource Explorer")); ui->actionResourceExplorer->setVisible(false); - // Configure Docks + ui->menuView->insertAction(ui->actionAlerts, + ui->alertDock->toggleViewAction()); + ui->alertDock->toggleViewAction()->setText(tr("&Alerts")); + ui->actionAlerts->setVisible(false); + + // Configure Resource Explorer Dock ui->resourceExplorerDock->setVisible(false); p->radarProductModel_ = std::make_shared(); ui->resourceTreeView->setModel(p->radarProductModel_->model()); + // Configure Alert Dock + ui->alertDock->setVisible(false); + + ui->alertSettings->addAction(ui->actionActiveAlerts); + // Configure Map p->ConfigureMapLayout(); diff --git a/scwx-qt/source/scwx/qt/main/main_window.ui b/scwx-qt/source/scwx/qt/main/main_window.ui index 791e9f97..8cc65cac 100644 --- a/scwx-qt/source/scwx/qt/main/main_window.ui +++ b/scwx-qt/source/scwx/qt/main/main_window.ui @@ -65,6 +65,7 @@ + @@ -306,6 +307,82 @@ + + + Alerts + + + 8 + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Filter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Settings + + + ... + + + + :/res/icons/font-awesome-6/sliders-solid.svg:/res/icons/font-awesome-6/sliders-solid.svg + + + QToolButton::InstantPopup + + + + + + + + + E&xit @@ -336,6 +413,19 @@ Text &Event Product... + + + &Alerts + + + + + true + + + &Active Alerts + +