add monitor display setting
This commit is contained in:
parent
7cb676d940
commit
68b1727ef3
|
|
@ -1107,6 +1107,80 @@ struct monitorItemAttributeInfo //单个监控item属性
|
||||||
bool bSelected = false;
|
bool bSelected = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class monitorItemState{ //监控item的状态
|
||||||
|
Closing = 0, //合闸
|
||||||
|
Opening, //分闸
|
||||||
|
AccidentTrip, //事故跳闸
|
||||||
|
StatusFault, //状态故障
|
||||||
|
Energized, //带电
|
||||||
|
DeEnergized, //失电
|
||||||
|
Grounding, //接地
|
||||||
|
Running, //运行
|
||||||
|
ShutDown, //停运
|
||||||
|
Alarm, //告警
|
||||||
|
Normal, //正常
|
||||||
|
LineBreak, //断线
|
||||||
|
MeasureMentOutLimit //量测越限
|
||||||
|
};
|
||||||
|
|
||||||
|
struct monitorItemDisplayInfo //监控模式显示信息
|
||||||
|
{
|
||||||
|
int nItemType; //设备类型
|
||||||
|
QString sStateName; //状态名
|
||||||
|
bool bEnable = false;
|
||||||
|
QString sColor;
|
||||||
|
QByteArray bytPicture; //存储二进制数据
|
||||||
|
int nWidth;
|
||||||
|
int nHeight;
|
||||||
|
QString sMeta; //元模型名
|
||||||
|
QString sModel; //工程模名
|
||||||
|
};
|
||||||
|
|
||||||
|
struct monitorItemTypeStruct //监控设备类型
|
||||||
|
{
|
||||||
|
QString sTag; //英文
|
||||||
|
QString sName;
|
||||||
|
|
||||||
|
bool operator<(const monitorItemTypeStruct& other) const {
|
||||||
|
if (sTag != other.sTag)
|
||||||
|
return sTag < other.sTag;
|
||||||
|
return sName < other.sName;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool notEmpty(){
|
||||||
|
if(!sTag.isEmpty() && !sName.isEmpty())
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct monitorItemStateStruct //监控设备状态
|
||||||
|
{
|
||||||
|
monitorItemState eState;
|
||||||
|
QString sState; //状态(中文)
|
||||||
|
|
||||||
|
bool operator<(const monitorItemStateStruct& other) const {
|
||||||
|
if (eState != other.eState)
|
||||||
|
return eState < other.eState;
|
||||||
|
return sState < other.sState;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool notEmpty(){
|
||||||
|
if(!sState.isEmpty())
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ModelTypeInfo{ //类型临时信息
|
||||||
|
int nType;
|
||||||
|
QString sType;
|
||||||
|
QString sName;
|
||||||
|
QString sMeta; //该类型元模名
|
||||||
|
QString sModel; //该类型工程模名
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Constants used for fetching QVariant data from GraphModel.
|
* Constants used for fetching QVariant data from GraphModel.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ set(DIAGRAMCAVAS_HEADER_FILES
|
||||||
include/monitorAttributeGroupDlg.h
|
include/monitorAttributeGroupDlg.h
|
||||||
include/monitorConfigDlg.h
|
include/monitorConfigDlg.h
|
||||||
include/monitorDetailAttributeDlg.h
|
include/monitorDetailAttributeDlg.h
|
||||||
|
include/monitorDisplaySettingDlg.h
|
||||||
|
include/monitorItemPreviewDlg.h
|
||||||
include/itemPropertyDlg.h
|
include/itemPropertyDlg.h
|
||||||
include/propertyContentDlg.h
|
include/propertyContentDlg.h
|
||||||
include/serializable.h
|
include/serializable.h
|
||||||
|
|
@ -133,6 +135,8 @@ set(DIAGRAMCAVAS_SOURCE_FILES
|
||||||
source/monitorAttributeGroupDlg.cpp
|
source/monitorAttributeGroupDlg.cpp
|
||||||
source/monitorConfigDlg.cpp
|
source/monitorConfigDlg.cpp
|
||||||
source/monitorDetailAttributeDlg.cpp
|
source/monitorDetailAttributeDlg.cpp
|
||||||
|
source/monitorDisplaySettingDlg.cpp
|
||||||
|
source/monitorItemPreviewDlg.cpp
|
||||||
source/itemPropertyDlg.cpp
|
source/itemPropertyDlg.cpp
|
||||||
source/propertyContentDlg.cpp
|
source/propertyContentDlg.cpp
|
||||||
source/statusBar.cpp
|
source/statusBar.cpp
|
||||||
|
|
@ -253,6 +257,7 @@ set(UI_FILES
|
||||||
ui/projectIconSetting.ui
|
ui/projectIconSetting.ui
|
||||||
ui/monitorConfigDlg.ui
|
ui/monitorConfigDlg.ui
|
||||||
ui/monitorDetailAttributeDlg.ui
|
ui/monitorDetailAttributeDlg.ui
|
||||||
|
ui/monitorDisplaySettingDlg.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,11 @@ public:
|
||||||
void monitorItemDetailAttr(QUuid); //显示属性详情
|
void monitorItemDetailAttr(QUuid); //显示属性详情
|
||||||
|
|
||||||
void monitorItemSet(QUuid); //运行时item设置完成
|
void monitorItemSet(QUuid); //运行时item设置完成
|
||||||
|
void updateMonitorDisplay(); //更新监控图元显示
|
||||||
|
|
||||||
|
QMap<int,QList<QPair<monitorItemState,QString>>>& getMonitorStateMap(){return m_monitorStateMap;}
|
||||||
|
void setMonitorDisplaySetting(QMap<monitorItemTypeStruct,QMap<monitorItemStateStruct,monitorItemDisplayInfo>> map){m_monitorDisplaySetting = map;}
|
||||||
|
QMap<monitorItemTypeStruct,QMap<monitorItemStateStruct,monitorItemDisplayInfo>>& getMonitorDisplaySetting(){return m_monitorDisplaySetting;}
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void activatePage(const QString&); //激活当前model所在page
|
void activatePage(const QString&); //激活当前model所在page
|
||||||
void updateCurrentItems(QList<monitorRelationItem>,bool); //更新当前组态元件列表 <名称,uid>
|
void updateCurrentItems(QList<monitorRelationItem>,bool); //更新当前组态元件列表 <名称,uid>
|
||||||
|
|
@ -157,6 +162,8 @@ private:
|
||||||
ProjectIconSetting* m_projectIconSettingDlg;
|
ProjectIconSetting* m_projectIconSettingDlg;
|
||||||
BayManagerDlg* m_pBayManager;
|
BayManagerDlg* m_pBayManager;
|
||||||
QMap<QUuid,QList<monitorItemAttributeInfo>> m_monitorPara; //监控参数
|
QMap<QUuid,QList<monitorItemAttributeInfo>> m_monitorPara; //监控参数
|
||||||
|
QMap<int,QList<QPair<monitorItemState,QString>>> m_monitorStateMap; //元件状态对照表 <type,<state,状态名>>
|
||||||
|
QMap<monitorItemTypeStruct,QMap<monitorItemStateStruct,monitorItemDisplayInfo>> m_monitorDisplaySetting; //元件设置
|
||||||
public:
|
public:
|
||||||
static bool _dataInitialised;
|
static bool _dataInitialised;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -576,6 +576,7 @@ public:
|
||||||
virtual void setupFinish(QVariant){} //设置完成后调用(如ct,pt)
|
virtual void setupFinish(QVariant){} //设置完成后调用(如ct,pt)
|
||||||
virtual void updateItem(){}; //更新自身(如ct,pt)
|
virtual void updateItem(){}; //更新自身(如ct,pt)
|
||||||
virtual void updateTerPos(); //ct,pt等item大小变动后重新计算端点位置
|
virtual void updateTerPos(); //ct,pt等item大小变动后重新计算端点位置
|
||||||
|
virtual void setCurMonitorState(monitorItemState sta) {_curMonitorState = sta;} //设置当前运行时模式
|
||||||
protected:
|
protected:
|
||||||
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange, const QVariant&) override;
|
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange, const QVariant&) override;
|
||||||
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent*) override;
|
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent*) override;
|
||||||
|
|
@ -590,6 +591,7 @@ protected:
|
||||||
QPointF m_endConnectPoint;
|
QPointF m_endConnectPoint;
|
||||||
int _lastPort; //最后触碰的port
|
int _lastPort; //最后触碰的port
|
||||||
QString _modelName; //当前图元使用的模型名,用来在model中检索属性信息
|
QString _modelName; //当前图元使用的模型名,用来在model中检索属性信息
|
||||||
|
monitorItemState _curMonitorState; //当前运行时模式
|
||||||
};
|
};
|
||||||
|
|
||||||
class GraphicsProjectModelGroup : public GraphicsProjectModelItem //工程模group
|
class GraphicsProjectModelGroup : public GraphicsProjectModelItem //工程模group
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
#ifndef MONITORDISPLAYSETTINGDLG_H
|
||||||
|
#define MONITORDISPLAYSETTINGDLG_H
|
||||||
|
|
||||||
|
/*******************监控图元设置界面**********************/
|
||||||
|
#include <QDialog>
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
namespace Ui { class monitorDisplaySettingDlg; }
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
class MonitorPanel;
|
||||||
|
|
||||||
|
class MonitorDisplaySettingDlg : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
MonitorDisplaySettingDlg(QWidget *parent = nullptr);
|
||||||
|
~MonitorDisplaySettingDlg();
|
||||||
|
|
||||||
|
void initial();
|
||||||
|
void showDlg();
|
||||||
|
public slots:
|
||||||
|
void onSaveClicked();
|
||||||
|
void onCancelClicked();
|
||||||
|
void onIconSelectClicked();
|
||||||
|
|
||||||
|
void onCheckboxToggled(bool);
|
||||||
|
void onTypeChanged(const QString&);
|
||||||
|
void onStateChanged(const QString&);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void loadSetting(monitorItemTypeStruct type,monitorItemStateStruct state); //载入设定到界面
|
||||||
|
void saveSetting(monitorItemTypeStruct type,monitorItemStateStruct state);
|
||||||
|
|
||||||
|
void updatePreview(); //预览更新
|
||||||
|
void clearStateDisplay();
|
||||||
|
private:
|
||||||
|
Ui::monitorDisplaySettingDlg *ui;
|
||||||
|
MonitorPanel* _parent;
|
||||||
|
monitorItemTypeStruct _curType; //当前类型
|
||||||
|
monitorItemStateStruct _curState; //当前状态
|
||||||
|
QColor _curColor;
|
||||||
|
QString _curMeta;
|
||||||
|
QString _curModel;
|
||||||
|
QMap<monitorItemTypeStruct,QMap<monitorItemStateStruct,monitorItemDisplayInfo>> _tempSetting;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef MONITORITEMPREVIEWDLG_H
|
||||||
|
#define MONITORITEMPREVIEWDLG_H
|
||||||
|
|
||||||
|
/*************运行时item显示预览*************/
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QSvgRenderer>
|
||||||
|
|
||||||
|
class MonitorItemPreviewDlg : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
MonitorItemPreviewDlg(QWidget *parent = nullptr);
|
||||||
|
~MonitorItemPreviewDlg();
|
||||||
|
|
||||||
|
void initial();
|
||||||
|
void setSvgFile(const QByteArray &bytSvg);
|
||||||
|
void setColors(const QColor &color);
|
||||||
|
QByteArray getCurSvg() {return _curSvg;}
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *) override;
|
||||||
|
private:
|
||||||
|
QSvgRenderer m_renderer;
|
||||||
|
QByteArray _curSvg;
|
||||||
|
QColor m_Color;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -9,6 +9,7 @@ class PowerEntity;
|
||||||
class MonitorSideBarDlg;
|
class MonitorSideBarDlg;
|
||||||
class MonitorConfigDlg;
|
class MonitorConfigDlg;
|
||||||
class MonitorDetailAttributeDlg;
|
class MonitorDetailAttributeDlg;
|
||||||
|
class MonitorDisplaySettingDlg;
|
||||||
|
|
||||||
class MonitorPanel : public BaseDrawingPanel
|
class MonitorPanel : public BaseDrawingPanel
|
||||||
{
|
{
|
||||||
|
|
@ -31,10 +32,14 @@ public:
|
||||||
void initMonitorConfig(); //初始化参数设置(每个运行时可能不同)
|
void initMonitorConfig(); //初始化参数设置(每个运行时可能不同)
|
||||||
void itemSelected(QUuid); //item选中事件
|
void itemSelected(QUuid); //item选中事件
|
||||||
void detailItemSelected(QUuid); //显示详细属性页
|
void detailItemSelected(QUuid); //显示详细属性页
|
||||||
|
|
||||||
|
void initDisplayState(); //初始化显示状态参照表
|
||||||
|
void initDisplaySetting(); //初始化显示状态设置
|
||||||
public slots:
|
public slots:
|
||||||
void onRunClicked();
|
void onRunClicked();
|
||||||
void onStopClicked();
|
void onStopClicked();
|
||||||
void onConfigClicked();
|
void onConfigClicked();
|
||||||
|
void onItemConfigClicked();
|
||||||
void onConncecClicked();
|
void onConncecClicked();
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent *closeEvent) override;
|
void closeEvent(QCloseEvent *closeEvent) override;
|
||||||
|
|
@ -47,6 +52,7 @@ private:
|
||||||
MonitorConfigDlg* _pConfigDlg;
|
MonitorConfigDlg* _pConfigDlg;
|
||||||
QStandardItemModel* _itemListmodel;
|
QStandardItemModel* _itemListmodel;
|
||||||
MonitorDetailAttributeDlg* _detailAttributeDlg;
|
MonitorDetailAttributeDlg* _detailAttributeDlg;
|
||||||
|
MonitorDisplaySettingDlg* _displaySettingDlg;
|
||||||
QMenu* _menuSetting;
|
QMenu* _menuSetting;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2663,15 +2663,18 @@ void FixedPortsModel::generateMonitor(QString sPage,QList<monitorRelationItem> l
|
||||||
//pPanel->getScene()->setSceneRect(itemsRect);
|
//pPanel->getScene()->setSceneRect(itemsRect);
|
||||||
pPanel->getView()->fitInView(itemsRect, Qt::KeepAspectRatio);
|
pPanel->getView()->fitInView(itemsRect, Qt::KeepAspectRatio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emit pPanel->getModelController()->monitorCreated(_pageName,qMakePair(sPage,info.id.toUuid()));
|
||||||
|
emit pPanel->getModelController()->monitorItems(lst);
|
||||||
|
|
||||||
|
generateMonitorConfig(pPanel);
|
||||||
|
|
||||||
|
pPanel->updateSelectedItems(lstFirst,true); //直接生成监控tree
|
||||||
|
pPanel->updateSelectedItems(lstSecond,false);
|
||||||
|
|
||||||
|
pPanel->initDisplayState();
|
||||||
|
pPanel->initDisplaySetting();
|
||||||
}
|
}
|
||||||
|
|
||||||
emit pPanel->getModelController()->monitorCreated(_pageName,qMakePair(sPage,info.id.toUuid()));
|
|
||||||
emit pPanel->getModelController()->monitorItems(lst);
|
|
||||||
|
|
||||||
generateMonitorConfig(pPanel);
|
|
||||||
|
|
||||||
pPanel->updateSelectedItems(lstFirst,true); //直接生成监控tree
|
|
||||||
pPanel->updateSelectedItems(lstSecond,false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2785,3 +2788,8 @@ void FixedPortsModel::monitorItemSet(QUuid uid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FixedPortsModel::updateMonitorDisplay()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -139,8 +139,14 @@ void ElectricSvgItem::move(const QPointF& point)
|
||||||
|
|
||||||
void ElectricSvgItem::loadSvg(QByteArray b)
|
void ElectricSvgItem::loadSvg(QByteArray b)
|
||||||
{
|
{
|
||||||
m_pRender = new QSvgRenderer(b);
|
if(m_pRender == nullptr){
|
||||||
|
m_pRender = new QSvgRenderer(b);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
m_pRender->load(b);
|
||||||
|
}
|
||||||
_tempSvg = b;
|
_tempSvg = b;
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ElectricSvgItem::updateMapSvg(QMap<QString,QByteArray> map)
|
void ElectricSvgItem::updateMapSvg(QMap<QString,QByteArray> map)
|
||||||
|
|
|
||||||
|
|
@ -463,6 +463,8 @@ GraphicsProjectModelItem::GraphicsProjectModelItem(QGraphicsItem *parent)
|
||||||
setFlag(QGraphicsItem::ItemIsMovable, true);
|
setFlag(QGraphicsItem::ItemIsMovable, true);
|
||||||
setFlag(QGraphicsItem::ItemIsSelectable, true);
|
setFlag(QGraphicsItem::ItemIsSelectable, true);
|
||||||
setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
|
setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
|
||||||
|
|
||||||
|
_curMonitorState = monitorItemState::Normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
GraphicsProjectModelItem::GraphicsProjectModelItem(const GraphicsProjectModelItem& obj)
|
GraphicsProjectModelItem::GraphicsProjectModelItem(const GraphicsProjectModelItem& obj)
|
||||||
|
|
@ -503,6 +505,8 @@ GraphicsProjectModelItem::GraphicsProjectModelItem(const GraphicsProjectModelIte
|
||||||
setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
|
setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
|
||||||
setPos(obj.pos());
|
setPos(obj.pos());
|
||||||
setRotation(obj.rotation());
|
setRotation(obj.rotation());
|
||||||
|
|
||||||
|
_curMonitorState = monitorItemState::Normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
GraphicsProjectModelItem::~GraphicsProjectModelItem()
|
GraphicsProjectModelItem::~GraphicsProjectModelItem()
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ QWidget* MonitorAttributeGroupDlg::createEditor(monitorItemAttributeInfo info)
|
||||||
}
|
}
|
||||||
else{ //图表
|
else{ //图表
|
||||||
QChartView* chartView = new QChartView(this);
|
QChartView* chartView = new QChartView(this);
|
||||||
chartView->setMinimumSize(400, 300);
|
chartView->setMinimumSize(200, 150);
|
||||||
chartView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
chartView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
chartView->setRenderHint(QPainter::Antialiasing);
|
chartView->setRenderHint(QPainter::Antialiasing);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,328 @@
|
||||||
|
#include "monitorDisplaySettingDlg.h"
|
||||||
|
#include "ui_monitorDisplaySettingDlg.h"
|
||||||
|
#include "monitorPanel.h"
|
||||||
|
#include <QColorDialog>
|
||||||
|
#include <QSvgRenderer>
|
||||||
|
#include <QPainter>
|
||||||
|
#include "projectModelManager.h"
|
||||||
|
#include "projectIconSelectionDlg.h"
|
||||||
|
|
||||||
|
MonitorDisplaySettingDlg::MonitorDisplaySettingDlg(QWidget *parent)
|
||||||
|
: QDialog(parent)
|
||||||
|
, ui(new Ui::monitorDisplaySettingDlg)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
this->setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||||||
|
_parent = dynamic_cast<MonitorPanel*>(parent);
|
||||||
|
initial();
|
||||||
|
}
|
||||||
|
|
||||||
|
MonitorDisplaySettingDlg::~MonitorDisplaySettingDlg()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::initial()
|
||||||
|
{
|
||||||
|
connect(ui->btn_save,&QPushButton::clicked,this,&MonitorDisplaySettingDlg::onSaveClicked);
|
||||||
|
connect(ui->btn_cancel,&QPushButton::clicked,this,&MonitorDisplaySettingDlg::onCancelClicked);
|
||||||
|
|
||||||
|
connect(ui->cb_type,&QComboBox::currentTextChanged,this,&MonitorDisplaySettingDlg::onTypeChanged);
|
||||||
|
connect(ui->cb_state,&QComboBox::currentTextChanged,this,&MonitorDisplaySettingDlg::onStateChanged);
|
||||||
|
|
||||||
|
connect(ui->btn_selectColor, &QPushButton::clicked, this, [this]() {
|
||||||
|
QColor newColor = QColorDialog::getColor(_curColor, this, "选择颜色");
|
||||||
|
if (newColor.isValid()) { // 用户点击了OK
|
||||||
|
_curColor = newColor;
|
||||||
|
// 更新按钮显示
|
||||||
|
QPixmap pixmap(16, 16);
|
||||||
|
pixmap.fill(newColor);
|
||||||
|
ui->btn_selectColor->setIcon(QIcon(pixmap));
|
||||||
|
ui->btn_selectColor->setText(newColor.name());
|
||||||
|
// 触发预览更新
|
||||||
|
|
||||||
|
if(_curType.notEmpty() && _curState.notEmpty()){
|
||||||
|
_tempSetting[_curType][_curState].sColor = _curColor.name();
|
||||||
|
ui->content->setColors(_curColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(ui->checkBox_custom, &QCheckBox::toggled, this,&MonitorDisplaySettingDlg::onCheckboxToggled);
|
||||||
|
connect(ui->btn_selectIcon, &QPushButton::clicked, this,&MonitorDisplaySettingDlg::onIconSelectClicked);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::showDlg()
|
||||||
|
{
|
||||||
|
show();
|
||||||
|
_tempSetting = _parent->getModelController()->getMonitorDisplaySetting();
|
||||||
|
ui->cb_type->clear();
|
||||||
|
ui->cb_state->clear();
|
||||||
|
|
||||||
|
for(auto iter = _tempSetting.begin();iter != _tempSetting.end();++iter){
|
||||||
|
ui->cb_type->addItem(iter.key().sName,iter.key().sTag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::onSaveClicked()
|
||||||
|
{
|
||||||
|
saveSetting(_curType,_curState);
|
||||||
|
_parent->getModelController()->getMonitorDisplaySetting() = _tempSetting;
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::onCancelClicked()
|
||||||
|
{
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::onCheckboxToggled(bool val)
|
||||||
|
{
|
||||||
|
if(val){
|
||||||
|
ui->btn_selectColor->setEnabled(true);
|
||||||
|
ui->btn_selectIcon->setEnabled(true);
|
||||||
|
ui->sb_width->setEnabled(true);
|
||||||
|
ui->sb_height->setEnabled(true);
|
||||||
|
ui->cb_effect->setEnabled(true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ui->btn_selectColor->setEnabled(false);
|
||||||
|
ui->btn_selectIcon->setEnabled(false);
|
||||||
|
ui->sb_width->setEnabled(false);
|
||||||
|
ui->sb_height->setEnabled(false);
|
||||||
|
ui->cb_effect->setEnabled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::onIconSelectClicked()
|
||||||
|
{
|
||||||
|
if(!_curMeta.isEmpty() && !_curModel.isEmpty()){
|
||||||
|
auto mapAllSvg = ProjectModelManager::instance().getData()[_curMeta][_curModel].modelSetting.mapSvg;
|
||||||
|
ProjectIconSelectionDlg dialog(mapAllSvg, this);
|
||||||
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
|
QByteArray selectedSVG = dialog.selectedSVG();
|
||||||
|
if (!selectedSVG.isEmpty()) {
|
||||||
|
QSvgRenderer renderer(selectedSVG);
|
||||||
|
QPixmap pixmap(32, 32);
|
||||||
|
pixmap.fill(Qt::transparent);
|
||||||
|
QPainter painter(&pixmap);
|
||||||
|
renderer.render(&painter);
|
||||||
|
|
||||||
|
ui->btn_selectIcon->setIcon(QIcon(pixmap));
|
||||||
|
ui->content->setSvgFile(selectedSVG);
|
||||||
|
|
||||||
|
if(_curType.notEmpty() && _curState.notEmpty()){
|
||||||
|
_tempSetting[_curType][_curState].bytPicture = selectedSVG;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::onTypeChanged(const QString& str)
|
||||||
|
{
|
||||||
|
/*saveSetting(_curType,_curState);
|
||||||
|
ui->cb_state->clear();
|
||||||
|
monitorItemTypeStruct keyType;
|
||||||
|
keyType.sTag = ui->cb_type->currentData().toString();
|
||||||
|
keyType.sName = str;
|
||||||
|
QMap<monitorItemStateStruct,monitorItemDisplayInfo> mapInfo = _tempSetting.value(keyType);
|
||||||
|
for(auto iter = mapInfo.begin();iter != mapInfo.end();++iter){
|
||||||
|
ui->cb_state->addItem(iter.key().sState,int(iter.key().eState));
|
||||||
|
if(_curMeta != iter->sMeta){
|
||||||
|
_curMeta = iter->sMeta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_curType = keyType;
|
||||||
|
onStateChanged(ui->cb_state->currentText());*/
|
||||||
|
|
||||||
|
//monitorItemStateStruct keyState;
|
||||||
|
//keyState.sState = ui->cb_state->currentText();
|
||||||
|
//loadSetting(_curType,ui->cb_state->currentText());
|
||||||
|
// 1. 保存当前设备类型的设置
|
||||||
|
saveSetting(_curType, _curState);
|
||||||
|
|
||||||
|
// 2. 清空状态下拉框
|
||||||
|
ui->cb_state->clear();
|
||||||
|
|
||||||
|
// 3. 构建新的设备类型键值
|
||||||
|
monitorItemTypeStruct keyType;
|
||||||
|
keyType.sTag = ui->cb_type->currentData().toString();
|
||||||
|
keyType.sName = str;
|
||||||
|
|
||||||
|
// 4. 获取新设备类型对应的状态列表
|
||||||
|
QMap<monitorItemStateStruct, monitorItemDisplayInfo> mapInfo = _tempSetting.value(keyType);
|
||||||
|
|
||||||
|
// 5. 如果新设备类型没有状态数据,直接返回
|
||||||
|
if (mapInfo.isEmpty()) {
|
||||||
|
_curType = keyType;
|
||||||
|
// 清空当前状态相关显示
|
||||||
|
clearStateDisplay();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. 填充状态下拉框
|
||||||
|
QString firstState; // 记录第一个状态,用于后续加载
|
||||||
|
for (auto iter = mapInfo.begin(); iter != mapInfo.end(); ++iter) {
|
||||||
|
QString stateName = iter.key().sState;
|
||||||
|
int stateValue = static_cast<int>(iter.key().eState);
|
||||||
|
|
||||||
|
ui->cb_state->addItem(stateName, stateValue);
|
||||||
|
|
||||||
|
// 记录第一个状态
|
||||||
|
if (firstState.isEmpty()) {
|
||||||
|
firstState = stateName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新元数据(如果有变化)
|
||||||
|
if (_curMeta != iter->sMeta) {
|
||||||
|
_curMeta = iter->sMeta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 7. 更新当前设备类型
|
||||||
|
_curType = keyType;
|
||||||
|
|
||||||
|
// 8. 加载第一个状态的设置
|
||||||
|
if (!firstState.isEmpty()) {
|
||||||
|
// 设置下拉框当前项为第一个状态
|
||||||
|
ui->cb_state->setCurrentIndex(0);
|
||||||
|
// 触发状态变化处理
|
||||||
|
onStateChanged(firstState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::onStateChanged(const QString& str)
|
||||||
|
{
|
||||||
|
/*if(_tempSetting.contains(_curType)){
|
||||||
|
monitorItemStateStruct keyState;
|
||||||
|
keyState.sState = str;
|
||||||
|
keyState.eState = monitorItemState(ui->cb_state->currentData().toInt());
|
||||||
|
if(_tempSetting[_curType].contains(keyState)){
|
||||||
|
saveSetting(_curType,_curState);
|
||||||
|
auto info = _tempSetting[_curType][keyState];
|
||||||
|
ui->checkBox_custom->setChecked(info.bEnable);
|
||||||
|
if(_curModel != info.sModel){
|
||||||
|
_curModel = info.sModel;
|
||||||
|
}
|
||||||
|
_curState = keyState;
|
||||||
|
loadSetting(_curType,_curState);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
// 1. 检查当前设备类型是否存在
|
||||||
|
if (!_tempSetting.contains(_curType)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 检查状态是否为空
|
||||||
|
if (str.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 构建状态键值
|
||||||
|
monitorItemStateStruct keyState;
|
||||||
|
keyState.sState = str;
|
||||||
|
|
||||||
|
// 4. 从下拉框获取状态枚举值(添加安全检查)
|
||||||
|
QVariant stateData = ui->cb_state->currentData();
|
||||||
|
if (!stateData.isValid()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ok = false;
|
||||||
|
int stateValue = stateData.toInt(&ok);
|
||||||
|
if (!ok) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
keyState.eState = monitorItemState(stateValue);
|
||||||
|
|
||||||
|
// 5. 检查状态是否存在
|
||||||
|
auto& typeSettings = _tempSetting[_curType];
|
||||||
|
if (!typeSettings.contains(keyState)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6. 保存当前设置
|
||||||
|
saveSetting(_curType, _curState);
|
||||||
|
|
||||||
|
// 7. 获取新状态信息
|
||||||
|
auto& info = typeSettings[keyState];
|
||||||
|
|
||||||
|
// 8. 更新界面控件
|
||||||
|
ui->checkBox_custom->setChecked(info.bEnable);
|
||||||
|
|
||||||
|
// 9. 更新模型信息(仅在变化时)
|
||||||
|
if (_curModel != info.sModel) {
|
||||||
|
_curModel = info.sModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 10. 更新当前状态并加载新设置
|
||||||
|
_curState = keyState;
|
||||||
|
loadSetting(_curType, _curState);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::loadSetting(monitorItemTypeStruct type,monitorItemStateStruct state)
|
||||||
|
{
|
||||||
|
auto setting = _tempSetting[type][state];
|
||||||
|
ui->checkBox_custom->setChecked(setting.bEnable);
|
||||||
|
if(setting.bEnable){
|
||||||
|
ui->btn_selectColor->setEnabled(true);
|
||||||
|
ui->btn_selectIcon->setEnabled(true);
|
||||||
|
ui->sb_width->setEnabled(true);
|
||||||
|
ui->sb_height->setEnabled(true);
|
||||||
|
ui->cb_effect->setEnabled(true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ui->btn_selectColor->setEnabled(false);
|
||||||
|
ui->btn_selectIcon->setEnabled(false);
|
||||||
|
ui->sb_width->setEnabled(false);
|
||||||
|
ui->sb_height->setEnabled(false);
|
||||||
|
ui->cb_effect->setEnabled(false);
|
||||||
|
}
|
||||||
|
_curColor = QColor(setting.sColor);
|
||||||
|
// 更新按钮显示
|
||||||
|
QPixmap pixmap(16, 16);
|
||||||
|
pixmap.fill(_curColor);
|
||||||
|
ui->btn_selectColor->setIcon(QIcon(pixmap));
|
||||||
|
ui->btn_selectColor->setText(_curColor.name());
|
||||||
|
|
||||||
|
QSvgRenderer renderer(setting.bytPicture);
|
||||||
|
QPixmap pixSvg(32, 32);
|
||||||
|
pixmap.fill(Qt::transparent);
|
||||||
|
QPainter painter(&pixSvg);
|
||||||
|
renderer.render(&painter);
|
||||||
|
|
||||||
|
ui->btn_selectIcon->setIcon(QIcon(pixSvg));
|
||||||
|
ui->content->setSvgFile(setting.bytPicture);
|
||||||
|
ui->content->setColors(_curColor);
|
||||||
|
|
||||||
|
ui->sb_width->setValue(setting.nWidth);
|
||||||
|
ui->sb_height->setValue(setting.nHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::saveSetting(monitorItemTypeStruct type,monitorItemStateStruct state)
|
||||||
|
{
|
||||||
|
if(type.notEmpty() && state.notEmpty()){
|
||||||
|
auto& setting = _tempSetting[type][state];
|
||||||
|
setting.bEnable = ui->checkBox_custom->isChecked();
|
||||||
|
setting.sColor = _curColor.name();
|
||||||
|
setting.bytPicture = ui->content->getCurSvg();
|
||||||
|
setting.nWidth = ui->sb_width->value();
|
||||||
|
setting.nHeight = ui->sb_height->value();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::updatePreview()
|
||||||
|
{
|
||||||
|
ui->content->update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorDisplaySettingDlg::clearStateDisplay()
|
||||||
|
{
|
||||||
|
ui->checkBox_custom->setChecked(false);
|
||||||
|
// 可以添加其他需要清空的UI元素
|
||||||
|
_curState = monitorItemStateStruct(); // 清空当前状态
|
||||||
|
_curModel = QString(); // 清空当前模型
|
||||||
|
_curMeta = QString(); // 清空元数据
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
#include "monitorItemPreviewDlg.h"
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
|
MonitorItemPreviewDlg::MonitorItemPreviewDlg(QWidget* parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
{
|
||||||
|
initial();
|
||||||
|
}
|
||||||
|
|
||||||
|
MonitorItemPreviewDlg::~MonitorItemPreviewDlg()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorItemPreviewDlg::initial()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorItemPreviewDlg::setSvgFile(const QByteArray &bytSvg)
|
||||||
|
{
|
||||||
|
m_renderer.load(bytSvg);
|
||||||
|
_curSvg = bytSvg;
|
||||||
|
update(); // 触发重绘
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorItemPreviewDlg::setColors(const QColor &color)
|
||||||
|
{
|
||||||
|
m_Color = color;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorItemPreviewDlg::paintEvent(QPaintEvent *) {
|
||||||
|
QPainter painter(this);
|
||||||
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
|
|
||||||
|
// 1. 先将SVG渲染到一个透明图像上作为遮罩
|
||||||
|
QImage maskImage(size(), QImage::Format_ARGB32);
|
||||||
|
maskImage.fill(Qt::transparent);
|
||||||
|
|
||||||
|
QPainter maskPainter(&maskImage);
|
||||||
|
m_renderer.render(&maskPainter);
|
||||||
|
maskPainter.end();
|
||||||
|
|
||||||
|
// 2. 使用目标颜色填充,但只在SVG的非透明区域显示
|
||||||
|
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||||
|
|
||||||
|
for (int y = 0; y < maskImage.height(); ++y) {
|
||||||
|
for (int x = 0; x < maskImage.width(); ++x) {
|
||||||
|
QRgb pixel = maskImage.pixel(x, y);
|
||||||
|
if (qAlpha(pixel) > 0) { // 只处理非透明像素
|
||||||
|
// 保持原始透明度,只改变颜色
|
||||||
|
QColor newColor = m_Color;
|
||||||
|
newColor.setAlpha(qAlpha(pixel)); // 保持原始alpha值
|
||||||
|
painter.fillRect(x, y, 1, 1, newColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -15,6 +15,9 @@
|
||||||
#include "monitorConfigDlg.h"
|
#include "monitorConfigDlg.h"
|
||||||
#include "monitorAttributeDlg.h"
|
#include "monitorAttributeDlg.h"
|
||||||
#include "monitorDetailAttributeDlg.h"
|
#include "monitorDetailAttributeDlg.h"
|
||||||
|
#include "monitorDisplaySettingDlg.h"
|
||||||
|
#include "dataBase.h"
|
||||||
|
#include "projectModelManager.h"
|
||||||
|
|
||||||
MonitorPanel::MonitorPanel(PowerEntity* pEntity,QWidget *parent,DiagramMode mode)
|
MonitorPanel::MonitorPanel(PowerEntity* pEntity,QWidget *parent,DiagramMode mode)
|
||||||
: BaseDrawingPanel(pEntity,parent,mode)
|
: BaseDrawingPanel(pEntity,parent,mode)
|
||||||
|
|
@ -24,6 +27,7 @@ MonitorPanel::MonitorPanel(PowerEntity* pEntity,QWidget *parent,DiagramMode mode
|
||||||
,_itemListmodel(nullptr)
|
,_itemListmodel(nullptr)
|
||||||
,_menuSetting(nullptr)
|
,_menuSetting(nullptr)
|
||||||
,_detailAttributeDlg(nullptr)
|
,_detailAttributeDlg(nullptr)
|
||||||
|
,_displaySettingDlg(nullptr)
|
||||||
{
|
{
|
||||||
m_pStatusBar->setButtonVisible(false);
|
m_pStatusBar->setButtonVisible(false);
|
||||||
initial();
|
initial();
|
||||||
|
|
@ -44,6 +48,7 @@ void MonitorPanel::initial()
|
||||||
_sideBar->show();
|
_sideBar->show();
|
||||||
_pConfigDlg = new MonitorConfigDlg(this);
|
_pConfigDlg = new MonitorConfigDlg(this);
|
||||||
_detailAttributeDlg = new MonitorDetailAttributeDlg(this);
|
_detailAttributeDlg = new MonitorDetailAttributeDlg(this);
|
||||||
|
_displaySettingDlg = new MonitorDisplaySettingDlg(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MonitorPanel::closeEvent(QCloseEvent *closeEvent)
|
void MonitorPanel::closeEvent(QCloseEvent *closeEvent)
|
||||||
|
|
@ -68,6 +73,10 @@ void MonitorPanel::createToolBar()
|
||||||
connect(configAction, &QAction::triggered, this, &MonitorPanel::onConfigClicked);
|
connect(configAction, &QAction::triggered, this, &MonitorPanel::onConfigClicked);
|
||||||
_toolBar->addAction(configAction);
|
_toolBar->addAction(configAction);
|
||||||
|
|
||||||
|
QAction *itemConfigAction = new QAction("图元配置", this);
|
||||||
|
connect(itemConfigAction, &QAction::triggered, this, &MonitorPanel::onItemConfigClicked);
|
||||||
|
_toolBar->addAction(itemConfigAction);
|
||||||
|
|
||||||
QAction *connectAction = new QAction("连接设置", this);
|
QAction *connectAction = new QAction("连接设置", this);
|
||||||
connect(connectAction, &QAction::triggered, this, &MonitorPanel::onConncecClicked);
|
connect(connectAction, &QAction::triggered, this, &MonitorPanel::onConncecClicked);
|
||||||
_toolBar->addAction(connectAction);
|
_toolBar->addAction(connectAction);
|
||||||
|
|
@ -262,7 +271,197 @@ void MonitorPanel::onConfigClicked()
|
||||||
_pConfigDlg->show();
|
_pConfigDlg->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MonitorPanel::onItemConfigClicked()
|
||||||
|
{
|
||||||
|
_displaySettingDlg->showDlg();
|
||||||
|
}
|
||||||
|
|
||||||
void MonitorPanel::onConncecClicked()
|
void MonitorPanel::onConncecClicked()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MonitorPanel::initDisplayState()
|
||||||
|
{
|
||||||
|
auto &mapState = _pModel->getMonitorStateMap();
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_bus;
|
||||||
|
lst_bus.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_bus.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
lst_bus.append(qMakePair(monitorItemState::Energized,"带电"));
|
||||||
|
lst_bus.append(qMakePair(monitorItemState::DeEnergized,"失电"));
|
||||||
|
lst_bus.append(qMakePair(monitorItemState::Grounding,"接地"));
|
||||||
|
mapState.insert(1,lst_bus);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_asyncmotor;
|
||||||
|
lst_asyncmotor.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_asyncmotor.append(qMakePair(monitorItemState::Alarm,"告警"));
|
||||||
|
lst_asyncmotor.append(qMakePair(monitorItemState::LineBreak,"断线"));
|
||||||
|
lst_asyncmotor.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
mapState.insert(2,lst_asyncmotor);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_cb;
|
||||||
|
lst_cb.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_cb.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
lst_cb.append(qMakePair(monitorItemState::Closing,"合闸"));
|
||||||
|
lst_cb.append(qMakePair(monitorItemState::Opening,"分闸"));
|
||||||
|
lst_cb.append(qMakePair(monitorItemState::AccidentTrip,"事故跳闸"));
|
||||||
|
mapState.insert(3,lst_cb);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_ct;
|
||||||
|
lst_ct.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_ct.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
lst_ct.append(qMakePair(monitorItemState::LineBreak,"断线"));
|
||||||
|
mapState.insert(4,lst_ct);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_pt;
|
||||||
|
lst_pt.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_pt.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
lst_pt.append(qMakePair(monitorItemState::LineBreak,"断线"));
|
||||||
|
mapState.insert(5,lst_pt);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_es;
|
||||||
|
lst_es.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_es.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
lst_es.append(qMakePair(monitorItemState::Closing,"合闸"));
|
||||||
|
lst_es.append(qMakePair(monitorItemState::Opening,"分闸"));
|
||||||
|
mapState.insert(6,lst_es);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_fes;
|
||||||
|
lst_fes.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_fes.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
lst_fes.append(qMakePair(monitorItemState::Closing,"合闸"));
|
||||||
|
lst_fes.append(qMakePair(monitorItemState::Opening,"分闸"));
|
||||||
|
mapState.insert(7,lst_fes);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_cable;
|
||||||
|
lst_cable.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_cable.append(qMakePair(monitorItemState::Energized,"带电"));
|
||||||
|
lst_cable.append(qMakePair(monitorItemState::DeEnergized,"失电"));
|
||||||
|
lst_cable.append(qMakePair(monitorItemState::Grounding,"接地"));
|
||||||
|
mapState.insert(8,lst_cable);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_ds;
|
||||||
|
lst_ds.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_ds.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
lst_ds.append(qMakePair(monitorItemState::Closing,"合闸"));
|
||||||
|
lst_ds.append(qMakePair(monitorItemState::Opening,"分闸"));
|
||||||
|
mapState.insert(9,lst_ds);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_dteds;
|
||||||
|
lst_dteds.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_dteds.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
lst_dteds.append(qMakePair(monitorItemState::Closing,"合闸"));
|
||||||
|
lst_dteds.append(qMakePair(monitorItemState::Opening,"分闸"));
|
||||||
|
mapState.insert(10,lst_dteds);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_potentialIndicator;
|
||||||
|
lst_potentialIndicator.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_potentialIndicator.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
mapState.insert(11,lst_potentialIndicator);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_lightningArrester;
|
||||||
|
lst_lightningArrester.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_lightningArrester.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
mapState.insert(12,lst_lightningArrester);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_cableTermination;
|
||||||
|
lst_cableTermination.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_cableTermination.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
mapState.insert(13,lst_cableTermination);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_cableEnd;
|
||||||
|
lst_cableEnd.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_cableEnd.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
mapState.insert(14,lst_cableEnd);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_transformer2w;
|
||||||
|
lst_transformer2w.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_transformer2w.append(qMakePair(monitorItemState::Alarm,"告警"));
|
||||||
|
lst_transformer2w.append(qMakePair(monitorItemState::LineBreak,"断线"));
|
||||||
|
lst_transformer2w.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
mapState.insert(15,lst_transformer2w);
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lst_transformer3w;
|
||||||
|
lst_transformer3w.append(qMakePair(monitorItemState::Normal,"正常"));
|
||||||
|
lst_transformer3w.append(qMakePair(monitorItemState::Alarm,"告警"));
|
||||||
|
lst_transformer3w.append(qMakePair(monitorItemState::LineBreak,"断线"));
|
||||||
|
lst_transformer3w.append(qMakePair(monitorItemState::StatusFault,"故障"));
|
||||||
|
mapState.insert(16,lst_transformer3w);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MonitorPanel::initDisplaySetting()
|
||||||
|
{
|
||||||
|
auto stateMap = _pModel->getMonitorStateMap();
|
||||||
|
QMap<int,componentTypeInfo> mapType = DataBase::GetInstance()->getAllComponentType(); //所有类型
|
||||||
|
QMap<int,ModelTypeInfo> mapUsed; //本图中使用的类型、模型名
|
||||||
|
|
||||||
|
auto mapItems = getModelController()->getProjectItems();
|
||||||
|
for(auto& pItem:mapItems){
|
||||||
|
auto pPro = pItem->getProperty();
|
||||||
|
if(pPro){
|
||||||
|
QString sMeta = pPro->metaModelName();
|
||||||
|
QString sModel = pPro->modelName();
|
||||||
|
int nType = pPro->type();
|
||||||
|
if(!mapUsed.contains(nType)){
|
||||||
|
ModelTypeInfo info;
|
||||||
|
info.nType = nType;
|
||||||
|
info.sType = mapType.value(nType).type;
|
||||||
|
info.sName = mapType.value(nType).name;
|
||||||
|
info.sMeta = sMeta;
|
||||||
|
info.sModel = sModel;
|
||||||
|
mapUsed.insert(nType,info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QMap<int,modelType> mapAllType = DataBase::GetInstance()->ModelType();
|
||||||
|
for(auto iter = mapUsed.begin();iter != mapUsed.end();++iter){ //遍历所有类型
|
||||||
|
QMap<monitorItemStateStruct,monitorItemDisplayInfo> mapStates;
|
||||||
|
QString sType = mapUsed.value(iter.key()).sType;
|
||||||
|
QString sName = mapUsed.value(iter.key()).sName;
|
||||||
|
QString sMeta = mapUsed.value(iter.key()).sMeta;
|
||||||
|
QString sModel = mapUsed.value(iter.key()).sModel;
|
||||||
|
|
||||||
|
QList<QPair<monitorItemState,QString>> lstState = stateMap.value(iter.key());
|
||||||
|
for(auto &pair:lstState){
|
||||||
|
monitorItemDisplayInfo info;
|
||||||
|
info.nItemType = iter.key();
|
||||||
|
info.sStateName = pair.second;
|
||||||
|
info.sMeta = sMeta;
|
||||||
|
info.sModel = sModel;
|
||||||
|
info.nWidth = 40;
|
||||||
|
info.nHeight = 40;
|
||||||
|
|
||||||
|
QByteArray svg;
|
||||||
|
auto mapUsedSvg = ProjectModelManager::instance().getData()[sMeta][sModel].modelSetting.mapUsedSvg;
|
||||||
|
auto mapAllSvg = ProjectModelManager::instance().getData()[sMeta][sModel].modelSetting.mapSvg;
|
||||||
|
|
||||||
|
if(!mapUsedSvg.empty()){ //先判断已选svg
|
||||||
|
svg = mapUsedSvg.first();
|
||||||
|
}
|
||||||
|
else if(!mapAllSvg.empty()){ //后判断所有svg
|
||||||
|
svg = mapAllSvg.first();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for(auto &mt:mapAllType){ //最后采用初始svg
|
||||||
|
if(mt.modelName == iter->sName){
|
||||||
|
svg = mt.icon;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
info.bytPicture = svg;
|
||||||
|
|
||||||
|
monitorItemStateStruct keyState;
|
||||||
|
keyState.eState = pair.first;
|
||||||
|
keyState.sState = pair.second;
|
||||||
|
mapStates.insert(keyState,info);
|
||||||
|
}
|
||||||
|
|
||||||
|
monitorItemTypeStruct keyType;
|
||||||
|
keyType.sTag = sType;
|
||||||
|
keyType.sName = sName;
|
||||||
|
_pModel->getMonitorDisplaySetting().insert(keyType,mapStates);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,423 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>monitorDisplaySettingDlg</class>
|
||||||
|
<widget class="QDialog" name="monitorDisplaySettingDlg">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>500</width>
|
||||||
|
<height>453</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>4</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="widget" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>21</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>21</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: rgb(192, 192, 192);</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>6</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="QLabel" name="label">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(0, 0, 0);
|
||||||
|
font: 12pt "Microsoft YaHei UI";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>图元状态配置</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>584</width>
|
||||||
|
<height>18</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget_2" native="true">
|
||||||
|
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,1,0">
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>40</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>40</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>设备:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="cb_type"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>状态:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="cb_state"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>状态预览</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="MonitorItemPreviewDlg" name="content" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>160</width>
|
||||||
|
<height>160</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border:1px solid grey;</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>80</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" rowspan="2">
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>状态设置</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>效果设置:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>颜色设置:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="2">
|
||||||
|
<widget class="QStackedWidget" name="stackedWidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="page"/>
|
||||||
|
<widget class="QWidget" name="page_2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<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="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>辅助颜色:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btn_selectSecColor">
|
||||||
|
<property name="text">
|
||||||
|
<string>选择颜色</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="cb_effect">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>无</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>闪烁</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QPushButton" name="btn_selectIcon">
|
||||||
|
<property name="text">
|
||||||
|
<string>选择图标</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="title">
|
||||||
|
<string>尺寸</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,1,0,1">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>宽:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="sb_width"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>高:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="sb_height"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QPushButton" name="btn_selectColor">
|
||||||
|
<property name="text">
|
||||||
|
<string>选择颜色</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>图标设置:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="checkBox_custom">
|
||||||
|
<property name="text">
|
||||||
|
<string>启用自定义</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btn_save">
|
||||||
|
<property name="text">
|
||||||
|
<string>保存</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btn_cancel">
|
||||||
|
<property name="text">
|
||||||
|
<string>取消</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>MonitorItemPreviewDlg</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>monitoritempreviewdlg.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Loading…
Reference in New Issue