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

@ -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<model::RadarProductModel>();
ui->resourceTreeView->setModel(p->radarProductModel_->model());
// Configure Alert Dock
ui->alertDock->setVisible(false);
ui->alertSettings->addAction(ui->actionActiveAlerts);
// Configure Map
p->ConfigureMapLayout();

View file

@ -65,6 +65,7 @@
</property>
<addaction name="actionRadarToolbox"/>
<addaction name="actionResourceExplorer"/>
<addaction name="actionAlerts"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuView"/>
@ -306,6 +307,82 @@
</layout>
</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">
<property name="text">
<string>E&amp;xit</string>
@ -336,6 +413,19 @@
<string>Text &amp;Event Product...</string>
</property>
</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>
<resources>
<include location="../../../../scwx-qt.qrc"/>