Alert dock

This commit is contained in:
Dan Paulat 2022-10-12 22:51:00 -05:00
parent 3f647cc8c3
commit 54f38b6c1a
4 changed files with 106 additions and 1 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 416c0-17.7 14.3-32 32-32l54.7 0c12.3-28.3 40.5-48 73.3-48s61 19.7 73.3 48L480 384c17.7 0 32 14.3 32 32s-14.3 32-32 32l-246.7 0c-12.3 28.3-40.5 48-73.3 48s-61-19.7-73.3-48L32 448c-17.7 0-32-14.3-32-32zm192 0c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32zM384 256c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32zm-32-80c32.8 0 61 19.7 73.3 48l54.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-54.7 0c-12.3 28.3-40.5 48-73.3 48s-61-19.7-73.3-48L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l246.7 0c12.3-28.3 40.5-48 73.3-48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32s-14.3-32-32-32zm73.3 0L480 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-214.7 0c-12.3 28.3-40.5 48-73.3 48s-61-19.7-73.3-48L32 128C14.3 128 0 113.7 0 96S14.3 64 32 64l86.7 0C131 35.7 159.2 16 192 16s61 19.7 73.3 48z"/></svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -13,6 +13,7 @@
<file>res/config/radar_sites.json</file> <file>res/config/radar_sites.json</file>
<file>res/fonts/din1451alt.ttf</file> <file>res/fonts/din1451alt.ttf</file>
<file>res/fonts/din1451alt_g.ttf</file> <file>res/fonts/din1451alt_g.ttf</file>
<file>res/icons/font-awesome-6/sliders-solid.svg</file>
<file>res/icons/font-awesome-6/square-minus-regular.svg</file> <file>res/icons/font-awesome-6/square-minus-regular.svg</file>
<file>res/icons/font-awesome-6/square-plus-regular.svg</file> <file>res/icons/font-awesome-6/square-plus-regular.svg</file>
<file>res/textures/lines/default-1x7.png</file> <file>res/textures/lines/default-1x7.png</file>

View file

@ -129,6 +129,9 @@ MainWindow::MainWindow(QWidget* parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
// Assign the bottom left corner to the left dock widget
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
ui->vcpLabel->setVisible(false); ui->vcpLabel->setVisible(false);
ui->vcpValueLabel->setVisible(false); ui->vcpValueLabel->setVisible(false);
ui->vcpDescriptionLabel->setVisible(false); ui->vcpDescriptionLabel->setVisible(false);
@ -145,12 +148,22 @@ MainWindow::MainWindow(QWidget* parent) :
tr("&Resource Explorer")); tr("&Resource Explorer"));
ui->actionResourceExplorer->setVisible(false); 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); ui->resourceExplorerDock->setVisible(false);
p->radarProductModel_ = std::make_shared<model::RadarProductModel>(); p->radarProductModel_ = std::make_shared<model::RadarProductModel>();
ui->resourceTreeView->setModel(p->radarProductModel_->model()); ui->resourceTreeView->setModel(p->radarProductModel_->model());
// Configure Alert Dock
ui->alertDock->setVisible(false);
ui->alertSettings->addAction(ui->actionActiveAlerts);
// Configure Map // Configure Map
p->ConfigureMapLayout(); p->ConfigureMapLayout();

View file

@ -65,6 +65,7 @@
</property> </property>
<addaction name="actionRadarToolbox"/> <addaction name="actionRadarToolbox"/>
<addaction name="actionResourceExplorer"/> <addaction name="actionResourceExplorer"/>
<addaction name="actionAlerts"/>
</widget> </widget>
<addaction name="menuFile"/> <addaction name="menuFile"/>
<addaction name="menuView"/> <addaction name="menuView"/>
@ -306,6 +307,82 @@
</layout> </layout>
</widget> </widget>
</widget> </widget>
<widget class="QDockWidget" name="alertDock">
<property name="windowTitle">
<string>Alerts</string>
</property>
<attribute name="dockWidgetArea">
<number>8</number>
</attribute>
<widget class="QWidget" name="radarDockContents">
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QTableView" name="alertView"/>
</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="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="alertFilter">
<property name="placeholderText">
<string>Filter</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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="QToolButton" name="alertSettings">
<property name="toolTip">
<string>Settings</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../../scwx-qt.qrc">
<normaloff>:/res/icons/font-awesome-6/sliders-solid.svg</normaloff>:/res/icons/font-awesome-6/sliders-solid.svg</iconset>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
<action name="actionExit"> <action name="actionExit">
<property name="text"> <property name="text">
<string>E&amp;xit</string> <string>E&amp;xit</string>
@ -336,6 +413,19 @@
<string>Text &amp;Event Product...</string> <string>Text &amp;Event Product...</string>
</property> </property>
</action> </action>
<action name="actionAlerts">
<property name="text">
<string>&amp;Alerts</string>
</property>
</action>
<action name="actionActiveAlerts">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>&amp;Active Alerts</string>
</property>
</action>
</widget> </widget>
<resources> <resources>
<include location="../../../../scwx-qt.qrc"/> <include location="../../../../scwx-qt.qrc"/>