feat:在主窗口中添加实时报警面板

This commit is contained in:
duanshengchao 2025-09-24 12:10:51 +08:00
parent cb52a6bd29
commit 1419e2efc6
25 changed files with 1135 additions and 104 deletions

View File

@ -51,6 +51,7 @@ set(H_HEADER_FILES
include/alarmEventGlobal.h include/alarmEventGlobal.h
include/alarmEventMainDialog.h include/alarmEventMainDialog.h
include/alarmEventDataView.h include/alarmEventDataView.h
include/alarmEventRealTimeDock.h
) )
set(CPP_SOURCE_FILES set(CPP_SOURCE_FILES
@ -83,6 +84,7 @@ set(CPP_SOURCE_FILES
source/httpRequestManager.cpp source/httpRequestManager.cpp
source/alarmEventMainDialog.cpp source/alarmEventMainDialog.cpp
source/alarmEventDataView.cpp source/alarmEventDataView.cpp
source/alarmEventRealTimeDock.cpp
) )
set(UI_FILES set(UI_FILES
@ -102,6 +104,7 @@ set(UI_FILES
ui/dateTimeSelectionPanel.ui ui/dateTimeSelectionPanel.ui
ui/dpConfigurationDialog.ui ui/dpConfigurationDialog.ui
ui/alarmEventMainDialog.ui ui/alarmEventMainDialog.ui
ui/alarmEventRealTimeDock.ui
) )
set(UTIL_FILES set(UTIL_FILES

View File

@ -23,6 +23,9 @@ public:
signals: signals:
void sgl_hide(); void sgl_hide();
protected:
void showEvent(QShowEvent* event) override;
public slots: public slots:
void onBtnClicked_close(); void onBtnClicked_close();

View File

@ -0,0 +1,39 @@
#ifndef ALARMEVENTREALTIMEDOCK_H
#define ALARMEVENTREALTIMEDOCK_H
#include <QWidget>
QT_BEGIN_NAMESPACE
namespace Ui {
class alarmEventRealTimeDock;
}
QT_END_NAMESPACE
class QPropertyAnimation;
class AlarmEventRealTimeDock : public QWidget
{
Q_OBJECT
public:
AlarmEventRealTimeDock(QWidget *parent = nullptr);
~AlarmEventRealTimeDock();
void updateGeometry();
public slots:
void onBtnClicked_open();
void onBtnClicked_close();
void onBtnClicked_confirmAll();
void onBtnClicked_checkAll();
private:
void expand();
void collapse();
Ui::alarmEventRealTimeDock* ui;
QPropertyAnimation* m_animation;
bool m_isInAnimation;
QString m_curState;
};
#endif

View File

@ -22,6 +22,7 @@ class DateTimeWidget;
class TimeLineWidget; class TimeLineWidget;
class DataPanel; class DataPanel;
class dpConfigurationDialog; class dpConfigurationDialog;
class AlarmEventRealTimeDock;
class AlarmEventMainDialog; class AlarmEventMainDialog;
namespace dashboardFrame { namespace dashboardFrame {
@ -54,6 +55,7 @@ public:
protected: protected:
bool eventFilter(QObject*, QEvent*) override; bool eventFilter(QObject*, QEvent*) override;
void resizeEvent(QResizeEvent*) override; void resizeEvent(QResizeEvent*) override;
void moveEvent(QMoveEvent*) override;
void dragEnterEvent(QDragEnterEvent* event) override; void dragEnterEvent(QDragEnterEvent* event) override;
//void dragMoveEvent(QDragMoveEvent* event) override; //void dragMoveEvent(QDragMoveEvent* event) override;
void dragLeaveEvent(QDragLeaveEvent* event) override; void dragLeaveEvent(QDragLeaveEvent* event) override;
@ -113,6 +115,7 @@ private:
TimeLineWidget* m_pTimeLineWidget; TimeLineWidget* m_pTimeLineWidget;
dpConfigurationDialog* m_pPanelConfigurationDialog; dpConfigurationDialog* m_pPanelConfigurationDialog;
AlarmEventRealTimeDock* m_pAlarmEventRealTimeDock;
AlarmEventMainDialog* m_pAlarmEventMainDialog; AlarmEventMainDialog* m_pAlarmEventMainDialog;
QTimer* m_pTimer_RealTime; QTimer* m_pTimer_RealTime;

View File

@ -31,7 +31,8 @@ public:
void removeSecondartWindow(QString&); void removeSecondartWindow(QString&);
protected: protected:
virtual void resizeEvent(QResizeEvent*) override; bool event(QEvent*) override;
//void resizeEvent(QResizeEvent*) override;
private: private:
Ui::dvieMainWindow* ui; Ui::dvieMainWindow* ui;

View File

@ -20,7 +20,7 @@ public:
~FunctionNavigationBar(); ~FunctionNavigationBar();
void expand(); void expand();
void shrink(); void collapse();
protected: protected:
void enterEvent(QEnterEvent*); void enterEvent(QEnterEvent*);

View File

@ -1,6 +1,7 @@
#ifndef MAINWINDOW_H #ifndef MAINWINDOW_H
#define MAINWINDOW_H #define MAINWINDOW_H
#include "alarmEventRealTimeDock.h"
#include <QMainWindow> #include <QMainWindow>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

View File

@ -1,5 +1,12 @@
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>images/icon_configuration_blue.png</file>
<file>images/icon_checked_blue.png</file>
<file>images/icon_search_blue.png</file>
<file>images/icon_doubleArrow_down_default.png</file>
<file>images/icon_doubleArrow_down_hover.png</file>
<file>images/icon_doubleArrow_up_default.png</file>
<file>images/icon_doubleArrow_up_hover.png</file>
<file>images/icon_first.png</file> <file>images/icon_first.png</file>
<file>images/icon_last.png</file> <file>images/icon_last.png</file>
<file>images/icon_next.png</file> <file>images/icon_next.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

View File

@ -97,6 +97,15 @@ void AlarmEventDataModel::iniHeaderData()
} }
void AlarmEventDataModel::updateCurPageData()
{
m_curPageData.clear();
}
void AlarmEventDataModel::updateTotalCount()
{}
///////------AlarmEventDataDelegate----- ///////------AlarmEventDataDelegate-----
AlarmEventDataDelegate::AlarmEventDataDelegate(QTableView* view, QObject* parent) AlarmEventDataDelegate::AlarmEventDataDelegate(QTableView* view, QObject* parent)
: QStyledItemDelegate(parent) : QStyledItemDelegate(parent)

View File

@ -4,6 +4,7 @@
AlarmEventMainDialog::AlarmEventMainDialog(QWidget *parent) AlarmEventMainDialog::AlarmEventMainDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
, ui(new Ui::alarmEventMainDialog) , ui(new Ui::alarmEventMainDialog)
, m_mode(Historical)
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowFlags(Qt::FramelessWindowHint); setWindowFlags(Qt::FramelessWindowHint);
@ -17,6 +18,11 @@ AlarmEventMainDialog::~AlarmEventMainDialog()
delete ui; delete ui;
} }
void AlarmEventMainDialog::showEvent(QShowEvent* event)
{
QDialog::showEvent(event);
}
void AlarmEventMainDialog::setMode(MainDialogMode mode) void AlarmEventMainDialog::setMode(MainDialogMode mode)
{ {
if(mode == RealTime) if(mode == RealTime)

View File

@ -0,0 +1,114 @@
#include "alarmEventRealTimeDock.h"
#include "./ui_alarmEventRealTimeDock.h"
#include <QPropertyAnimation>
#include <QTimer>
#define bottomMargin 0
AlarmEventRealTimeDock::AlarmEventRealTimeDock(QWidget* parent)
: QWidget(parent)
, ui(new Ui::alarmEventRealTimeDock)
{
ui->setupUi(this);
setAttribute(Qt::WA_TranslucentBackground);
m_isInAnimation = false;
m_curState = "collapse";
m_animation = new QPropertyAnimation(this, "geometry");
m_animation->setDuration(120);
connect(m_animation, &QPropertyAnimation::finished, this, [this]{m_isInAnimation = false;});
ui->btnClose->setVisible(false);
connect(ui->btnOpen, &QPushButton::clicked, this, &AlarmEventRealTimeDock::onBtnClicked_open);
connect(ui->btnClose, &QPushButton::clicked, this, &AlarmEventRealTimeDock::onBtnClicked_close);
connect(ui->btnConfirmAll, &QPushButton::clicked, this, &AlarmEventRealTimeDock::onBtnClicked_confirmAll);
connect(ui->btnCheckAll, &QPushButton::clicked, this, &AlarmEventRealTimeDock::onBtnClicked_checkAll);
/*if(parent)
{
int parentWidth = parent->width();
int parentHeight = parent->height();
int selfWidth = parentWidth * 0.8;
int x = (parentWidth - selfWidth) * 0.5;
int y = parentHeight - ui->tobBar->height();
setGeometry(x, y, selfWidth, height());
}*/
}
AlarmEventRealTimeDock::~AlarmEventRealTimeDock()
{}
void AlarmEventRealTimeDock::expand()
{
if(m_isInAnimation || m_curState == "expand" )
return;
QWidget* parent = this->parentWidget();
if(parent)
{
QRect startRect(x(), y(), width(), height());
QRect endRect(x(), parent->height() - height() - bottomMargin, width(), height());
m_animation->setStartValue(startRect);
m_animation->setEndValue(endRect);
m_animation->start();
m_curState = "expand";
m_isInAnimation = true;
}
}
void AlarmEventRealTimeDock::collapse()
{
if(m_isInAnimation || m_curState == "collapse" )
return;
QWidget* parent = this->parentWidget();
if(parent)
{
QRect startRect(x(), y(), width(), height());
QRect endRect(x(), parent->height() - ui->tobBar->height(), width(), height());
m_animation->setStartValue(startRect);
m_animation->setEndValue(endRect);
m_animation->start();
m_curState = "collapse";
m_isInAnimation = true;
}
}
void AlarmEventRealTimeDock::updateGeometry()
{
QWidget* parent = this->parentWidget();
if(parent)
{
int parentWidth = parent->width();
int parentHeight = parent->height();
int selfWidth = parentWidth * 0.8;
int x = (parentWidth - selfWidth) * 0.5;
int y = parentHeight - ui->tobBar->height();
if(m_curState == "expand")
y = parentHeight - this->height() - bottomMargin;
setGeometry(x, y, selfWidth, height());
}
}
void AlarmEventRealTimeDock::onBtnClicked_open()
{
expand();
ui->btnOpen->setVisible(false);
ui->btnClose->setVisible(true);
}
void AlarmEventRealTimeDock::onBtnClicked_close()
{
collapse();
ui->btnOpen->setVisible(true);
ui->btnClose->setVisible(false);
}
void AlarmEventRealTimeDock::onBtnClicked_confirmAll()
{}
void AlarmEventRealTimeDock::onBtnClicked_checkAll()
{}

View File

@ -13,6 +13,7 @@
#include "dataPanel/dpConfigurationDialog.h" #include "dataPanel/dpConfigurationDialog.h"
#include "dateTimeWidget.h" #include "dateTimeWidget.h"
#include "util/TimeLine/timeLineWidget.h" #include "util/TimeLine/timeLineWidget.h"
#include "alarmEventRealTimeDock.h"
#include "alarmEventMainDialog.h" #include "alarmEventMainDialog.h"
#include <QKeyEvent> #include <QKeyEvent>
@ -34,6 +35,7 @@ DashboardFrame::DashboardFrame(const QString& strName, dashboardFrame::frameType
, m_curOperationDashboard(nullptr) , m_curOperationDashboard(nullptr)
, m_pPanelSelectionDialog(nullptr) , m_pPanelSelectionDialog(nullptr)
, m_pPanelConfigurationDialog(nullptr) , m_pPanelConfigurationDialog(nullptr)
, m_pAlarmEventRealTimeDock(nullptr)
, m_pAlarmEventMainDialog(nullptr) , m_pAlarmEventMainDialog(nullptr)
{ {
ui->setupUi(this); ui->setupUi(this);
@ -43,7 +45,11 @@ DashboardFrame::DashboardFrame(const QString& strName, dashboardFrame::frameType
setObjectName(strName); setObjectName(strName);
m_pParentWindow = parent; m_pParentWindow = parent;
m_type = fType; m_type = fType;
if(m_type == dashboardFrame::ft_secondary) //只有主window具有报警提示 if(m_type == dashboardFrame::ft_main) //只有主window具有报警提示
{
m_pAlarmEventRealTimeDock = new AlarmEventRealTimeDock(this);
}
else
{ {
ui->btnAllEvent->setVisible(false); ui->btnAllEvent->setVisible(false);
ui->btnAlarm->setVisible(false); ui->btnAlarm->setVisible(false);
@ -147,9 +153,19 @@ void DashboardFrame::resizeEvent(QResizeEvent* event)
m_curActiveDashboard->resizePanel(ratioX, ratioY); m_curActiveDashboard->resizePanel(ratioX, ratioY);
} }
if(m_pAlarmEventRealTimeDock)
m_pAlarmEventRealTimeDock->updateGeometry();
QWidget::resizeEvent(event); QWidget::resizeEvent(event);
} }
void DashboardFrame::moveEvent(QMoveEvent* event)
{
Q_UNUSED(event);
if(m_pAlarmEventRealTimeDock)
m_pAlarmEventRealTimeDock->updateGeometry();
}
void DashboardFrame::dragEnterEvent(QDragEnterEvent* event) void DashboardFrame::dragEnterEvent(QDragEnterEvent* event)
{ {
const QMimeData* mimeData = event->mimeData(); const QMimeData* mimeData = event->mimeData();

View File

@ -10,7 +10,6 @@ DvieMainWindow::DvieMainWindow(QWidget *parent)
, ui(new Ui::dvieMainWindow) , ui(new Ui::dvieMainWindow)
, m_pTransparentMask(nullptr) , m_pTransparentMask(nullptr)
, m_pDashboardFrame(nullptr) , m_pDashboardFrame(nullptr)
{ {
ui->setupUi(this); ui->setupUi(this);
setProperty("windowType", "main"); setProperty("windowType", "main");
@ -24,13 +23,24 @@ DvieMainWindow::~DvieMainWindow()
delete ui; delete ui;
} }
void DvieMainWindow::resizeEvent(QResizeEvent* event) bool DvieMainWindow::event(QEvent* event)
{
if(event->type() == QEvent::Resize)
{
if(m_pTransparentMask && m_pTransparentMask->isVisible())
m_pTransparentMask->setGeometry(ui->topWidget->geometry());
}
return QMainWindow::event(event);
}
/*void DvieMainWindow::resizeEvent(QResizeEvent* event)
{ {
if(m_pTransparentMask && m_pTransparentMask->isVisible()) if(m_pTransparentMask && m_pTransparentMask->isVisible())
m_pTransparentMask->setGeometry(ui->topWidget->geometry()); m_pTransparentMask->setGeometry(ui->topWidget->geometry());
QMainWindow::resizeEvent(event); QMainWindow::resizeEvent(event);
} }*/
void DvieMainWindow::showTransparentMask() void DvieMainWindow::showTransparentMask()
{ {

View File

@ -33,7 +33,7 @@ void FunctionNavigationBar::initialize()
connect(ui->funBtn_TCC, SIGNAL(clicked()), this, SLOT(onBtnClicked_funBtn())); connect(ui->funBtn_TCC, SIGNAL(clicked()), this, SLOT(onBtnClicked_funBtn()));
m_pLastFunButton = ui->funBtn_Dvie; m_pLastFunButton = ui->funBtn_Dvie;
m_strCurState = "shrink"; m_strCurState = "collapse";
m_bInAnimation = false; m_bInAnimation = false;
m_pAni_geo = new QPropertyAnimation(this, "geometry"); m_pAni_geo = new QPropertyAnimation(this, "geometry");
m_pAni_geo->setDuration(100); m_pAni_geo->setDuration(100);
@ -57,7 +57,7 @@ void FunctionNavigationBar::enterEvent(QEnterEvent* e)
void FunctionNavigationBar::leaveEvent(QEvent* e) void FunctionNavigationBar::leaveEvent(QEvent* e)
{ {
Q_UNUSED(e); Q_UNUSED(e);
shrink(); collapse();
} }
void FunctionNavigationBar::expand() void FunctionNavigationBar::expand()
@ -79,9 +79,9 @@ void FunctionNavigationBar::expand()
m_strCurState = "expand"; m_strCurState = "expand";
} }
} }
void FunctionNavigationBar::shrink() void FunctionNavigationBar::collapse()
{ {
if(m_bInAnimation || m_strCurState == "shrink" ) if(m_bInAnimation || m_strCurState == "collapse" )
return; return;
QWidget* pParent = parentWidget(); QWidget* pParent = parentWidget();
@ -95,7 +95,7 @@ void FunctionNavigationBar::shrink()
m_pAni_geo->setStartValue(startRect); m_pAni_geo->setStartValue(startRect);
m_pAni_geo->setEndValue(endRect); m_pAni_geo->setEndValue(endRect);
m_pAni_geo->start(); m_pAni_geo->start();
m_strCurState = "shrink"; m_strCurState = "collapse";
} }
} }

View File

@ -8,6 +8,9 @@
MainWindow::MainWindow(QWidget *parent) MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent) : QMainWindow(parent)
, ui(new Ui::MainWindow) , ui(new Ui::MainWindow)
, m_funNavigationBar(nullptr)
, m_pDvieMainWindow(nullptr)
, m_pTccMainWindow(nullptr)
{ {
ui->setupUi(this); ui->setupUi(this);
@ -27,14 +30,14 @@ void MainWindow::initialize()
ui->hLayout_TCC->addWidget(m_pTccMainWindow); ui->hLayout_TCC->addWidget(m_pTccMainWindow);
ui->stackedWidget->setCurrentIndex(0); ui->stackedWidget->setCurrentIndex(0);
m_funNavigationBar = new FunctionNavigationBar(this); /*m_funNavigationBar = new FunctionNavigationBar(this);
connect(m_funNavigationBar, SIGNAL(sgl_funBtnClicke(QString)), this, SLOT(onSignal_funBtnClicked(QString))); connect(m_funNavigationBar, SIGNAL(sgl_funBtnClicke(QString)), this, SLOT(onSignal_funBtnClicked(QString)));
// QPoint originPoint = mapToGlobal(QPoint(0, 0)); 只有dialog需要做此计算 // QPoint originPoint = mapToGlobal(QPoint(0, 0)); 只有dialog需要做此计算
int nWidth = m_funNavigationBar->width(); int nWidth = m_funNavigationBar->width();
int nY = (this->height() - m_funNavigationBar->height()) * 0.5; int nY = (this->height() - m_funNavigationBar->height()) * 0.5;
m_funNavigationBar->setGeometry(0, nY, nWidth, m_funNavigationBar->height()); m_funNavigationBar->setGeometry(0, nY, nWidth, m_funNavigationBar->height());
m_funNavigationBar->raise(); m_funNavigationBar->raise();
m_funNavigationBar->show(); m_funNavigationBar->show();*/
} }
bool MainWindow::event(QEvent* event) bool MainWindow::event(QEvent* event)
@ -42,9 +45,11 @@ bool MainWindow::event(QEvent* event)
//qDebug() << event->type(); //qDebug() << event->type();
if(event->type() == QEvent::Resize || event->type() == QEvent::Move) if(event->type() == QEvent::Resize || event->type() == QEvent::Move)
{ {
//int nHeight = this->height() * 0.8; if(m_funNavigationBar)
int nY = (this->height() - m_funNavigationBar->height()) * 0.5; {
m_funNavigationBar->setGeometry(0, nY, m_funNavigationBar->width(), m_funNavigationBar->height()); int nY = (this->height() - m_funNavigationBar->height()) * 0.5;
m_funNavigationBar->setGeometry(0, nY, m_funNavigationBar->width(), m_funNavigationBar->height());
}
} }
return QMainWindow::event(event); return QMainWindow::event(event);

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1539</width> <width>1539</width>
<height>1005</height> <height>992</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -652,7 +652,7 @@ QHeaderView
} }
QHeaderView::section QHeaderView::section
{ {
font: 700 12pt &quot;微软雅黑&quot;; font: 700 12pt &quot;黑&quot;;
color: rgb(250, 250, 250); color: rgb(250, 250, 250);
background-color:transparent; background-color:transparent;
border:0px; border:0px;
@ -666,15 +666,14 @@ QHeaderView::section:horizontal:last
QTableView QTableView
{ {
outline:0px; outline:0px;
border:0px;
background-color: transparent; background-color: transparent;
font: 11pt &quot;黑体&quot;;
} }
QTableView::item QTableView::item
{ {
font: 12pt &quot;黑体&quot;;
color: rgb(250, 250, 250); color: rgb(250, 250, 250);
background-color:transparent; background-color:transparent;
border:0px;
border-right: 1px solid rgb(60,60,60);
} }
QTableView::item:hover QTableView::item:hover
{ {
@ -683,90 +682,89 @@ QTableView::item:selected
{ {
}</string> }</string>
</property> </property>
<widget class="QTableWidget" name="tableWidget"> <layout class="QVBoxLayout" name="vLayout_table">
<property name="geometry"> <property name="topMargin">
<rect> <number>15</number>
<x>40</x>
<y>50</y>
<width>931</width>
<height>411</height>
</rect>
</property> </property>
<property name="textElideMode"> <item>
<enum>Qt::TextElideMode::ElideNone</enum> <widget class="QTableWidget" name="tableWidget">
</property> <property name="textElideMode">
<property name="showGrid"> <enum>Qt::TextElideMode::ElideNone</enum>
<bool>false</bool> </property>
</property> <property name="showGrid">
<attribute name="verticalHeaderVisible"> <bool>false</bool>
<bool>false</bool> </property>
</attribute> <attribute name="verticalHeaderVisible">
<row> <bool>false</bool>
<property name="text"> </attribute>
<string>新建行</string> <row>
</property> <property name="text">
</row> <string>新建行</string>
<row> </property>
<property name="text"> </row>
<string>新建行</string> <row>
</property> <property name="text">
</row> <string>新建行</string>
<row> </property>
<property name="text"> </row>
<string>新建行</string> <row>
</property> <property name="text">
</row> <string>新建行</string>
<column> </property>
<property name="text"> </row>
<string>序号</string> <column>
</property> <property name="text">
</column> <string>序号</string>
<column> </property>
<property name="text"> </column>
<string>时间</string> <column>
</property> <property name="text">
</column> <string>时间</string>
<column> </property>
<property name="text"> </column>
<string>厂站</string> <column>
</property> <property name="text">
</column> <string>厂站</string>
<column> </property>
<property name="text"> </column>
<string>详情</string> <column>
</property> <property name="text">
</column> <string>详情</string>
<column> </property>
<property name="text"> </column>
<string>类型</string> <column>
</property> <property name="text">
</column> <string>类型</string>
<column> </property>
<property name="text"> </column>
<string>级别</string> <column>
</property> <property name="text">
</column> <string>级别</string>
<column> </property>
<property name="text"> </column>
<string>操作</string> <column>
</property> <property name="text">
</column> <string>操作</string>
<item row="0" column="0"> </property>
<property name="text"> </column>
<string>1</string> <item row="0" column="0">
</property> <property name="text">
<string>1</string>
</property>
</item>
<item row="0" column="1">
<property name="text">
<string>2025-09-17 165101</string>
</property>
</item>
<item row="0" column="2">
<property name="text">
<string>灵州换流站</string>
</property>
</item>
</widget>
</item> </item>
<item row="0" column="1"> </layout>
<property name="text">
<string>2025-09-17 165101</string>
</property>
</item>
<item row="0" column="2">
<property name="text">
<string>灵州换流站</string>
</property>
</item>
</widget>
</widget> </widget>
</item> </item>
<item> <item>
@ -851,7 +849,7 @@ border:1px solid rgb(100,100,100);
</rect> </rect>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">font: 11pt &quot;黑体&quot;;</string> <string notr="true">font: 10pt &quot;黑体&quot;;</string>
</property> </property>
<property name="text"> <property name="text">
<string>共100条记录</string> <string>共100条记录</string>

View File

@ -0,0 +1,816 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>alarmEventRealTimeDock</class>
<widget class="QWidget" name="alarmEventRealTimeDock">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1177</width>
<height>250</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true">QLabel
{
font: 10pt &quot;黑体&quot;;
color: rgb(200, 200, 200);
}
</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<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="QWidget" name="contentWidget" native="true">
<property name="styleSheet">
<string notr="true">QWidget #contentWidget
{
background-color: rgba(36,43,50,215);
border-top-left-radius:6px;
border-top-right-radius:6px;
}
</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<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="QWidget" name="tobBar" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>36</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QWidget #tobBar
{
background-color: transparent;
}</string>
</property>
<layout class="QHBoxLayout" name="hLayou_top">
<property name="spacing">
<number>0</number>
</property>
<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="QWidget" name="alarmCountPanel" native="true">
<property name="minimumSize">
<size>
<width>342</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>342</width>
<height>16777215</height>
</size>
</property>
<widget class="QLabel" name="alarmUnit">
<property name="geometry">
<rect>
<x>140</x>
<y>10</y>
<width>16</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>条</string>
</property>
</widget>
<widget class="QLabel" name="alarmIcon">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>16</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/icon_alarm.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="alarmLabel">
<property name="geometry">
<rect>
<x>45</x>
<y>10</y>
<width>61</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>实时告警:</string>
</property>
</widget>
<widget class="QLabel" name="alarmCount">
<property name="geometry">
<rect>
<x>105</x>
<y>10</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(67,160,249);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>184</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QWidget" name="openCloseWidget" native="true">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QWidget #openCloseWidget
{
}</string>
</property>
<widget class="QPushButton" name="btnClose">
<property name="geometry">
<rect>
<x>35</x>
<y>6</y>
<width>51</width>
<height>23</height>
</rect>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">QPushButton
{
border-image: url(:/images/icon_doubleArrow_down_default.png);
}
QPushButton:hover
{
border-image: url(:/images/icon_doubleArrow_down_hover.png);
}
QPushButton:pressed
{
border-image: url(:/images/icon_doubleArrow_down_default.png);
}</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QPushButton" name="btnOpen">
<property name="geometry">
<rect>
<x>35</x>
<y>6</y>
<width>51</width>
<height>23</height>
</rect>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">QPushButton
{
border-image: url(:/images/icon_doubleArrow_up_default.png);
}
QPushButton:hover
{
border-image: url(:/images/icon_doubleArrow_up_hover.png);
}
QPushButton:pressed
{
border-image: url(:/images/icon_doubleArrow_up_default.png);
}</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>183</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QWidget" name="alarmDetailsPanel" native="true">
<property name="minimumSize">
<size>
<width>342</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>342</width>
<height>342</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<widget class="QLabel" name="accidentIcon">
<property name="geometry">
<rect>
<x>10</x>
<y>12</y>
<width>12</width>
<height>12</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 85, 0);
border-radius:6px;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="accidentLabel">
<property name="geometry">
<rect>
<x>25</x>
<y>10</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>事故</string>
</property>
</widget>
<widget class="QLabel" name="accidentCount">
<property name="geometry">
<rect>
<x>53</x>
<y>10</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(250, 250, 250);</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<widget class="QLabel" name="abnormalCount">
<property name="geometry">
<rect>
<x>136</x>
<y>10</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(250, 250, 250);</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<widget class="QLabel" name="abnormalLabel">
<property name="geometry">
<rect>
<x>108</x>
<y>10</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>异常</string>
</property>
</widget>
<widget class="QLabel" name="abnormalIcon">
<property name="geometry">
<rect>
<x>93</x>
<y>12</y>
<width>12</width>
<height>12</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 170, 0);
border-radius:6px;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="alertCount">
<property name="geometry">
<rect>
<x>219</x>
<y>10</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(250, 250, 250);</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<widget class="QLabel" name="alertIcon">
<property name="geometry">
<rect>
<x>176</x>
<y>12</y>
<width>12</width>
<height>12</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(0, 170, 255);
border-radius:6px;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="alertLabel">
<property name="geometry">
<rect>
<x>191</x>
<y>10</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>预警</string>
</property>
</widget>
<widget class="QLabel" name="informCount">
<property name="geometry">
<rect>
<x>302</x>
<y>10</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(250, 250, 250);</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<widget class="QLabel" name="informLabel">
<property name="geometry">
<rect>
<x>274</x>
<y>10</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>告知</string>
</property>
</widget>
<widget class="QLabel" name="informIcon">
<property name="geometry">
<rect>
<x>259</x>
<y>12</y>
<width>12</width>
<height>12</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(0, 170, 0);
border-radius:6px;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="tableView" native="true">
<property name="styleSheet">
<string notr="true">QWidget #tableView
{
background-color: rgba(54, 62, 74,90);
}
QPushButton
{
color: rgb(250, 250, 250);
font: 10pt &quot;黑体&quot;;
border:0px;
background-color:transparent;
}
QPushButton:hover
{
color: rgb(67,160,249);
}
QPushButton:pressed
{
color: rgb(250, 250, 250);
}
QHeaderView
{
background-color: rgba(11, 26, 33, 160);
}
QHeaderView::section
{
font: 700 10pt &quot;黑体&quot;;
color: rgb(250, 250, 250);
background-color:transparent;
border:0px;
border-right: 1px solid rgb(60,60,60);
}
QHeaderView::section:horizontal:last
{
border-right: 0px;
}
QTableView
{
outline:0px;
border:0px;
background-color: transparent;
font: 10pt &quot;黑体&quot;;
}
QTableView::item
{
color: rgb(250, 250, 250);
background-color:transparent;
}
QTableView::item:hover
{
}
QTableView::item:selected
{
}</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>15</number>
</property>
<property name="rightMargin">
<number>15</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTableWidget" name="tableWidget">
<property name="textElideMode">
<enum>Qt::TextElideMode::ElideNone</enum>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<row>
<property name="text">
<string>新建行</string>
</property>
</row>
<row>
<property name="text">
<string>新建行</string>
</property>
</row>
<row>
<property name="text">
<string>新建行</string>
</property>
</row>
<row>
<property name="text">
<string>新建行</string>
</property>
</row>
<row>
<property name="text">
<string>新建行</string>
</property>
</row>
<column>
<property name="text">
<string>序号</string>
</property>
</column>
<column>
<property name="text">
<string>时间</string>
</property>
</column>
<column>
<property name="text">
<string>厂站</string>
</property>
</column>
<column>
<property name="text">
<string>详情</string>
</property>
</column>
<column>
<property name="text">
<string>类型</string>
</property>
</column>
<column>
<property name="text">
<string>级别</string>
</property>
</column>
<column>
<property name="text">
<string>操作</string>
</property>
</column>
<item row="0" column="0">
<property name="text">
<string>1</string>
</property>
</item>
<item row="0" column="1">
<property name="text">
<string>2025-09-17 165101</string>
</property>
</item>
<item row="0" column="2">
<property name="text">
<string>灵州换流站</string>
</property>
</item>
<item row="1" column="0">
<property name="text">
<string>2</string>
</property>
</item>
<item row="2" column="0">
<property name="text">
<string>3</string>
</property>
</item>
<item row="3" column="0">
<property name="text">
<string>4</string>
</property>
</item>
<item row="4" column="0">
<property name="text">
<string>5</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QWidget" name="bottomPanel" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>26</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>26</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="hLayout_bottomPanel">
<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="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>883</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="hLayout_funBtns">
<property name="spacing">
<number>15</number>
</property>
<item>
<widget class="QPushButton" name="btnConfirmAll">
<property name="minimumSize">
<size>
<width>81</width>
<height>26</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>81</width>
<height>26</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton
{
icon-size:18px;
icon: url(:/images/icon_checked_blue.png);
}</string>
</property>
<property name="text">
<string>全部确认</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnCheckAll">
<property name="minimumSize">
<size>
<width>81</width>
<height>26</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>81</width>
<height>26</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton
{
icon-size:18px;
icon: url(:/images/icon_search_blue.png);
}</string>
</property>
<property name="text">
<string>查看全部</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnSetting">
<property name="minimumSize">
<size>
<width>61</width>
<height>26</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>61</width>
<height>26</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton
{
icon-size:18px;
icon: url(:/images/icon_configuration_blue.png);
}</string>
</property>
<property name="text">
<string>设置</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../resource/PowerMaster.qrc"/>
</resources>
<connections/>
</ui>