feat:添加事件主窗口及其相关文件

This commit is contained in:
duanshengchao 2025-09-19 17:45:52 +08:00
parent 956483cc94
commit cb52a6bd29
8 changed files with 1199 additions and 780 deletions

View File

@ -2,8 +2,73 @@
#define ALARMEVENTDATAVIEW_H #define ALARMEVENTDATAVIEW_H
#include <QWidget> #include <QWidget>
#include <QTableView>
#include <QAbstractTableModel>
#include <QStyledItemDelegate>
class AlarmEventDataModel : public QAbstractTableModel
{
Q_OBJECT
public:
struct RowData
{
QVector<QVariant> values;
};
struct PaginationInfo
{
int totalEntries;
int entriesPerpage;
int totalPages;
int currentPage;
};
struct SectionData
{
int width = -1;
QString text;
SectionData(QString t, int w)
:text(t),
width(w){}
};
explicit AlarmEventDataModel(QObject* parent = nullptr);
~AlarmEventDataModel();
QModelIndex index(int row, int column, const QModelIndex& parent) const override;
QVariant data(const QModelIndex& index, int role) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
//bool setData(const QModelIndex& index, const QVariant &value, int role = Qt::EditRole) override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
Qt::ItemFlags flags(const QModelIndex& index) const override;
private:
void iniHeaderData();
void updateCurPageData(); //更新当前页的数据
void updateTotalCount(); //更新总记录数
QVector<RowData> m_curPageData;
QVector<SectionData> m_headerData;
PaginationInfo m_paginationInfo;
};
class AlarmEventDataDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
explicit AlarmEventDataDelegate(QTableView* view, QObject* parent = nullptr);
~AlarmEventDataDelegate();
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
private:
QTableView* m_tableView;
};
class QTableView;
class QVBoxLayout; class QVBoxLayout;
class AlarmEventDataView : public QWidget class AlarmEventDataView : public QWidget
{ {
@ -15,6 +80,8 @@ public:
private: private:
QTableView* m_tableView; QTableView* m_tableView;
AlarmEventDataModel* m_tableModel;
AlarmEventDataDelegate* m_delegate;
QVBoxLayout* m_vLayout; QVBoxLayout* m_vLayout;
}; };

View File

@ -4,7 +4,7 @@
#include <QString> #include <QString>
#include <QDateTime> #include <QDateTime>
enum MainDialogType enum MainDialogMode
{ {
RealTime = 0, RealTime = 0,
Historical Historical

View File

@ -15,9 +15,11 @@ class AlarmEventMainDialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
AlarmEventMainDialog(MainDialogType type, QWidget *parent = nullptr); AlarmEventMainDialog(QWidget *parent = nullptr);
~AlarmEventMainDialog(); ~AlarmEventMainDialog();
void setMode(MainDialogMode mode);
signals: signals:
void sgl_hide(); void sgl_hide();
@ -26,6 +28,8 @@ public slots:
private: private:
Ui::alarmEventMainDialog* ui; Ui::alarmEventMainDialog* ui;
MainDialogMode m_mode;
}; };
#endif #endif

View File

@ -22,6 +22,7 @@ class DateTimeWidget;
class TimeLineWidget; class TimeLineWidget;
class DataPanel; class DataPanel;
class dpConfigurationDialog; class dpConfigurationDialog;
class AlarmEventMainDialog;
namespace dashboardFrame { namespace dashboardFrame {
enum frameType enum frameType
@ -74,6 +75,8 @@ public slots:
void onBtnClicked_addDataPanel(); void onBtnClicked_addDataPanel();
void onBtnClicked_dashboardList(); void onBtnClicked_dashboardList();
void onBtnClicked_dashboardTab(); void onBtnClicked_dashboardTab();
void onBtnClicked_showRealtimeEvents();
void onBtnClicked_showHistoricalEvents();
void onMenuAction_dashboardList(); void onMenuAction_dashboardList();
@ -110,6 +113,7 @@ private:
TimeLineWidget* m_pTimeLineWidget; TimeLineWidget* m_pTimeLineWidget;
dpConfigurationDialog* m_pPanelConfigurationDialog; dpConfigurationDialog* m_pPanelConfigurationDialog;
AlarmEventMainDialog* m_pAlarmEventMainDialog;
QTimer* m_pTimer_RealTime; QTimer* m_pTimer_RealTime;
}; };

View File

@ -1,8 +1,138 @@
#include "alarmEventDataView.h" #include "alarmEventDataView.h"
#include <QTableView>
#include <QHeaderView> #include <QHeaderView>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QPainter>
///////------AlarmEventDataModel-----
AlarmEventDataModel::AlarmEventDataModel(QObject* parent)
: QAbstractTableModel(parent)
{
iniHeaderData();
}
AlarmEventDataModel::~AlarmEventDataModel()
{}
QModelIndex AlarmEventDataModel::index(int row, int column, const QModelIndex& parent) const
{
if(!hasIndex(row, column, parent))
return QModelIndex();
if(column > m_headerData.count())
return QModelIndex();
return createIndex(row, column);
}
QVariant AlarmEventDataModel::data(const QModelIndex& index, int role) const
{
if(index.isValid())
return QVariant();
int row = index.row();
int col = index.column();
int globalRow = (m_paginationInfo.currentPage - 1) * m_paginationInfo.entriesPerpage + row;
switch (role)
{
case Qt::DisplayRole:
{
if(index.column() == 0) //第一列显示序号
return QString::number(globalRow + 1);
else
{
int dataCol = col - 1;
const RowData& rowData = m_curPageData[row];
return rowData.values.value(dataCol);
}
}
case Qt::TextAlignmentRole:
return Qt::AlignCenter; //居中展示
default:
return QVariant();
}
}
QVariant AlarmEventDataModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if(orientation == Qt::Horizontal && role == Qt::DisplayRole)
return m_headerData.at(section).text;
return QAbstractItemModel::headerData(section, orientation, role);
}
int AlarmEventDataModel::rowCount(const QModelIndex& parent) const
{
return m_curPageData.count();
}
int AlarmEventDataModel::columnCount(const QModelIndex& parent) const
{
return m_headerData.isEmpty() ? 0 : m_headerData.count();
}
Qt::ItemFlags AlarmEventDataModel::flags(const QModelIndex& index) const
{
if(!index.isValid())
return Qt::NoItemFlags;
Qt::ItemFlags flags = QAbstractTableModel::flags(index);
flags |= Qt::ItemIsEditable; //不可编辑
return flags;
}
void AlarmEventDataModel::iniHeaderData()
{
m_headerData.emplace_back(SectionData("序号", 90));
m_headerData.emplace_back(SectionData("接收时间", 270));
m_headerData.emplace_back(SectionData("SOE时间", 270));
m_headerData.emplace_back(SectionData("厂站", 200));
m_headerData.emplace_back(SectionData("间隔", 200));
m_headerData.emplace_back(SectionData("信息", -1));
m_headerData.emplace_back(SectionData("类型", 200));
m_headerData.emplace_back(SectionData("等级", 150));
m_headerData.emplace_back(SectionData("确认状态", 150));
m_headerData.emplace_back(SectionData("操作", 300));
}
///////------AlarmEventDataDelegate-----
AlarmEventDataDelegate::AlarmEventDataDelegate(QTableView* view, QObject* parent)
: QStyledItemDelegate(parent)
,m_tableView(view)
{}
AlarmEventDataDelegate::~AlarmEventDataDelegate()
{}
void AlarmEventDataDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
//根据行号设置交替颜色
QStyleOptionViewItem opt = option;
initStyleOption(&opt, index);
if((index.row() + 1) % 2 == 0)
painter->fillRect(opt.rect, QColor(11, 26, 33, 200));
else
painter->fillRect(opt.rect, QColor(11, 26, 33, 0));
//绘制单元格边框(只绘制右边框,每行的最后一个单元格不绘制)
if(m_tableView)
{
painter->save();
QPen pen(QColor(60,60,60), 1);
painter->setPen(pen);
if(index.column() != m_tableView->model()->columnCount() - 1)
painter->drawLine(opt.rect.topRight(), opt.rect.bottomRight());
painter->restore();
}
//绘制默认内容
QStyledItemDelegate::paint(painter, option, index);
}
///////------AlarmEventDataView-----
AlarmEventDataView::AlarmEventDataView(QWidget* parent) AlarmEventDataView::AlarmEventDataView(QWidget* parent)
: QWidget(parent) : QWidget(parent)
{ {
@ -12,6 +142,12 @@ AlarmEventDataView::AlarmEventDataView(QWidget* parent)
m_tableView->setShowGrid(false); m_tableView->setShowGrid(false);
//m_tableView->setStyleSheet("QHeaderView{background-color: rgb(40, 40, 40);} QHeaderView::section{background-color:transparent;}"); //m_tableView->setStyleSheet("QHeaderView{background-color: rgb(40, 40, 40);} QHeaderView::section{background-color:transparent;}");
m_tableModel = new AlarmEventDataModel(this);
m_tableView->setModel(m_tableModel);
m_delegate = new AlarmEventDataDelegate(m_tableView, this);
m_tableView->setItemDelegate(m_delegate);
m_vLayout = new QVBoxLayout(this); m_vLayout = new QVBoxLayout(this);
m_vLayout->setSpacing(0); m_vLayout->setSpacing(0);
m_vLayout->setContentsMargins(0, 0, 0, 0); m_vLayout->setContentsMargins(0, 0, 0, 0);

View File

@ -1,16 +1,15 @@
#include "alarmEventMainDialog.h" #include "alarmEventMainDialog.h"
#include "ui_alarmEventMainDialog.h" #include "ui_alarmEventMainDialog.h"
AlarmEventMainDialog::AlarmEventMainDialog(MainDialogType type, QWidget *parent) AlarmEventMainDialog::AlarmEventMainDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
, ui(new Ui::alarmEventMainDialog) , ui(new Ui::alarmEventMainDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowFlags(Qt::FramelessWindowHint);
setAttribute(Qt::WA_TranslucentBackground);
if(type == RealTime) connect(ui->btnClose, &QPushButton::clicked, this, &AlarmEventMainDialog::onBtnClicked_close);
ui->dataFilteringPanel->setVisible(false);
else
ui->dataFilteringPanel->setVisible(true);
} }
AlarmEventMainDialog::~AlarmEventMainDialog() AlarmEventMainDialog::~AlarmEventMainDialog()
@ -18,6 +17,22 @@ AlarmEventMainDialog::~AlarmEventMainDialog()
delete ui; delete ui;
} }
void AlarmEventMainDialog::setMode(MainDialogMode mode)
{
if(mode == RealTime)
{
ui->label_WindowlTitle->setText("实时报警");
ui->dataFilteringPanel->setVisible(false);
}
else
{
ui->label_WindowlTitle->setText("历史事件");
ui->dataFilteringPanel->setVisible(true);
}
m_mode = mode;
}
void AlarmEventMainDialog::onBtnClicked_close() void AlarmEventMainDialog::onBtnClicked_close()
{ {
//reject(); //reject();

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 "alarmEventMainDialog.h"
#include <QKeyEvent> #include <QKeyEvent>
#include <QMenu> #include <QMenu>
@ -33,6 +34,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_pAlarmEventMainDialog(nullptr)
{ {
ui->setupUi(this); ui->setupUi(this);
setAcceptDrops(true); setAcceptDrops(true);
@ -78,11 +80,17 @@ DashboardFrame::DashboardFrame(const QString& strName, dashboardFrame::frameType
connect(ui->btnAddPanel, SIGNAL(clicked()), this, SLOT(onBtnClicked_addDataPanel())); connect(ui->btnAddPanel, SIGNAL(clicked()), this, SLOT(onBtnClicked_addDataPanel()));
//connect(ui->btnDashboradList1, SIGNAL(clicked()), this, SLOT(onBtnClicked_dashboardList())); //connect(ui->btnDashboradList1, SIGNAL(clicked()), this, SLOT(onBtnClicked_dashboardList()));
connect(ui->btnDashboradList2, SIGNAL(clicked()), this, SLOT(onBtnClicked_dashboardList())); connect(ui->btnDashboradList2, SIGNAL(clicked()), this, SLOT(onBtnClicked_dashboardList()));
connect(ui->btnAlarm, SIGNAL(clicked()), this, SLOT(onBtnClicked_showRealtimeEvents()));
connect(ui->btnAllEvent, SIGNAL(clicked()), this, SLOT(onBtnClicked_showHistoricalEvents()));
m_pTimer_RealTime = new QTimer(this); m_pTimer_RealTime = new QTimer(this);
m_pTimer_RealTime->setTimerType(Qt::PreciseTimer); //设置成高精度类型默认为Qt::CoarseTimer(粗糙定时器) m_pTimer_RealTime->setTimerType(Qt::PreciseTimer); //设置成高精度类型默认为Qt::CoarseTimer(粗糙定时器)
connect(m_pTimer_RealTime, SIGNAL(timeout()), this, SLOT(onTimeout_realTime())); connect(m_pTimer_RealTime, SIGNAL(timeout()), this, SLOT(onTimeout_realTime()));
m_pTimer_RealTime->start(1000); m_pTimer_RealTime->start(1000);
//暂时放弃这两个按钮的逻辑
ui->btnShowDashboards->setVisible(false);
ui->btnShowNotifications->setVisible(false);
} }
DashboardFrame::~DashboardFrame() DashboardFrame::~DashboardFrame()
@ -489,7 +497,8 @@ void DashboardFrame::onBtnClicked_addDashboard()
m_pDashboardNamingDialog = new DashboardNamingDialog(this); m_pDashboardNamingDialog = new DashboardNamingDialog(this);
m_pDashboardNamingDialog->installEventFilter(this); m_pDashboardNamingDialog->installEventFilter(this);
connect(m_pDashboardNamingDialog, SIGNAL(sgl_hide()), this, SLOT(onSignal_subDialogClose())); connect(m_pDashboardNamingDialog, SIGNAL(sgl_hide()), this, SLOT(onSignal_subDialogClose()));
connect(m_pDashboardNamingDialog, SIGNAL(dashboardName(const QString&, const QString&)), this, SLOT(onSignal_dashboardNaming(const QString&, const QString&))); connect(m_pDashboardNamingDialog, &DashboardNamingDialog::dashboardName, this, &DashboardFrame::onSignal_dashboardNaming);
//connect(m_pDashboardNamingDialog, SIGNAL(dashboardName(const QString&, const QString&)), this, SLOT(onSignal_dashboardNaming(const QString&, const QString&)));
} }
showTransparentMask(); showTransparentMask();
@ -567,6 +576,44 @@ void DashboardFrame::onBtnClicked_dashboardTab()
setCurrentDashboard(strName); setCurrentDashboard(strName);
} }
void DashboardFrame::onBtnClicked_showRealtimeEvents()
{
if(m_pAlarmEventMainDialog == nullptr)
{
m_pAlarmEventMainDialog = new AlarmEventMainDialog(this);
connect(m_pAlarmEventMainDialog, SIGNAL(sgl_hide()), this, SLOT(onSignal_subDialogClose()));
}
m_pAlarmEventMainDialog->setMode(RealTime);
int nWidth = this->width() * 0.8;
int nHeight = this->height() * 0.8;
int nX = this->geometry().x() + (this->width() - nWidth) * 0.5;
int nY = this->geometry().y() + (this->height() - nHeight) * 0.5;
showTransparentMask();
m_pAlarmEventMainDialog->setGeometry(nX, nY, nWidth, nHeight);
m_pAlarmEventMainDialog->show();
m_pAlarmEventMainDialog->raise();
}
void DashboardFrame::onBtnClicked_showHistoricalEvents()
{
if(m_pAlarmEventMainDialog == nullptr)
{
m_pAlarmEventMainDialog = new AlarmEventMainDialog(this);
connect(m_pAlarmEventMainDialog, SIGNAL(sgl_hide()), this, SLOT(onSignal_subDialogClose()));
}
m_pAlarmEventMainDialog->setMode(Historical);
int nWidth = this->width() * 0.8;
int nHeight = this->height() * 0.8;
int nX = this->geometry().x() + (this->width() - nWidth) * 0.5;
int nY = this->geometry().y() + (this->height() - nHeight) * 0.5;
showTransparentMask();
m_pAlarmEventMainDialog->setGeometry(nX, nY, nWidth, nHeight);
m_pAlarmEventMainDialog->show();
m_pAlarmEventMainDialog->raise();
}
void DashboardFrame::onMenuAction_dashboardList() void DashboardFrame::onMenuAction_dashboardList()
{ {
QAction* action = qobject_cast<QAction*>(sender()); QAction* action = qobject_cast<QAction*>(sender());
@ -639,7 +686,7 @@ void DashboardFrame::onSignal_renameDashboard()
{ {
m_pDashboardNamingDialog = new DashboardNamingDialog(this); m_pDashboardNamingDialog = new DashboardNamingDialog(this);
connect(m_pDashboardNamingDialog, SIGNAL(dlgHide()), this, SLOT(onSignal_subDialogClose())); connect(m_pDashboardNamingDialog, SIGNAL(dlgHide()), this, SLOT(onSignal_subDialogClose()));
connect(m_pDashboardNamingDialog, SIGNAL(dashboardName(const QString&, const QString&)), this, SLOT(onSignal_dashboardNaming(const QString&, const QString&))); connect(m_pDashboardNamingDialog, &DashboardNamingDialog::dashboardName, this, &DashboardFrame::onSignal_dashboardNaming);
} }
showTransparentMask(); showTransparentMask();

View File

@ -6,17 +6,18 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1496</width> <width>1539</width>
<height>1006</height> <height>1005</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Dialog</string>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QDialog <string notr="true">QWidget #contentWidget
{ {
background-color:rgba(36,43,50,250); border:1px solid rgb(76,88,105);
background-color: rgb(33, 39, 46);
} }
QPushButton QPushButton
@ -94,7 +95,25 @@ color: rgb(250, 250, 250);
background-color: rgba(43, 102, 158, 80); background-color: rgba(43, 102, 158, 80);
}</string> }</string>
</property> </property>
<layout class="QHBoxLayout" name="hLayout_main" stretch="1,0"> <layout class="QHBoxLayout" name="hLayout_main">
<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">
<layout class="QHBoxLayout" name="hLayout_content">
<property name="spacing"> <property name="spacing">
<number>5</number> <number>5</number>
</property> </property>
@ -108,12 +127,12 @@ background-color: rgba(43, 102, 158, 80);
<number>7</number> <number>7</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>5</number> <number>7</number>
</property> </property>
<item> <item>
<layout class="QVBoxLayout" name="vLayout_central"> <layout class="QVBoxLayout" name="vLayout_central">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>15</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
@ -123,13 +142,13 @@ background-color: rgba(43, 102, 158, 80);
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>60</height> <height>70</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>60</height> <height>70</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -144,11 +163,14 @@ border-right:0px;
</string> </string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
<number>15</number>
</property>
<property name="rightMargin"> <property name="rightMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="labeWindowlTitle"> <widget class="QLabel" name="label_WindowlTitle">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(250, 250, 250); <string notr="true">color: rgb(250, 250, 250);
font: 700 18pt &quot;微软雅黑&quot;; font: 700 18pt &quot;微软雅黑&quot;;
@ -210,7 +232,7 @@ icon: url(:/images/icon_configuration.png);
}</string> }</string>
</property> </property>
<property name="text"> <property name="text">
<string>设置</string> <string>配置</string>
</property> </property>
</widget> </widget>
</widget> </widget>
@ -223,13 +245,13 @@ icon: url(:/images/icon_configuration.png);
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>96</height> <height>81</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>96</height> <height>81</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -242,19 +264,19 @@ icon: url(:/images/icon_configuration.png);
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,1,1,1"> <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,1,1,1">
<property name="spacing"> <property name="spacing">
<number>35</number> <number>60</number>
</property> </property>
<property name="leftMargin"> <property name="leftMargin">
<number>8</number> <number>8</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>10</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>8</number> <number>8</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>10</number> <number>0</number>
</property> </property>
<item> <item>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
@ -262,7 +284,7 @@ icon: url(:/images/icon_configuration.png);
<number>3</number> <number>3</number>
</property> </property>
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>5</number> <number>10</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_stationName"> <widget class="QLabel" name="label_stationName">
@ -352,7 +374,7 @@ icon: url(:/images/icon_configuration.png);
<number>3</number> <number>3</number>
</property> </property>
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>5</number> <number>10</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_eventType"> <widget class="QLabel" name="label_eventType">
@ -442,7 +464,7 @@ icon: url(:/images/icon_configuration.png);
<number>3</number> <number>3</number>
</property> </property>
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>5</number> <number>10</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_confirmStatus"> <widget class="QLabel" name="label_confirmStatus">
@ -527,7 +549,7 @@ icon: url(:/images/icon_configuration.png);
<number>3</number> <number>3</number>
</property> </property>
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>5</number> <number>10</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_beginTime"> <widget class="QLabel" name="label_beginTime">
@ -621,9 +643,130 @@ icon: url(:/images/icon_configuration.png);
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QWidget #tableView <string notr="true">QWidget #tableView
{ {
background-color: rgba(54, 62, 74,100); background-color: rgba(54, 62, 74,90);
}
QHeaderView
{
background-color: rgb(11, 26, 33);
}
QHeaderView::section
{
font: 700 12pt &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;
background-color: transparent;
}
QTableView::item
{
font: 12pt &quot;黑体&quot;;
color: rgb(250, 250, 250);
background-color:transparent;
border:0px;
border-right: 1px solid rgb(60,60,60);
}
QTableView::item:hover
{
}
QTableView::item:selected
{
}</string> }</string>
</property> </property>
<widget class="QTableWidget" name="tableWidget">
<property name="geometry">
<rect>
<x>40</x>
<y>50</y>
<width>931</width>
<height>411</height>
</rect>
</property>
<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>
<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>
</widget>
</widget> </widget>
</item> </item>
<item> <item>
@ -631,13 +774,13 @@ icon: url(:/images/icon_configuration.png);
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>31</height> <height>26</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>31</height> <height>26</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -661,7 +804,7 @@ border:1px solid rgb(100,100,100);
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>8</y> <y>0</y>
<width>21</width> <width>21</width>
<height>21</height> <height>21</height>
</rect> </rect>
@ -702,7 +845,7 @@ border:1px solid rgb(100,100,100);
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>170</x> <x>170</x>
<y>8</y> <y>0</y>
<width>131</width> <width>131</width>
<height>21</height> <height>21</height>
</rect> </rect>
@ -724,7 +867,7 @@ border:1px solid rgb(100,100,100);
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>30</x> <x>30</x>
<y>8</y> <y>0</y>
<width>21</width> <width>21</width>
<height>21</height> <height>21</height>
</rect> </rect>
@ -768,7 +911,7 @@ border:1px solid rgb(100,100,100);
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>105</x> <x>105</x>
<y>8</y> <y>0</y>
<width>21</width> <width>21</width>
<height>21</height> <height>21</height>
</rect> </rect>
@ -812,7 +955,7 @@ border:1px solid rgb(100,100,100);
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>135</x> <x>135</x>
<y>8</y> <y>0</y>
<width>21</width> <width>21</width>
<height>21</height> <height>21</height>
</rect> </rect>
@ -853,7 +996,7 @@ border:1px solid rgb(100,100,100);
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>60</x> <x>60</x>
<y>9</y> <y>0</y>
<width>36</width> <width>36</width>
<height>20</height> <height>20</height>
</rect> </rect>
@ -930,6 +1073,9 @@ QPushButton:pressed
</item> </item>
</layout> </layout>
</widget> </widget>
</item>
</layout>
</widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>CustomLineEdit</class> <class>CustomLineEdit</class>