add real time data display

This commit is contained in:
baiYue 2025-12-25 09:03:35 +08:00
parent 77cb3038e1
commit 90e5cf755a
61 changed files with 3636 additions and 226 deletions

View File

@ -56,6 +56,7 @@ set(H_HEADER_FILES
include/createEditor.h include/createEditor.h
include/monitorItemsDlg.h include/monitorItemsDlg.h
include/monitorPagesDlg.h include/monitorPagesDlg.h
include/baseDockWidget.h
common/include/global.h common/include/global.h
common/include/tools.h common/include/tools.h
@ -86,6 +87,7 @@ set(CPP_SOURCE_FILES
source/createEditor.cpp source/createEditor.cpp
source/monitorItemsDlg.cpp source/monitorItemsDlg.cpp
source/monitorPagesDlg.cpp source/monitorPagesDlg.cpp
source/baseDockWidget.cpp
common/source/httpInterface.cpp common/source/httpInterface.cpp
common/source/global.cpp common/source/global.cpp

View File

@ -1020,6 +1020,7 @@ struct monitorPageInfo //运行时page
struct gridInfo struct gridInfo
{ {
int id = -1; int id = -1;
QString tagname;
QString name; QString name;
QString description; QString description;
}; };
@ -1028,6 +1029,7 @@ struct zoneInfo
{ {
int id = -1; int id = -1;
int grid_id = -1; int grid_id = -1;
QString tagname;
QString name; QString name;
QString description; QString description;
}; };
@ -1036,6 +1038,7 @@ struct stationInfo
{ {
int id = -1; int id = -1;
int zone_id = -1; int zone_id = -1;
QString tagname;
QString name; QString name;
QString description; QString description;
bool is_local = true; bool is_local = true;
@ -1195,7 +1198,7 @@ struct monitorItemAttributeInfo //单个监控item属性
bool bShowDiagram = false; //显示到组态中 bool bShowDiagram = false; //显示到组态中
int nGraphType = 0; //图表类型 0折线1柱状 int nGraphType = 0; //图表类型 0折线1柱状
QString sTimeRange; //时间范围(分) QString sTimeRange; //时间范围(分)
QString sValue; //属性值 QMap<quint64,double> mapValue; //属性值
bool bSelected = false; bool bSelected = false;
// 转换为JSON对象 // 转换为JSON对象
@ -1210,7 +1213,7 @@ struct monitorItemAttributeInfo //单个监控item属性
obj["bShowDiagram"] = bShowDiagram; obj["bShowDiagram"] = bShowDiagram;
obj["nGraphType"] = nGraphType; obj["nGraphType"] = nGraphType;
obj["sTimeRange"] = sTimeRange; obj["sTimeRange"] = sTimeRange;
obj["sValue"] = sValue; obj["sValue"] = mapToJson(mapValue);
obj["bSelected"] = bSelected; obj["bSelected"] = bSelected;
return obj; return obj;
} }
@ -1226,7 +1229,7 @@ struct monitorItemAttributeInfo //单个监控item属性
bShowDiagram = json["bShowDiagram"].toBool(); bShowDiagram = json["bShowDiagram"].toBool();
nGraphType = json["nGraphType"].toInt(); nGraphType = json["nGraphType"].toInt();
sTimeRange = json["sTimeRange"].toString(); sTimeRange = json["sTimeRange"].toString();
sValue = json["sValue"].toString(); mapValue = jsonToMap(json["sValue"].toObject());
bSelected = json["bSelected"].toBool(); bSelected = json["bSelected"].toBool();
} }
@ -1241,6 +1244,34 @@ struct monitorItemAttributeInfo //单个监控item属性
sName == other.sName && sName == other.sName &&
sGroup == other.sGroup; sGroup == other.sGroup;
} }
QJsonObject mapToJson(const QMap<quint64, double>& map) const{
QJsonObject jsonObj;
for (auto it = map.constBegin(); it != map.constEnd(); ++it) {
// 将quint64的key转换为QString
QString key = QString::number(it.key());
jsonObj[key] = it.value();
}
return jsonObj;
}
// 从JSON转换回来
QMap<quint64, double> jsonToMap(const QJsonObject& jsonObj) const{
QMap<quint64, double> map;
for (auto it = jsonObj.constBegin(); it != jsonObj.constEnd(); ++it) {
bool ok;
quint64 key = it.key().toULongLong(&ok);
if (ok) {
double value = it.value().toDouble();
map[key] = value;
}
}
return map;
}
}; };
enum class monitorItemState{ //监控item的状态 enum class monitorItemState{ //监控item的状态

View File

@ -70,10 +70,6 @@ BaseProperty::BaseProperty(QObject* parent)
bInService = true; bInService = true;
nState = 1; nState = 1;
nStatus = 1; nStatus = 1;
sGrid=QString("1"); //暂时修改,数据库字段不为空
sZone=QString("1");
sStation=QString("1");
} }
BaseProperty::~BaseProperty() BaseProperty::~BaseProperty()

View File

@ -15,9 +15,9 @@ public:
DrawingPanel(PowerEntity* pEntity,QWidget *parent = nullptr,DiagramMode mode = DM_edit); DrawingPanel(PowerEntity* pEntity,QWidget *parent = nullptr,DiagramMode mode = DM_edit);
~DrawingPanel(); ~DrawingPanel();
QJsonObject getDiagramInfo() const; //返回图元位置信息 virtual QJsonObject getDiagramInfo() override; //返回图元位置信息
void loadNodes(QJsonObject obj) override; //加载图元信息 virtual void loadNodes(QJsonObject obj) override; //加载图元信息
void saveNodes(int pageId) override; //保存到数据库 virtual void saveNodes(int pageId) override; //保存到数据库
protected: protected:
void closeEvent(QCloseEvent *closeEvent) override; void closeEvent(QCloseEvent *closeEvent) override;
public slots: public slots:

View File

@ -82,7 +82,7 @@ public:
void showProjectModelSettingDlg(GraphicsBaseModelItem*); //在基模拓扑图上打开工程模设置对话框 void showProjectModelSettingDlg(GraphicsBaseModelItem*); //在基模拓扑图上打开工程模设置对话框
void generateProjectModel(const QString&,QList<GraphicsBaseModelItem*>,QList<GraphicsNonStandardItem*>); //由基模生成工程模 void generateProjectModel(const QString&,QList<GraphicsBaseModelItem*>,QList<GraphicsNonStandardItem*>); //由基模生成工程模
void addProjectItemByBaseData(DrawingPanel*,GraphicsBaseModelItem*,BaseProperty*); //从基模item生成工程模item void addProjectItemByBaseData(DrawingPanel*,GraphicsBaseModelItem*,BaseProperty*,QString sGrid = "",QString sZone = "",QString sStation = ""); //从基模item生成工程模item
void onWizardFinished(QMap<QUuid,GraphicsBaseModelItem*> mapItem,QList<EditBaseItem*> mapBay); //editor结束生成基模 void onWizardFinished(QMap<QUuid,GraphicsBaseModelItem*> mapItem,QList<EditBaseItem*> mapBay); //editor结束生成基模
/*************************间隔*****************************/ /*************************间隔*****************************/
void addBayItem(QUuid,ModelFunctionType = ModelFunctionType::ProjectModel); void addBayItem(QUuid,ModelFunctionType = ModelFunctionType::ProjectModel);
@ -115,6 +115,7 @@ public:
void startAcceptData(); //开始接收实时数据 void startAcceptData(); //开始接收实时数据
void stopAcceptData(QString); //停止接收实时数据 void stopAcceptData(QString); //停止接收实时数据
QMap<int,QList<QPair<monitorItemState,QString>>>& getMonitorStateMap(){return m_monitorStateMap;} QMap<int,QList<QPair<monitorItemState,QString>>>& getMonitorStateMap(){return m_monitorStateMap;}
void setMonitorDisplaySetting(QMap<monitorItemTypeStruct,QMap<monitorItemStateStruct,monitorItemDisplayInfo>> map){m_monitorDisplaySetting = map;} void setMonitorDisplaySetting(QMap<monitorItemTypeStruct,QMap<monitorItemStateStruct,monitorItemDisplayInfo>> map){m_monitorDisplaySetting = map;}
QMap<monitorItemTypeStruct,QMap<monitorItemStateStruct,monitorItemDisplayInfo>>& getMonitorDisplaySetting(){return m_monitorDisplaySetting;} QMap<monitorItemTypeStruct,QMap<monitorItemStateStruct,monitorItemDisplayInfo>>& getMonitorDisplaySetting(){return m_monitorDisplaySetting;}
@ -128,6 +129,7 @@ Q_SIGNALS:
void itemSelected(QList<monitorRelationItem>); //发送选中的元件 void itemSelected(QList<monitorRelationItem>); //发送选中的元件
void monitorCreated(QString,QPair<QString,QUuid>); //监控创建信号 <工程page,<监控page,page_uid>> void monitorCreated(QString,QPair<QString,QUuid>); //监控创建信号 <工程page,<监控page,page_uid>>
void monitorItems(QList<monitorRelationItem>); //发送创建成功的Items void monitorItems(QList<monitorRelationItem>); //发送创建成功的Items
void dataUpdated(); //数据更新通知
public: public:
void setPageName(QString s) {_pageName = s;} //设置表名称 void setPageName(QString s) {_pageName = s;} //设置表名称
QString pageName() const {return _pageName;} QString pageName() const {return _pageName;}
@ -152,6 +154,7 @@ private:
void autoSetModelName(GraphicsBaseModelItem*); //如果此页的工程模已被设置将projectName更新到item void autoSetModelName(GraphicsBaseModelItem*); //如果此页的工程模已被设置将projectName更新到item
QString removeSuffix(const QString& str); //移除最后一个下划线后的内容 (处理各种tag后缀) QString removeSuffix(const QString& str); //移除最后一个下划线后的内容 (处理各种tag后缀)
ModelProperty* getItemByUid(QList<GraphicsBaseItem*>,QUuid); //返回uid对应的data ModelProperty* getItemByUid(QList<GraphicsBaseItem*>,QUuid); //返回uid对应的data
void updateMonitor(QMap<QString,QMap<quint64,double>>); //使用当前数据更新运行时
private: private:
QMap<QUuid,GraphicsProjectModelItem*> _nodeItem; //工程模对象 QMap<QUuid,GraphicsProjectModelItem*> _nodeItem; //工程模对象

View File

@ -4,7 +4,7 @@
#include <QFont> #include <QFont>
#include "graphicsItem/itemControlHandle.h" #include "graphicsItem/itemControlHandle.h"
int const TEXT_WIDTH = 80; int const TEXT_WIDTH = 100;
int const TEXT_HEIGHT = 40; int const TEXT_HEIGHT = 40;
class QGraphicsProxyWidget; class QGraphicsProxyWidget;

View File

@ -20,14 +20,15 @@ public:
~MonitorAttributeGroupDlg(); ~MonitorAttributeGroupDlg();
void initial(); void initial();
void createGroupView(QList<monitorItemAttributeInfo>); void createGroupView(QList<monitorItemAttributeInfo>,int nType = 0); //0小型 1中型
void setParent(MonitorAttributeDlg* p) {_pParent = p;} void setParent(MonitorAttributeDlg* p) {_pParent = p;}
void setDetailParent(MonitorDetailAttributeDlg* p){_pDetailParent = p;} void setDetailParent(MonitorDetailAttributeDlg* p){_pDetailParent = p;}
void setCurMode(int n) {_curMode = n;} void setCurMode(int n) {_curMode = n;}
private: public slots:
QWidget* createEditor(monitorItemAttributeInfo);
void updateLineChartData(QChartView* chartView, const QVector<QPointF>& data);
void updateData(); //使用数据更新当前界面 void updateData(); //使用数据更新当前界面
private:
QWidget* createEditor(monitorItemAttributeInfo,int nType = 0); //nType:0小 1中
void updateLineChartData(QChartView* chartView, const QVector<QPointF>& data);
FixedPortsModel* getModelController(); FixedPortsModel* getModelController();
QUuid getCurUid(); QUuid getCurUid();
private: private:

View File

@ -125,7 +125,9 @@ void CtExtraInfoDlg::setPropertyValue(QVariant var)
} }
else if(info.name == "仪表保安系数" || info.name == "fs") else if(info.name == "仪表保安系数" || info.name == "fs")
{ {
ui->le_isf->setText(info.defaultValue.toString()); if(info.defaultValue.toString() == "null")
ui->le_isf->setText(0);
ui->le_isf->setText(QString::number(info.defaultValue.toDouble()));
} }
else if(info.name == "热稳定电流(A)" || info.name == "ith_a") else if(info.name == "热稳定电流(A)" || info.name == "ith_a")
{ {

View File

@ -270,10 +270,12 @@ void DiagramCavas::onSignal_savePage()
} }
} }
auto context = pPanel->getDiagramInfo();
if(DataBase::GetInstance()->getPageIdByName(_curPage) == -1) //不存在,创建 if(DataBase::GetInstance()->getPageIdByName(_curPage) == -1) //不存在,创建
DataBase::GetInstance()->insertPage(_curPage,_curPage,QJsonObject(),pPanel->getDiagramInfo(),QString("page"),1); DataBase::GetInstance()->insertPage(_curPage,_curPage,QJsonObject(),context,QString("page"),1);
else else
DataBase::GetInstance()->updatePage(_curPage,_curPage,pPanel->getDiagramInfo()); DataBase::GetInstance()->updatePage(_curPage,_curPage,context);
int pageId = DataBase::GetInstance()->getPageIdByName(_curPage); int pageId = DataBase::GetInstance()->getPageIdByName(_curPage);
pPanel->saveNodes(pageId); pPanel->saveNodes(pageId);

View File

@ -21,6 +21,7 @@ DiagramConnectSetting::~DiagramConnectSetting()
void DiagramConnectSetting::initial() void DiagramConnectSetting::initial()
{ {
connect(ui->btn_testRecommand,&QPushButton::clicked,this,&DiagramConnectSetting::onTestHttpRecommandClicked); connect(ui->btn_testRecommand,&QPushButton::clicked,this,&DiagramConnectSetting::onTestHttpRecommandClicked);
connect(ui->btn_testData,&QPushButton::clicked,this,&DiagramConnectSetting::onTestHttpDataClicked);
connect(ui->btn_testData,&QPushButton::clicked,this,&DiagramConnectSetting::onTestWebsocketClicked); connect(ui->btn_testData,&QPushButton::clicked,this,&DiagramConnectSetting::onTestWebsocketClicked);
connect(ui->btn_testWebsoc,&QPushButton::clicked,this,&DiagramConnectSetting::onTestWebsocketClicked); connect(ui->btn_testWebsoc,&QPushButton::clicked,this,&DiagramConnectSetting::onTestWebsocketClicked);
connect(ui->btn_ok,&QPushButton::clicked,this,&DiagramConnectSetting::onOkClicked); connect(ui->btn_ok,&QPushButton::clicked,this,&DiagramConnectSetting::onOkClicked);
@ -61,6 +62,9 @@ void DiagramConnectSetting::updateHttpLog(QString sType,QString data)
else if(sType == "subscriptions"){ else if(sType == "subscriptions"){
ui->label_httpData->setText("联通"); ui->label_httpData->setText("联通");
} }
else if(sType == "subscriptionTest"){
ui->label_httpData->setText("联通");
}
} }
void DiagramConnectSetting::updateWebsocketLog(QString str) void DiagramConnectSetting::updateWebsocketLog(QString str)
@ -76,7 +80,9 @@ void DiagramConnectSetting::onTestHttpRecommandClicked()
void DiagramConnectSetting::onTestHttpDataClicked() void DiagramConnectSetting::onTestHttpDataClicked()
{ {
QString sPath = ui->le_httpIp->text()+"/monitors/data/subscriptions";
UiCommunicationBus::instance()->sendHttpRequest(sPath,QVariant(),"POST");
} }
void DiagramConnectSetting::onTestWebsocketClicked() void DiagramConnectSetting::onTestWebsocketClicked()

View File

@ -103,7 +103,7 @@ void DrawingPanel::onSignal_Generate()
m_pDiagramNameInputer->show(); m_pDiagramNameInputer->show();
} }
QJsonObject DrawingPanel::getDiagramInfo() const QJsonObject DrawingPanel::getDiagramInfo()
{ {
QJsonObject obj; QJsonObject obj;
QJsonArray arr; QJsonArray arr;
@ -224,7 +224,7 @@ void DrawingPanel::loadNodes(QJsonObject obj)
QList<monitorRelationItem> lstFirst; QList<monitorRelationItem> lstFirst;
for(auto& pBaseItem:_pModel->getProjectItems()) //首次循环添加母线及独立设备(变压器等),更新列表显示使用 for(auto& pBaseItem:_pModel->getProjectItems()) //首次循环添加母线及独立设备(变压器等),更新列表显示使用
{ {
BaseModelProperty* pBase = dynamic_cast<BaseModelProperty*>(pBaseItem->getProperty()); BaseProperty* pBase = dynamic_cast<BaseProperty*>(pBaseItem->getProperty());
if(pBase->type() == 1){ //母线添加子间隔 if(pBase->type() == 1){ //母线添加子间隔
monitorRelationItem info; monitorRelationItem info;
info.item.nEquipType = pBase->type(); info.item.nEquipType = pBase->type();
@ -292,7 +292,7 @@ void DrawingPanel::loadNodes(QJsonObject obj)
QList<monitorRelationItem> lstSecond; QList<monitorRelationItem> lstSecond;
for(auto& pBaseItem:_pModel->getProjectItems()) //二次循环添加间隔内设备(更新列表显示使用) for(auto& pBaseItem:_pModel->getProjectItems()) //二次循环添加间隔内设备(更新列表显示使用)
{ {
BaseModelProperty* pBase = dynamic_cast<BaseModelProperty*>(pBaseItem->getProperty()); BaseProperty* pBase = dynamic_cast<BaseProperty*>(pBaseItem->getProperty());
if(pBase->type() != 1 && pBase->type() != 15 && pBase->type() != 16){ //设备添加 if(pBase->type() != 1 && pBase->type() != 15 && pBase->type() != 16){ //设备添加
monitorRelationItem info; monitorRelationItem info;
info.item.nEquipType = pBase->type(); info.item.nEquipType = pBase->type();

View File

@ -49,6 +49,7 @@
#include "designerView.h" #include "designerView.h"
#include "uiCommunicationBus.h" #include "uiCommunicationBus.h"
#include "instance/dataAccessor.h" #include "instance/dataAccessor.h"
#include "graphicsItem/handleText.h"
#include "global.h" #include "global.h"
bool FixedPortsModel::_dataInitialised = false; bool FixedPortsModel::_dataInitialised = false;
@ -68,6 +69,7 @@ FixedPortsModel::FixedPortsModel(PowerEntity* pEntity)
loadNodeDataFromDataBase(); loadNodeDataFromDataBase();
_Interface = new HttpInterface(this); _Interface = new HttpInterface(this);
_timer = new QTimer(this); _timer = new QTimer(this);
m_dataTimer = new QTimer(this);
_modelStateInfo = DataManager::instance().modelState(); _modelStateInfo = DataManager::instance().modelState();
_modelDataInfo = DataManager::instance().modelData(); _modelDataInfo = DataManager::instance().modelData();
@ -1213,6 +1215,8 @@ void FixedPortsModel::onDataTimerOut()
auto pDataAccessor = _cavas->getDataAccessor(); auto pDataAccessor = _cavas->getDataAccessor();
if(pDataAccessor){ if(pDataAccessor){
_curData = pDataAccessor->getTargetData(_curRequestLst); _curData = pDataAccessor->getTargetData(_curRequestLst);
if(!_curData.isEmpty())
updateMonitor(_curData);
} }
} }
} }
@ -1285,6 +1289,31 @@ ModelProperty* FixedPortsModel::getItemByUid(QList<GraphicsBaseItem*> lst,QUuid
return nullptr; return nullptr;
} }
void FixedPortsModel::updateMonitor(QMap<QString,QMap<quint64,double>> data)
{
for(auto iter = m_monitorPara.begin();iter != m_monitorPara.end();++iter){
for(auto &info:iter.value()){
//if(info.bSelected){
if(data.contains(info.sConnectPara)){
info.mapValue = data.value(info.sConnectPara);
}
//}
}
}
emit dataUpdated();
for(auto& item:_nodeItem){ //更新界面中的数据
QMap<QString,HandleText*> mapText = item->getDynamicText();
for(auto &pText:mapText){
QString sPara = pText->getPara();
if(data.contains(sPara)){
QString sVal= QString::number(data.value(sPara).last());
pText->setText(sVal);
pText->update();
}
}
}
}
QWidget* FixedPortsModel::getTopWidget() QWidget* FixedPortsModel::getTopWidget()
{ {
@ -1546,6 +1575,18 @@ void FixedPortsModel::generateProjectModel(const QString& sPageName,QList<Graphi
_cavas->onSignal_createDiagram(info); _cavas->onSignal_createDiagram(info);
pProPanel = _cavas->getPanel(sPageName); pProPanel = _cavas->getPanel(sPageName);
} }
QList<gridInfo> lstGrid = DataBase::GetInstance()->getAllGrid();
QList<zoneInfo> lstZone = DataBase::GetInstance()->getAllZone();
QList<stationInfo> lstStation = DataBase::GetInstance()->getAllStation();
QString sG;
QString sZ;
QString sS;
if(!lstGrid.isEmpty())
sG = lstGrid.first().tagname;
if(!lstZone.isEmpty())
sZ = lstZone.first().tagname;
if(!lstStation.isEmpty())
sS = lstStation.first().tagname;
for(auto& pBaseItem:lstItem) //先处理连线递归处理连线连接的item for(auto& pBaseItem:lstItem) //先处理连线递归处理连线连接的item
{ {
@ -1557,7 +1598,10 @@ void FixedPortsModel::generateProjectModel(const QString& sPageName,QList<Graphi
if(pData) if(pData)
{ {
pData->setDataChanged(true); //数据状态改变 pData->setDataChanged(true); //数据状态改变
addProjectItemByBaseData(pProPanel,pBaseItem,pData); pData->setGrid(sG);
pData->setZone(sZ);
pData->setStation(sS);
addProjectItemByBaseData(pProPanel,pBaseItem,pData,sG,sZ,sS);
} }
} }
} }
@ -1847,7 +1891,7 @@ void FixedPortsModel::onWizardFinished(QMap<QUuid,GraphicsBaseModelItem*> mapIte
} }
} }
void FixedPortsModel::addProjectItemByBaseData(DrawingPanel* pPanel,GraphicsBaseModelItem* pItem,BaseProperty* pPro) void FixedPortsModel::addProjectItemByBaseData(DrawingPanel* pPanel,GraphicsBaseModelItem* pItem,BaseProperty* pPro,QString sGrid,QString sZone,QString sStation)
{ {
BaseModelProperty* pBase = dynamic_cast<BaseModelProperty*>(pItem->getProperty()); BaseModelProperty* pBase = dynamic_cast<BaseModelProperty*>(pItem->getProperty());
if(pBase){ if(pBase){
@ -2202,8 +2246,10 @@ void FixedPortsModel::addProjectItemByBaseData(DrawingPanel* pPanel,GraphicsBase
{ {
QUuid id = QUuid(baseFromComponentId); QUuid id = QUuid(baseFromComponentId);
GraphicsBaseModelItem* pFromItem = _baseItem.value(id); GraphicsBaseModelItem* pFromItem = _baseItem.value(id);
//QUuid id = QUuid::createUuid();
BaseProperty* pData = pPanel->getModelController()->addNodeData(id,pFromItem->getProperty()->type(),pFromItem->getProperty()->name(),pFromItem->getProperty()->modelName()); BaseProperty* pData = pPanel->getModelController()->addNodeData(id,pFromItem->getProperty()->type(),pFromItem->getProperty()->name(),pFromItem->getProperty()->modelName());
pData->setGrid(sGrid);
pData->setZone(sZone);
pData->setStation(sStation);
addProjectItemByBaseData(pPanel,pFromItem,pData); addProjectItemByBaseData(pPanel,pFromItem,pData);
proFromItemId = id.toString(); proFromItemId = id.toString();
} }
@ -2212,8 +2258,10 @@ void FixedPortsModel::addProjectItemByBaseData(DrawingPanel* pPanel,GraphicsBase
{ {
QUuid id = QUuid(baseToComponentId); QUuid id = QUuid(baseToComponentId);
GraphicsBaseModelItem* pToItem = _baseItem.value(id); GraphicsBaseModelItem* pToItem = _baseItem.value(id);
//QUuid id = QUuid::createUuid();
BaseProperty* pData = pPanel->getModelController()->addNodeData(id,pToItem->getProperty()->type(),pToItem->getProperty()->name(),pToItem->getProperty()->modelName()); BaseProperty* pData = pPanel->getModelController()->addNodeData(id,pToItem->getProperty()->type(),pToItem->getProperty()->name(),pToItem->getProperty()->modelName());
pData->setGrid(sGrid);
pData->setZone(sZone);
pData->setStation(sStation);
addProjectItemByBaseData(pPanel,pToItem,pData); addProjectItemByBaseData(pPanel,pToItem,pData);
proToItemId = id.toString(); proToItemId = id.toString();
} }

View File

@ -241,6 +241,7 @@ void GraphicsBaseItem::addDynamicText(QString tag,QString para)
pText->setIndex(ntagId); pText->setIndex(ntagId);
pText->setTagName(tag); pText->setTagName(tag);
pText->setType(1); pText->setType(1);
pText->setPara(para);
m_vecHanle.insert(ntagId,pText); m_vecHanle.insert(ntagId,pText);
m_mapDynamicText.insert(tag,pText); m_mapDynamicText.insert(tag,pText);

View File

@ -9,6 +9,8 @@
#include <QJsonArray> #include <QJsonArray>
#include "global.h" #include "global.h"
const int DIAGRAM_MAX_DATA_COUNT = 1000;
DataAccessor::DataAccessor(QObject* parent) DataAccessor::DataAccessor(QObject* parent)
: QObject(parent) : QObject(parent)
,_parentCavas(nullptr) ,_parentCavas(nullptr)
@ -29,12 +31,13 @@ void DataAccessor::onReceiveHttpData(const QString& sType,const QVariant& data)
QString sClientId = dataObj.value("client_id").toString(); QString sClientId = dataObj.value("client_id").toString();
QMap<QString,QString> lstTarget; QMap<QString,QString> lstTarget;
QJsonArray measureArr = dataObj.value("measurements").toArray(); QJsonArray targetArr = dataObj.value("targets").toArray();
for(const QJsonValue& value : measureArr){ for(const QJsonValue& value : targetArr){
QJsonObject obj = value.toObject(); QJsonObject obj = value.toObject();
QString sId = obj["id"].toString(); QString sId = obj["id"].toString();
QString sCode = obj["code"].toString(); QString sCode = obj["code"].toString();
qDebug() << "subscription:"+sId+"_"+sCode;
if(!lstTarget.contains(sId)){ if(!lstTarget.contains(sId)){
lstTarget.insert(sId,sCode); lstTarget.insert(sId,sCode);
} }
@ -75,14 +78,11 @@ void DataAccessor::onReceiveHttpData(const QString& sType,const QVariant& data)
// 比较两个列表是否相同 // 比较两个列表是否相同
if (sortedFirstElements == sortedLstKeys) if (sortedFirstElements == sortedLstKeys)
{ {
// 这里需要一个 id 参数,你可以从 lstRequest 中获取或使用其他方式
QString id; // 你需要确定 id 从哪里来
// 调用 moveMatchingRequests // 调用 moveMatchingRequests
for(auto& pair:tempList){ for(auto& pair:tempList){
pair.second = "connecting"; pair.second = "connecting";
} }
UiCommunicationBus::instance()->insertSesstionMap(id, lstTarget); UiCommunicationBus::instance()->insertSesstionMap(sClientId, lstTarget);
sAction = "start"; sAction = "start";
break; break;
} }
@ -95,7 +95,8 @@ void DataAccessor::onReceiveHttpData(const QString& sType,const QVariant& data)
QString sPre = removeAfterStreamBySplit(config.endpoint); //手动移除 QString sPre = removeAfterStreamBySplit(config.endpoint); //手动移除
config.endpoint = sPre + "/" + sClientId; config.endpoint = sPre + "/" + sClientId;
CommunicationManager::instance()->updateWebSocketConfig(config,sClientId); CommunicationManager::instance()->updateWebSocketConfig(config,sClientId);
CommunicationManager::instance()->connectWebSocket(sClientId); bool res = CommunicationManager::instance()->connectWebSocket(sClientId);
int a = 1;
} }
else if(sAction == "stop"){ //已经停止完毕从session中移除会话 else if(sAction == "stop"){ //已经停止完毕从session中移除会话
auto &map = UiCommunicationBus::instance()->getSesstionMap(); auto &map = UiCommunicationBus::instance()->getSesstionMap();
@ -130,6 +131,9 @@ void DataAccessor::onReceiveHttpData(const QString& sType,const QVariant& data)
} }
} }
} }
else if(sType == "subscriptionTest"){
qDebug()<<"receive null data";
}
if(_parentCavas){ if(_parentCavas){
auto pDlg = _parentCavas->getConnectSettingDlg(); auto pDlg = _parentCavas->getConnectSettingDlg();
if(pDlg){ if(pDlg){
@ -163,12 +167,19 @@ void DataAccessor::onReceiveWebsocketData(const QVariant& data)
} }
} }
QMutexLocker locker(&m_mutex); QMutexLocker locker(&m_mutex);
if (_realTimeData.contains(targetId)) { auto& innerMap = _realTimeData[targetId]; // 自动创建或获取
_realTimeData[targetId].insert(newInnerMap); // 批量插入
innerMap.insert(newInnerMap);
} else { // 如果数量超限,从开始处批量删除
_realTimeData.insert(targetId, newInnerMap); int currentSize = innerMap.size();
if (currentSize > DIAGRAM_MAX_DATA_COUNT) {
int toRemove = currentSize - DIAGRAM_MAX_DATA_COUNT;
auto it = innerMap.begin();
// 批量删除最旧的toRemove个元素
for (int i = 0; i < toRemove && it != innerMap.end(); ++i) {
it = innerMap.erase(it);
}
} }
} }
} }

View File

@ -61,6 +61,7 @@ void MonitorAttributeDlg::generateAttributeGroups(QUuid uid)
MonitorAttributeGroupDlg* pDlg = new MonitorAttributeGroupDlg(); MonitorAttributeGroupDlg* pDlg = new MonitorAttributeGroupDlg();
pDlg->setParent(this); pDlg->setParent(this);
pDlg->createGroupView(iter.value()); pDlg->createGroupView(iter.value());
connect(_pParent->getParent()->getModelController(),&FixedPortsModel::dataUpdated,pDlg,&MonitorAttributeGroupDlg::updateData);
_pBox->addWidget(iter.key(),pDlg); _pBox->addWidget(iter.key(),pDlg);
} }
_curId = uid; _curId = uid;

View File

@ -12,6 +12,7 @@
#include <QBarCategoryAxis> #include <QBarCategoryAxis>
#include <QValueAxis> #include <QValueAxis>
#include <QLineSeries> #include <QLineSeries>
#include <QDateTimeAxis>
#include "global.h" #include "global.h"
MonitorAttributeGroupDlg::MonitorAttributeGroupDlg(QWidget* parent) MonitorAttributeGroupDlg::MonitorAttributeGroupDlg(QWidget* parent)
@ -34,18 +35,18 @@ void MonitorAttributeGroupDlg::initial()
_layout = new QVBoxLayout(this); _layout = new QVBoxLayout(this);
} }
void MonitorAttributeGroupDlg::createGroupView(QList<monitorItemAttributeInfo> lst) void MonitorAttributeGroupDlg::createGroupView(QList<monitorItemAttributeInfo> lst,int nType)
{ {
QWidget* content = new QWidget(); QWidget* content = new QWidget();
QGridLayout* gridLayout = new QGridLayout(content); QGridLayout* gridLayout = new QGridLayout(content);
gridLayout->setHorizontalSpacing(6); gridLayout->setHorizontalSpacing(2);
gridLayout->setVerticalSpacing(10); gridLayout->setVerticalSpacing(10);
gridLayout->setContentsMargins(0, 0, 0, 0); gridLayout->setContentsMargins(0, 0, 0, 0);
// 设置列的最小宽度和拉伸比例 // 设置列的最小宽度和拉伸比例
gridLayout->setColumnMinimumWidth(0, 30); // 标签列最小宽度 gridLayout->setColumnMinimumWidth(0, 30); // 标签列最小宽度
gridLayout->setColumnStretch(0, 1); // 标签列拉伸因子 gridLayout->setColumnStretch(0, 1); // 标签列拉伸因子
gridLayout->setColumnStretch(1, 5); // 控件列拉伸因子 gridLayout->setColumnStretch(1, 8); // 控件列拉伸因子
int row = 0; int row = 0;
for(auto& info : lst) { for(auto& info : lst) {
@ -76,7 +77,7 @@ void MonitorAttributeGroupDlg::createGroupView(QList<monitorItemAttributeInfo> l
setWidgetResizable(true); setWidgetResizable(true);
} }
QWidget* MonitorAttributeGroupDlg::createEditor(monitorItemAttributeInfo info) QWidget* MonitorAttributeGroupDlg::createEditor(monitorItemAttributeInfo info,int nType)
{ {
QWidget* pWidget = nullptr; QWidget* pWidget = nullptr;
if(info.nShowType == 0){ //正常显示 if(info.nShowType == 0){ //正常显示
@ -85,7 +86,12 @@ QWidget* MonitorAttributeGroupDlg::createEditor(monitorItemAttributeInfo info)
} }
else{ //图表 else{ //图表
QChartView* chartView = new QChartView(this); QChartView* chartView = new QChartView(this);
chartView->setMinimumSize(200, 150); QSize size;
if(nType == 0)
size = QSize(400,300);
else
size = QSize(600,400);
chartView->setMinimumSize(size);
chartView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); chartView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
chartView->setRenderHint(QPainter::Antialiasing); chartView->setRenderHint(QPainter::Antialiasing);
@ -139,7 +145,7 @@ QWidget* MonitorAttributeGroupDlg::createEditor(monitorItemAttributeInfo info)
chart->legend()->setAlignment(Qt::AlignBottom); chart->legend()->setAlignment(Qt::AlignBottom);
QFont legendFont = chart->legend()->font(); QFont legendFont = chart->legend()->font();
legendFont.setPointSize(8); // 设置图例字体大小 legendFont.setPointSize(9); // 设置图例字体大小
chart->legend()->setFont(legendFont); chart->legend()->setFont(legendFont);
} }
else if (info.nGraphType == 1) { else if (info.nGraphType == 1) {
@ -165,67 +171,113 @@ QWidget* MonitorAttributeGroupDlg::createEditor(monitorItemAttributeInfo info)
void MonitorAttributeGroupDlg::updateLineChartData(QChartView* chartView, const QVector<QPointF>& data) void MonitorAttributeGroupDlg::updateLineChartData(QChartView* chartView, const QVector<QPointF>& data)
{ {
if (!chartView || !chartView->chart()) return; if (!chartView || data.isEmpty()) return;
QChart* chart = chartView->chart(); QChart* chart = chartView->chart();
if (chart->series().isEmpty()) return; if (!chart) {
chart = new QChart();
chart->setAnimationOptions(QChart::NoAnimation);
chartView->setChart(chart);
}
QLineSeries* series = qobject_cast<QLineSeries*>(chart->series().first()); QLineSeries* series = nullptr;
if (!series) return; if (chart->series().isEmpty()) {
series = new QLineSeries();
chart->addSeries(series);
} else {
series = qobject_cast<QLineSeries*>(chart->series().first());
if (!series) return;
}
// 清空旧数据,添加新数据
series->clear(); series->clear();
series->append(data);
// 更新坐标轴范围 // 计算数据范围
if (!data.isEmpty()) { qint64 minTime = std::numeric_limits<qint64>::max();
QValueAxis* aX = nullptr; qint64 maxTime = std::numeric_limits<qint64>::lowest();
QValueAxis* aY = nullptr; double minVal = std::numeric_limits<double>::max();
double maxVal = std::numeric_limits<double>::lowest();
for (const QPointF& point : data) {
qint64 t = static_cast<qint64>(point.x());
series->append(t, point.y());
minTime = qMin(minTime, t);
maxTime = qMax(maxTime, t);
minVal = qMin(minVal, point.y());
maxVal = qMax(maxVal, point.y());
}
// 方法1通过方向获取 // ========== 简单直接的方法:确保只有一个坐标轴 ==========
QList<QAbstractAxis*> xAxes = chart->axes(Qt::Horizontal); QDateTimeAxis* xAxis = nullptr;
QList<QAbstractAxis*> yAxes = chart->axes(Qt::Vertical); QValueAxis* yAxis = nullptr;
for (QAbstractAxis* axis : xAxes) { // 获取当前所有坐标轴
if (qobject_cast<QValueAxis*>(axis)) { QList<QAbstractAxis*> allAxes = chart->axes();
aX = static_cast<QValueAxis*>(axis);
break; // 如果坐标轴太多,清理所有
} //if (allAxes.size() > 2) { // 应该只有x轴和y轴
for (auto axis : allAxes) {
chart->removeAxis(axis);
delete axis;
} }
allAxes.clear();
//}
for (QAbstractAxis* axis : yAxes) { // 在剩余的坐标轴中查找
if (qobject_cast<QValueAxis*>(axis)) { for (auto axis : allAxes) {
aY = static_cast<QValueAxis*>(axis); if (!xAxis && qobject_cast<QDateTimeAxis*>(axis)) {
break; xAxis = qobject_cast<QDateTimeAxis*>(axis);
} } else if (!yAxis && qobject_cast<QValueAxis*>(axis)) {
} yAxis = qobject_cast<QValueAxis*>(axis);
if (aX && aY) {
double minX = data.first().x();
double maxX = data.last().x();
double minY = std::numeric_limits<double>::max();
double maxY = std::numeric_limits<double>::lowest();
for (const QPointF& point : data) {
minY = qMin(minY, point.y());
maxY = qMax(maxY, point.y());
}
double margin = (maxY - minY) * 0.1;
aX->setRange(minX, maxX);
aY->setRange(minY - margin, maxY + margin);
} }
} }
// 创建缺失的坐标轴
if (!xAxis) {
xAxis = new QDateTimeAxis();
xAxis->setTitleText("时间");
chart->addAxis(xAxis, Qt::AlignBottom);
}
if (!yAxis) {
yAxis = new QValueAxis();
yAxis->setTitleText("");
chart->addAxis(yAxis, Qt::AlignLeft);
}
// 确保系列附加
series->attachAxis(xAxis);
series->attachAxis(yAxis);
// 设置范围和其他属性
qint64 timeMargin = qMax<qint64>((maxTime - minTime) * 0.05, 1000);
double valMargin = qMax((maxVal - minVal) * 0.1, 0.1);
xAxis->setRange(
QDateTime::fromMSecsSinceEpoch(minTime - timeMargin),
QDateTime::fromMSecsSinceEpoch(maxTime + timeMargin)
);
yAxis->setRange(minVal - valMargin, maxVal + valMargin);
qint64 timeSpan = maxTime - minTime;
xAxis->setFormat((timeSpan > 3600000) ? "HH:mm:ss" : "HH:mm:ss.zzz");
xAxis->setTickCount(6);
yAxis->setTickCount(8);
yAxis->setLabelFormat("%.2f");
QFont font;
font.setPointSize(9);
xAxis->setLabelsFont(font);
yAxis->setLabelsFont(font);
} }
void MonitorAttributeGroupDlg::updateData() void MonitorAttributeGroupDlg::updateData()
{ {
if(_pParent){ if(_pParent || _pDetailParent){
auto pModel = getModelController(); auto pModel = getModelController();
auto pMap = pModel->getMonitorPara(); auto pMap = pModel->getMonitorPara();
QUuid uid = getCurUid(); QUuid uid = getCurUid();
if(pMap.contains(uid)){ if(!pMap.isEmpty() && pMap.contains(uid)){
auto info = pMap.value(uid); auto info = pMap.value(uid);
for(auto &widget:_curWidget){ for(auto &widget:_curWidget){
@ -237,12 +289,25 @@ void MonitorAttributeGroupDlg::updateData()
if(data.sConnectPara == sPara){ if(data.sConnectPara == sPara){
if(nCate == 0){ if(nCate == 0){
QLabel* pLabel = dynamic_cast<QLabel*>(widget); QLabel* pLabel = dynamic_cast<QLabel*>(widget);
pLabel->setText(data.sValue); pLabel->setText(QString::number(data.mapValue.last()));
} }
else{ else{
if(nGraph == 0){ // if(nGraph == 0){ //折线图
// 转换为 QVector<QPointF>
QVector<QPointF> points;
points.reserve(data.mapValue.size()); // 预分配内存以提高性能
// 遍历 QMap
for (auto it = data.mapValue.constBegin(); it != data.mapValue.constEnd(); ++it) {
// 将 quint64 时间戳转换为 qrealQPointF 使用 qreal
qint64 timestampMs = it.key() / 1000000; // 纳秒转毫秒
points.append(QPointF(static_cast<qreal>(timestampMs), it.value()));
}
QChartView* pView = dynamic_cast<QChartView*>(widget); QChartView* pView = dynamic_cast<QChartView*>(widget);
//updateLineChartData(pView,); updateLineChartData(pView,points);
}
else if(nGraph == 1){
} }
} }
} }

View File

@ -2,6 +2,7 @@
#include "ui_monitorDetailAttributeDlg.h" #include "ui_monitorDetailAttributeDlg.h"
#include "monitorAttributeGroupDlg.h" #include "monitorAttributeGroupDlg.h"
#include "monitorPanel.h" #include "monitorPanel.h"
#include "graphicsDataModel/fixedPortsModel.h"
#include "global.h" #include "global.h"
MonitorDetailAttributeDlg::MonitorDetailAttributeDlg(QWidget *parent) MonitorDetailAttributeDlg::MonitorDetailAttributeDlg(QWidget *parent)
@ -57,6 +58,7 @@ void MonitorDetailAttributeDlg::generateAttributeGroups(QUuid uid)
pDlg->setDetailParent(this); pDlg->setDetailParent(this);
pDlg->setCurMode(1); pDlg->setCurMode(1);
pDlg->createGroupView(iter.value()); pDlg->createGroupView(iter.value());
connect(_pParent->getModelController(),&FixedPortsModel::dataUpdated,pDlg,&MonitorAttributeGroupDlg::updateData);
_curGroups.insert(iter.key(),pDlg); _curGroups.insert(iter.key(),pDlg);
} }
} }

View File

@ -407,12 +407,16 @@ void MonitorPanel::detailItemSelected(QUuid uid)
void MonitorPanel::onRunClicked() void MonitorPanel::onRunClicked()
{ {
if(_pModel){
_pModel->startAcceptData();
}
} }
void MonitorPanel::onStopClicked() void MonitorPanel::onStopClicked()
{ {
if(_pModel){
_pModel->stopAcceptData(_name);
}
} }
void MonitorPanel::onSaveClicked() void MonitorPanel::onSaveClicked()

View File

@ -321,11 +321,33 @@ border-radius:5px;</string>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
<fontweight>Medium</fontweight>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property> </property>
<property name="text"> <property name="text">
<string>设备库</string> <string>设备库</string>
@ -342,11 +364,33 @@ border-radius:5px;</string>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
<fontweight>Medium</fontweight>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property> </property>
<property name="text"> <property name="text">
<string>图标库</string> <string>图标库</string>

View File

@ -65,6 +65,30 @@
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>+</string> <string>+</string>
</property> </property>

View File

@ -172,6 +172,53 @@
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="styleSheet">
<string notr="true">/* 标签页容器 */
QTabWidget::pane {
border: 1px solid #e2e8f0;
border-radius: 4px;
background-color: white;
margin-top: 4px;
}
/* 标签栏 */
QTabWidget::tab-bar {
alignment: left;
padding: 1px 1px 0 1px;
}
/* 单个标签 */
QTabBar::tab {
background-color: #f8fafc;
color: #94a3b8;
border: 1px solid #e2e8f0;
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
padding: 6px 16px;
margin-right: 2px;
font-size: 11px;
font-weight: 500;
}
/* 标签悬停 */
QTabBar::tab:hover {
background-color: #f1f5f9;
color: #64748b;
border-color: #cbd5e1;
}
/* 标签选中 */
QTabBar::tab:selected {
background-color: white;
color: #1e293b;
border-color: #e2e8f0;
border-bottom-color: white;
font-weight: 500;
margin-bottom: -1px;
padding-top: 7px;
}</string>
</property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>

View File

@ -49,7 +49,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(209, 209, 209);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing"> <property name="spacing">
@ -65,11 +75,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>间隔管理</string> <string>间隔管理</string>
@ -146,6 +156,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -153,6 +193,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -48,7 +48,17 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(193, 193, 193);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin"> <property name="topMargin">
@ -62,13 +72,13 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Microsoft YaHei UI</family> <family>Microsoft YaHei UI</family>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
<italic>false</italic> <italic>false</italic>
<bold>false</bold> <bold>false</bold>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>保存拓扑</string> <string>保存拓扑</string>
@ -188,6 +198,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -195,6 +235,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -327,6 +327,30 @@
<height>23</height> <height>23</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>+</string> <string>+</string>
</property> </property>

View File

@ -43,7 +43,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(196, 196, 196);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin"> <property name="topMargin">
@ -55,8 +65,7 @@
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0); <string notr="true"/>
font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</property> </property>
<property name="text"> <property name="text">
<string>网络通信设置</string> <string>网络通信设置</string>
@ -81,6 +90,53 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="styleSheet">
<string notr="true">/* 标签页容器 */
QTabWidget::pane {
border: 1px solid #e2e8f0;
border-radius: 4px;
background-color: white;
margin-top: 4px;
}
/* 标签栏 */
QTabWidget::tab-bar {
alignment: left;
padding: 1px 1px 0 1px;
}
/* 单个标签 */
QTabBar::tab {
background-color: #f8fafc;
color: #94a3b8;
border: 1px solid #e2e8f0;
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
padding: 6px 16px;
margin-right: 2px;
font-size: 11px;
font-weight: 500;
}
/* 标签悬停 */
QTabBar::tab:hover {
background-color: #f1f5f9;
color: #64748b;
border-color: #cbd5e1;
}
/* 标签选中 */
QTabBar::tab:selected {
background-color: white;
color: #1e293b;
border-color: #e2e8f0;
border-bottom-color: white;
font-weight: 500;
margin-bottom: -1px;
padding-top: 7px;
}</string>
</property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
@ -182,6 +238,30 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QPushButton" name="btn_testRecommand"> <widget class="QPushButton" name="btn_testRecommand">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>测试节点推荐</string> <string>测试节点推荐</string>
</property> </property>
@ -229,6 +309,30 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QPushButton" name="btn_testData"> <widget class="QPushButton" name="btn_testData">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>测试数据服务</string> <string>测试数据服务</string>
</property> </property>
@ -385,6 +489,30 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<widget class="QPushButton" name="btn_testWebsoc"> <widget class="QPushButton" name="btn_testWebsoc">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>测试连接</string> <string>测试连接</string>
</property> </property>
@ -466,6 +594,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>保存</string> <string>保存</string>
</property> </property>
@ -473,6 +631,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -46,7 +46,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(210, 210, 210);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin"> <property name="leftMargin">
@ -65,11 +75,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>新增线路</string> <string>新增线路</string>
@ -246,6 +256,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_save"> <widget class="QPushButton" name="btn_save">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>保存</string> <string>保存</string>
</property> </property>
@ -306,6 +346,30 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QPushButton" name="btn_add"> <widget class="QPushButton" name="btn_add">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>添加到线路</string> <string>添加到线路</string>
</property> </property>
@ -369,6 +433,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -376,6 +470,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -40,7 +40,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(217, 217, 217);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin"> <property name="leftMargin">
@ -59,11 +69,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>间隔详细设置</string> <string>间隔详细设置</string>
@ -126,6 +136,30 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_add"> <widget class="QPushButton" name="btn_add">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>新增线路</string> <string>新增线路</string>
</property> </property>
@ -133,6 +167,30 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_preview"> <widget class="QPushButton" name="btn_preview">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>预览间隔</string> <string>预览间隔</string>
</property> </property>
@ -180,6 +238,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_load"> <widget class="QPushButton" name="btn_load">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>载入</string> <string>载入</string>
</property> </property>
@ -187,6 +275,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_save"> <widget class="QPushButton" name="btn_save">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>保存</string> <string>保存</string>
</property> </property>
@ -207,6 +325,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -214,6 +362,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -43,7 +43,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(196, 196, 196);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin"> <property name="topMargin">
@ -59,11 +69,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>设置间隔</string> <string>设置间隔</string>
@ -206,6 +216,30 @@
</property> </property>
<item> <item>
<widget class="QPushButton" name="btn_add"> <widget class="QPushButton" name="btn_add">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>添加</string> <string>添加</string>
</property> </property>
@ -213,6 +247,30 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_delete"> <widget class="QPushButton" name="btn_delete">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>删除</string> <string>删除</string>
</property> </property>
@ -272,6 +330,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -279,6 +367,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -46,7 +46,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(210, 210, 210);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin"> <property name="leftMargin">
@ -65,11 +75,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>新增线路</string> <string>新增线路</string>
@ -246,6 +256,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_save"> <widget class="QPushButton" name="btn_save">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>保存</string> <string>保存</string>
</property> </property>
@ -306,6 +346,30 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QPushButton" name="btn_add"> <widget class="QPushButton" name="btn_add">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>添加到线路</string> <string>添加到线路</string>
</property> </property>
@ -369,6 +433,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -376,6 +470,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -40,7 +40,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(217, 217, 217);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin"> <property name="leftMargin">
@ -59,11 +69,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>变压器详细设置</string> <string>变压器详细设置</string>
@ -139,6 +149,30 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_add"> <widget class="QPushButton" name="btn_add">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>新增回路</string> <string>新增回路</string>
</property> </property>
@ -146,6 +180,30 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_previewEquips"> <widget class="QPushButton" name="btn_previewEquips">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>预览成套装置</string> <string>预览成套装置</string>
</property> </property>
@ -153,6 +211,30 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_previewTrans"> <widget class="QPushButton" name="btn_previewTrans">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>预览变压器</string> <string>预览变压器</string>
</property> </property>
@ -162,6 +244,53 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="styleSheet">
<string notr="true">/* 标签页容器 */
QTabWidget::pane {
border: 1px solid #e2e8f0;
border-radius: 4px;
background-color: white;
margin-top: 4px;
}
/* 标签栏 */
QTabWidget::tab-bar {
alignment: left;
padding: 1px 1px 0 1px;
}
/* 单个标签 */
QTabBar::tab {
background-color: #f8fafc;
color: #94a3b8;
border: 1px solid #e2e8f0;
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
padding: 6px 16px;
margin-right: 2px;
font-size: 11px;
font-weight: 500;
}
/* 标签悬停 */
QTabBar::tab:hover {
background-color: #f1f5f9;
color: #64748b;
border-color: #cbd5e1;
}
/* 标签选中 */
QTabBar::tab:selected {
background-color: white;
color: #1e293b;
border-color: #e2e8f0;
border-bottom-color: white;
font-weight: 500;
margin-bottom: -1px;
padding-top: 7px;
}</string>
</property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
@ -227,6 +356,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_save"> <widget class="QPushButton" name="btn_save">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>保存</string> <string>保存</string>
</property> </property>
@ -234,6 +393,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_load"> <widget class="QPushButton" name="btn_load">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>载入</string> <string>载入</string>
</property> </property>
@ -254,6 +443,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -261,6 +480,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -43,7 +43,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(196, 196, 196);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin"> <property name="topMargin">
@ -59,11 +69,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>设置变压器</string> <string>设置变压器</string>
@ -153,6 +163,30 @@
</property> </property>
<item> <item>
<widget class="QPushButton" name="btn_add"> <widget class="QPushButton" name="btn_add">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>添加</string> <string>添加</string>
</property> </property>
@ -160,6 +194,30 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_delete"> <widget class="QPushButton" name="btn_delete">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>删除</string> <string>删除</string>
</property> </property>
@ -286,6 +344,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -293,6 +381,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -49,6 +49,36 @@
</property> </property>
<item> <item>
<widget class="QPushButton" name="btn_next"> <widget class="QPushButton" name="btn_next">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>下一步</string> <string>下一步</string>
</property> </property>
@ -75,6 +105,36 @@
</property> </property>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>完成</string> <string>完成</string>
</property> </property>
@ -86,6 +146,52 @@
</item> </item>
<item row="0" column="0" colspan="4"> <item row="0" column="0" colspan="4">
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="styleSheet">
<string notr="true">QTabWidget::pane {
border: 1px solid #e2e8f0;
border-radius: 4px;
background-color: white;
margin-top: 4px;
}
/* 标签栏 */
QTabWidget::tab-bar {
alignment: left;
padding: 1px 1px 0 1px;
}
/* 单个标签 */
QTabBar::tab {
background-color: #f8fafc;
color: #94a3b8;
border: 1px solid #e2e8f0;
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
padding: 6px 16px;
margin-right: 2px;
font-size: 11px;
font-weight: 500;
}
/* 标签悬停 */
QTabBar::tab:hover {
background-color: #f1f5f9;
color: #64748b;
border-color: #cbd5e1;
}
/* 标签选中 */
QTabBar::tab:selected {
background-color: white;
color: #1e293b;
border-color: #e2e8f0;
border-bottom-color: white;
font-weight: 500;
margin-bottom: -1px;
padding-top: 7px;
}</string>
</property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
@ -124,6 +230,36 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="btn_addBus"> <widget class="QPushButton" name="btn_addBus">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>添加</string> <string>添加</string>
</property> </property>
@ -221,11 +357,42 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_addBay"> <widget class="QPushButton" name="btn_addBay">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
<fontweight>Medium</fontweight>
</font> </font>
</property> </property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>添加</string> <string>添加</string>
</property> </property>
@ -274,6 +441,36 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="btn_addTrans"> <widget class="QPushButton" name="btn_addTrans">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>添加</string> <string>添加</string>
</property> </property>
@ -288,6 +485,36 @@
</item> </item>
<item row="1" column="3"> <item row="1" column="3">
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>
@ -355,6 +582,36 @@
</property> </property>
<item> <item>
<widget class="QPushButton" name="btn_last"> <widget class="QPushButton" name="btn_last">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>上一步</string> <string>上一步</string>
</property> </property>

View File

@ -44,7 +44,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(183, 183, 183);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -63,14 +73,14 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(219, 219, 219);</string> <string notr="true"/>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QWidget" name="widget_content" native="true"> <widget class="QWidget" name="widget_content" native="true">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(219, 219, 219);</string> <string notr="true"/>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
@ -88,7 +98,7 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(219, 219, 219);</string> <string notr="true"/>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing"> <property name="spacing">
@ -105,7 +115,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>30</height> <height>20</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
@ -116,11 +126,33 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>11</pointsize> <pointsize>-1</pointsize>
<fontweight>Medium</fontweight>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(6, 6, 6);</string> <string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property> </property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
@ -132,7 +164,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>30</height> <height>20</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
@ -143,11 +175,33 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>11</pointsize> <pointsize>-1</pointsize>
<fontweight>Medium</fontweight>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(6, 6, 6);</string> <string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property> </property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>

View File

@ -43,7 +43,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(192, 192, 192);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin"> <property name="topMargin">
@ -55,8 +65,7 @@
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(4, 4, 4); <string notr="true"/>
font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</property> </property>
<property name="text"> <property name="text">
<string>载入运行时</string> <string>载入运行时</string>
@ -86,6 +95,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -93,6 +132,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -49,7 +49,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(206, 206, 206);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin"> <property name="topMargin">
@ -62,11 +72,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>量测设置</string> <string>量测设置</string>
@ -91,10 +101,104 @@
</item> </item>
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="styleSheet">
<string notr="true">/* 标签页容器 */
QTabWidget::pane {
border: 1px solid #e2e8f0;
border-radius: 4px;
background-color: white;
margin-top: 4px;
}
/* 标签栏 */
QTabWidget::tab-bar {
alignment: left;
padding: 1px 1px 0 1px;
}
/* 单个标签 */
QTabBar::tab {
background-color: #f8fafc;
color: #94a3b8;
border: 1px solid #e2e8f0;
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
padding: 6px 16px;
margin-right: 2px;
font-size: 11px;
font-weight: 500;
}
/* 标签悬停 */
QTabBar::tab:hover {
background-color: #f1f5f9;
color: #64748b;
border-color: #cbd5e1;
}
/* 标签选中 */
QTabBar::tab:selected {
background-color: white;
color: #1e293b;
border-color: #e2e8f0;
border-bottom-color: white;
font-weight: 500;
margin-bottom: -1px;
padding-top: 7px;
}</string>
</property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab">
<property name="styleSheet">
<string notr="true">/* 标签页容器 */
QTabWidget::pane {
border: 1px solid #e2e8f0;
border-radius: 4px;
background-color: white;
margin-top: 4px;
}
/* 标签栏 */
QTabWidget::tab-bar {
alignment: left;
padding: 1px 1px 0 1px;
}
/* 单个标签 */
QTabBar::tab {
background-color: #f8fafc;
color: #94a3b8;
border: 1px solid #e2e8f0;
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
padding: 6px 16px;
margin-right: 2px;
font-size: 11px;
font-weight: 500;
}
/* 标签悬停 */
QTabBar::tab:hover {
background-color: #f1f5f9;
color: #64748b;
border-color: #cbd5e1;
}
/* 标签选中 */
QTabBar::tab:selected {
background-color: white;
color: #1e293b;
border-color: #e2e8f0;
border-bottom-color: white;
font-weight: 500;
margin-bottom: -1px;
padding-top: 7px;
}</string>
</property>
<attribute name="title"> <attribute name="title">
<string>基本参数</string> <string>基本参数</string>
</attribute> </attribute>
@ -892,6 +996,30 @@
<height>22</height> <height>22</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>-</string> <string>-</string>
</property> </property>
@ -915,6 +1043,30 @@
<height>22</height> <height>22</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>+</string> <string>+</string>
</property> </property>
@ -1198,12 +1350,42 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>80</width> <width>80</width>
<height>22</height> <height>22</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>完成</string> <string>完成</string>
</property> </property>
@ -1211,6 +1393,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -49,7 +49,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(192, 192, 192);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing"> <property name="spacing">
@ -70,8 +80,7 @@
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0); <string notr="true"/>
font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</property> </property>
<property name="text"> <property name="text">
<string>参数配置</string> <string>参数配置</string>
@ -96,6 +105,53 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="styleSheet">
<string notr="true">/* 标签页容器 */
QTabWidget::pane {
border: 1px solid #e2e8f0;
border-radius: 4px;
background-color: white;
margin-top: 4px;
}
/* 标签栏 */
QTabWidget::tab-bar {
alignment: left;
padding: 1px 1px 0 1px;
}
/* 单个标签 */
QTabBar::tab {
background-color: #f8fafc;
color: #94a3b8;
border: 1px solid #e2e8f0;
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
padding: 6px 16px;
margin-right: 2px;
font-size: 11px;
font-weight: 500;
}
/* 标签悬停 */
QTabBar::tab:hover {
background-color: #f1f5f9;
color: #64748b;
border-color: #cbd5e1;
}
/* 标签选中 */
QTabBar::tab:selected {
background-color: white;
color: #1e293b;
border-color: #e2e8f0;
border-bottom-color: white;
font-weight: 500;
margin-bottom: -1px;
padding-top: 7px;
}</string>
</property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
@ -382,6 +438,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -389,6 +475,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -43,7 +43,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(191, 191, 191);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing"> <property name="spacing">
@ -58,8 +68,7 @@
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0); <string notr="true"/>
font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</property> </property>
<property name="text"> <property name="text">
<string>属性详细信息</string> <string>属性详细信息</string>
@ -141,6 +150,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_exit"> <widget class="QPushButton" name="btn_exit">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>退出详情</string> <string>退出详情</string>
</property> </property>

View File

@ -49,7 +49,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(192, 192, 192);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing"> <property name="spacing">
@ -70,8 +80,7 @@
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0); <string notr="true"/>
font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</property> </property>
<property name="text"> <property name="text">
<string>图元状态配置</string> <string>图元状态配置</string>
@ -262,6 +271,30 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QPushButton" name="btn_selectIcon"> <widget class="QPushButton" name="btn_selectIcon">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>选择图标</string> <string>选择图标</string>
</property> </property>
@ -313,6 +346,30 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QPushButton" name="btn_selectColor"> <widget class="QPushButton" name="btn_selectColor">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>选择颜色</string> <string>选择颜色</string>
</property> </property>
@ -368,6 +425,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_save"> <widget class="QPushButton" name="btn_save">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>保存</string> <string>保存</string>
</property> </property>
@ -388,6 +475,36 @@ font: 12pt &quot;Microsoft YaHei UI&quot;;</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -49,7 +49,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(200, 200, 200);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin"> <property name="topMargin">
@ -62,11 +72,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>输入组态图名称</string> <string>输入组态图名称</string>
@ -198,6 +208,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -205,6 +245,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -49,7 +49,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(180, 180, 180);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing"> <property name="spacing">
@ -65,11 +75,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>工程模图标设置</string> <string>工程模图标设置</string>
@ -112,6 +122,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>

View File

@ -49,7 +49,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(177, 177, 177);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing"> <property name="spacing">
@ -71,11 +81,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>工程模配置</string> <string>工程模配置</string>
@ -87,6 +97,53 @@
</item> </item>
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="styleSheet">
<string notr="true">/* 标签页容器 */
QTabWidget::pane {
border: 1px solid #e2e8f0;
border-radius: 4px;
background-color: white;
margin-top: 4px;
}
/* 标签栏 */
QTabWidget::tab-bar {
alignment: left;
padding: 1px 1px 0 1px;
}
/* 单个标签 */
QTabBar::tab {
background-color: #f8fafc;
color: #94a3b8;
border: 1px solid #e2e8f0;
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
padding: 6px 16px;
margin-right: 2px;
font-size: 11px;
font-weight: 500;
}
/* 标签悬停 */
QTabBar::tab:hover {
background-color: #f1f5f9;
color: #64748b;
border-color: #cbd5e1;
}
/* 标签选中 */
QTabBar::tab:selected {
background-color: white;
color: #1e293b;
border-color: #e2e8f0;
border-bottom-color: white;
font-weight: 500;
margin-bottom: -1px;
padding-top: 7px;
}</string>
</property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
@ -205,6 +262,36 @@ color: rgb(8, 8, 8);</string>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QPushButton" name="btn_apply"> <widget class="QPushButton" name="btn_apply">
<property name="minimumSize">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>&gt;&gt;</string> <string>&gt;&gt;</string>
</property> </property>
@ -212,6 +299,36 @@ color: rgb(8, 8, 8);</string>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QPushButton" name="btn_revoke"> <widget class="QPushButton" name="btn_revoke">
<property name="minimumSize">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>&lt;&lt;</string> <string>&lt;&lt;</string>
</property> </property>
@ -310,6 +427,36 @@ color: rgb(8, 8, 8);</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_select"> <widget class="QPushButton" name="btn_select">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>选择</string> <string>选择</string>
</property> </property>
@ -389,6 +536,36 @@ color: rgb(8, 8, 8);</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -396,6 +573,36 @@ color: rgb(8, 8, 8);</string>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -325,6 +325,30 @@
<height>23</height> <height>23</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>+</string> <string>+</string>
</property> </property>

View File

@ -15,7 +15,7 @@ public:
struct ChannelConfig { struct ChannelConfig {
QString channelId; QString channelId;
QUrl endpoint; QUrl endpoint;
int timeout = 30000; // 超时时间(ms) int timeout = 10000; // 超时时间(ms)
int reconnectInterval = 5000; // 重连间隔(ms) int reconnectInterval = 5000; // 重连间隔(ms)
int maxRetries = 3; // 最大重试次数 int maxRetries = 3; // 最大重试次数
QVariantMap params; // 自定义参数 QVariantMap params; // 自定义参数

View File

@ -17,7 +17,7 @@ public:
// 处理数据 // 处理数据
void processData(const QVariant& data,int conType = 0); void processData(const QVariant& data,int conType = 0);
void processNullData(const QVariant& data);
// 获取处理后的数据 // 获取处理后的数据
QVariant getProcessedData(const QString& key) const; QVariant getProcessedData(const QString& key) const;

View File

@ -83,7 +83,7 @@ public:
for (const auto& item : tempList) { //如果订阅不成功,从候选列表中移除 todo:记录错误target for (const auto& item : tempList) { //如果订阅不成功,从候选列表中移除 todo:记录错误target
auto it = targetMap.find(item.first); auto it = targetMap.find(item.first);
if (it != targetMap.end()) { if (it != targetMap.end()) {
if (it.value() == "1001") { if (it.value() != "1001") {
continue; // 跳过 continue; // 跳过
} }
} }

View File

@ -14,6 +14,7 @@ public:
}; };
WebSocketChannel(const ChannelConfig& config, QString sessionId,QObject* parent = nullptr); WebSocketChannel(const ChannelConfig& config, QString sessionId,QObject* parent = nullptr);
~WebSocketChannel();
bool connect() override; bool connect() override;
bool disconnect() override; bool disconnect() override;

View File

@ -177,7 +177,7 @@ ChannelConfig ConfigManager::getDefaultWebSocketConfig() const
config.id = "websocket_channel"; config.id = "websocket_channel";
config.name = "实时数据推送"; config.name = "实时数据推送";
config.endpoint = "ws://192.168.1.101:8888/ws"; config.endpoint = "ws://192.168.46.100:10080/monitors/data/realtime/stream/";
config.timeout = 10000; config.timeout = 10000;
config.enabled = true; config.enabled = true;
config.autoConnect = false; config.autoConnect = false;

View File

@ -38,6 +38,11 @@ void DataProcessor::processData(const QVariant& data,int conType)
} }
} }
void DataProcessor::processNullData(const QVariant& data)
{
emit httpProcessed("subscriptionTest",data);
}
void DataProcessor::processJson( const QVariant& data,int conType) void DataProcessor::processJson( const QVariant& data,int conType)
{ {
QJsonObject dataObj = data.toJsonObject(); QJsonObject dataObj = data.toJsonObject();

View File

@ -107,9 +107,15 @@ bool HttpChannel::post(const QByteArray& data, const QString& path)
return false; return false;
} }
QUrl url = m_config.endpoint; QUrl url;
if (!path.isEmpty()) { if(path.contains("http")){ //url全部输入
url.setPath(url.path() + path); url = QUrl(path);
}
else{ //url部分输入
url = m_config.endpoint;
if (!path.isEmpty()) {
url.setPath(url.path() + path);
}
} }
QNetworkAccessManager* manager = new QNetworkAccessManager(this); QNetworkAccessManager* manager = new QNetworkAccessManager(this);

View File

@ -61,9 +61,9 @@ void UiCommunicationBus::sendHttpRequest(const QString& endpoint, const QVariant
bool success = comm->sendHttpRequest(endpoint, doc.toJson(),method,query); bool success = comm->sendHttpRequest(endpoint, doc.toJson(),method,query);
if (success) { if (success) {
qDebug() << "HTTP请求已发送:" << endpoint; qDebug() << "HTTP request send success:" << endpoint;
} else { } else {
qWarning() << "HTTP请求发送失败:" << endpoint; qWarning() << "HTTP request send fail:" << endpoint;
} }
} }
@ -99,6 +99,9 @@ void UiCommunicationBus::onHttpDataReceived(const QByteArray& data)
processor->processData(responseMap.value("payload")); processor->processData(responseMap.value("payload"));
} }
} }
else{
processor->processNullData(QVariant());
}
} }
qDebug() << "HTTP "; qDebug() << "HTTP ";

View File

@ -17,6 +17,19 @@ WebSocketChannel::WebSocketChannel(const ChannelConfig& config, QString sessionI
m_sessionId = sessionId; m_sessionId = sessionId;
} }
WebSocketChannel::~WebSocketChannel()
{
if(m_webSocket){
m_webSocket->disconnect();
if (m_webSocket->state() == QAbstractSocket::ConnectedState) {
m_webSocket->close();
}
m_webSocket->deleteLater();
m_webSocket = nullptr;
}
}
bool WebSocketChannel::connect() bool WebSocketChannel::connect()
{ {
if (m_webSocket->state() == QAbstractSocket::ConnectedState) { if (m_webSocket->state() == QAbstractSocket::ConnectedState) {
@ -30,22 +43,21 @@ bool WebSocketChannel::connect()
// 1. 从 WebSocket URL 提取 host 和 port // 1. 从 WebSocket URL 提取 host 和 port
QUrl url(m_config.endpoint); QUrl url(m_config.endpoint);
QString host = url.host(); //QString host = url.host();
int port = url.port(80); // 默认端口 80 //int port = url.port(10080); // 默认端口 80
// 2. 构建 Origin URL // 2. 构建 Origin URL
QString origin = QString("http://%1:%2").arg(host).arg(port); //QString origin = QString("http://%1:%2").arg(host).arg(port);
// 3. 创建 QNetworkRequest 并设置 Origin // 3. 创建 QNetworkRequest 并设置 Origin
QNetworkRequest request(url); QNetworkRequest request(url);
request.setRawHeader("Origin", origin.toUtf8()); //request.setRawHeader("Origin", origin.toUtf8());
// 4. 使用 QWebSocket 连接 // 4. 使用 QWebSocket 连接
QWebSocket *socket = new QWebSocket(); m_webSocket->open(request);
socket->open(request);
qDebug() << "WebSocket URL:" << m_config.endpoint; qDebug() << "WebSocket URL:" << m_config.endpoint;
qDebug() << "Origin:" << origin; //qDebug() << "Origin:" << origin;
return true; return true;
} }

View File

@ -572,7 +572,7 @@ QString DataBase::getStationNameById(int id)
QList<gridInfo> DataBase::getAllGrid() QList<gridInfo> DataBase::getAllGrid()
{ {
QList<gridInfo> lst; QList<gridInfo> lst;
QString strSQL = "SELECT id, name, description FROM grid"; QString strSQL = "SELECT id, tagname, name, description FROM grid";
try try
{ {
@ -581,8 +581,9 @@ QList<gridInfo> DataBase::getAllGrid()
{ {
gridInfo info; gridInfo info;
info.id = query.value(0).toInt(); info.id = query.value(0).toInt();
info.name = query.value(1).toString(); info.tagname = query.value(1).toString();
info.description = query.value(2).toString(); info.name = query.value(2).toString();
info.description = query.value(3).toString();
lst.append(info); lst.append(info);
} }
query.clear(); query.clear();
@ -597,7 +598,7 @@ QList<gridInfo> DataBase::getAllGrid()
QList<zoneInfo> DataBase::getAllZone() QList<zoneInfo> DataBase::getAllZone()
{ {
QList<zoneInfo> lst; QList<zoneInfo> lst;
QString strSQL = "SELECT id,grid_id,name,description FROM zone"; QString strSQL = "SELECT id,grid_id,tagname,name,description FROM zone";
try try
{ {
@ -607,8 +608,9 @@ QList<zoneInfo> DataBase::getAllZone()
zoneInfo info; zoneInfo info;
info.id = query.value(0).toInt(); info.id = query.value(0).toInt();
info.grid_id = query.value(1).toInt(); info.grid_id = query.value(1).toInt();
info.name = query.value(2).toString(); info.tagname = query.value(2).toString();
info.description = query.value(3).toString(); info.name = query.value(3).toString();
info.description = query.value(4).toString();
lst.append(info); lst.append(info);
} }
query.clear(); query.clear();
@ -623,7 +625,7 @@ QList<zoneInfo> DataBase::getAllZone()
QList<stationInfo> DataBase::getAllStation() QList<stationInfo> DataBase::getAllStation()
{ {
QList<stationInfo> lst; QList<stationInfo> lst;
QString strSQL = "SELECT id,zone_id,name,description,is_local FROM station"; QString strSQL = "SELECT id,zone_id,tagname,name,description,is_local FROM station";
try try
{ {
@ -633,9 +635,10 @@ QList<stationInfo> DataBase::getAllStation()
stationInfo info; stationInfo info;
info.id = query.value(0).toInt(); info.id = query.value(0).toInt();
info.zone_id = query.value(1).toInt(); info.zone_id = query.value(1).toInt();
info.name = query.value(2).toString(); info.tagname = query.value(2).toString();
info.description = query.value(3).toString(); info.name = query.value(3).toString();
info.is_local = query.value(4).toBool(); info.description = query.value(4).toString();
info.is_local = query.value(5).toBool();
lst.append(info); lst.append(info);
} }
query.clear(); query.clear();

13
include/baseDockWidget.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef BASEDOCKWIDGET_H
#define BASEDOCKWIDGET_H
#include <QDockWidget>
class BaseDockWidget : public QDockWidget
{
Q_OBJECT
public:
explicit BaseDockWidget(const QString &title, QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
~BaseDockWidget();
};
#endif // BASEDOCKWIDGET_H

72
source/baseDockWidget.cpp Normal file
View File

@ -0,0 +1,72 @@
#include "baseDockWidget.h"
BaseDockWidget::BaseDockWidget(const QString &title, QWidget *parent, Qt::WindowFlags flags)
: QDockWidget(title,parent,flags)
{
setStyleSheet(R"(
QDockWidget {
border: 2px solid #e2e8f0;
border-radius: 6px;
background-color: white;
}
QDockWidget::title {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #f8fafc,
stop:1 #f1f5f9);
color: #334155;
padding: 10px 15px;
font-size: 13px;
font-weight: 600;
border-bottom: 2px solid #e2e8f0;
border-radius: 4px 4px 0 0;
}
/* 悬停时的标题栏 */
QDockWidget:hover::title {
background: #f8fafc;
color: #1e40af;
}
/* 按钮样式 */
QDockWidget::close-button,
QDockWidget::float-button {
border: 1px solid #cbd5e1;
background: white;
border-radius: 4px;
width: 20px;
height: 20px;
}
QDockWidget::close-button:hover,
QDockWidget::float-button:hover {
background: #f1f5f9;
border-color: #94a3b8;
}
QDockWidget::close-button:pressed,
QDockWidget::float-button:pressed {
background: #e2e8f0;
}
/* 按钮位置 */
QDockWidget::close-button {
subcontrol-position: top right;
subcontrol-origin: margin;
right: 10px;
top: 10px;
}
QDockWidget::float-button {
subcontrol-position: top right;
subcontrol-origin: margin;
right: 35px;
top: 10px;
}
)");
}
BaseDockWidget::~BaseDockWidget()
{
}

View File

@ -27,9 +27,7 @@
#include "projectManager.h" #include "projectManager.h"
#include "monitorItemsDlg.h" #include "monitorItemsDlg.h"
#include "monitorPagesDlg.h" #include "monitorPagesDlg.h"
#include "baseDockWidget.h"
//using namespace ads;
CMainWindow::CMainWindow(QWidget *parent) CMainWindow::CMainWindow(QWidget *parent)
: QMainWindow(parent) : QMainWindow(parent)
@ -92,7 +90,7 @@ void CMainWindow::initializeDockUi()
m_pTopologyView = new TopologyView(this); m_pTopologyView = new TopologyView(this);
m_pTopologyView->initial(); m_pTopologyView->initial();
QDockWidget* topologyDock = new QDockWidget(QString::fromWCharArray(L"拓扑关系"),this); BaseDockWidget* topologyDock = new BaseDockWidget(QString::fromWCharArray(L"拓扑关系"),this);
topologyDock->setWidget(m_pTopologyView); topologyDock->setWidget(m_pTopologyView);
//topologyDock->setMinimumSize(120,550); //topologyDock->setMinimumSize(120,550);
topologyDock->setAllowedAreas(Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea); topologyDock->setAllowedAreas(Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea);
@ -100,19 +98,19 @@ void CMainWindow::initializeDockUi()
m_pDiagramView = new DiagramView(this); m_pDiagramView = new DiagramView(this);
m_pDiagramView->initial(); m_pDiagramView->initial();
QDockWidget* diagramDock = new QDockWidget(QString::fromWCharArray(L"组态图列表"),this); BaseDockWidget* diagramDock = new BaseDockWidget(QString::fromWCharArray(L"组态图列表"),this);
diagramDock->setWidget(m_pDiagramView); diagramDock->setWidget(m_pDiagramView);
diagramDock->setAllowedAreas(Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea); diagramDock->setAllowedAreas(Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea);
this->addDockWidget(Qt::LeftDockWidgetArea,diagramDock); this->addDockWidget(Qt::LeftDockWidgetArea,diagramDock);
m_pMonitorItemsDlg = new MonitorItemsDlg(this); m_pMonitorItemsDlg = new MonitorItemsDlg(this);
m_pMonitorItemsDock = new QDockWidget(QString::fromWCharArray(L"当前设备列表"),this); m_pMonitorItemsDock = new BaseDockWidget(QString::fromWCharArray(L"当前设备列表"),this);
m_pMonitorItemsDock->setWidget(m_pMonitorItemsDlg); m_pMonitorItemsDock->setWidget(m_pMonitorItemsDlg);
m_pMonitorItemsDock->setAllowedAreas(Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea); m_pMonitorItemsDock->setAllowedAreas(Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea);
this->addDockWidget(Qt::RightDockWidgetArea,m_pMonitorItemsDock); this->addDockWidget(Qt::RightDockWidgetArea,m_pMonitorItemsDock);
m_pMonitorPagesDlg = new MonitorPagesDlg(this); m_pMonitorPagesDlg = new MonitorPagesDlg(this);
m_pMonitorPagesDock = new QDockWidget(QString::fromWCharArray(L"监控列表"),this); m_pMonitorPagesDock = new BaseDockWidget(QString::fromWCharArray(L"监控列表"),this);
m_pMonitorPagesDock->setWidget(m_pMonitorPagesDlg); m_pMonitorPagesDock->setWidget(m_pMonitorPagesDlg);
m_pMonitorPagesDock->setAllowedAreas(Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea); m_pMonitorPagesDock->setAllowedAreas(Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea);
m_pMonitorPagesDock->setMinimumSize(120,550); m_pMonitorPagesDock->setMinimumSize(120,550);

View File

@ -40,7 +40,17 @@
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(164, 164, 164);</string> <string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin"> <property name="leftMargin">
@ -59,11 +69,11 @@
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string>新建</string> <string>新建</string>
@ -120,6 +130,36 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QPushButton" name="btn_ok"> <widget class="QPushButton" name="btn_ok">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -127,6 +167,36 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>

View File

@ -36,6 +36,52 @@
<pointsize>12</pointsize> <pointsize>12</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet">
<string notr="true">QTabWidget::pane {
border: 1px solid #e2e8f0;
border-radius: 4px;
background-color: white;
margin-top: 4px;
}
/* 标签栏 */
QTabWidget::tab-bar {
alignment: left;
padding: 1px 1px 0 1px;
}
/* 单个标签 */
QTabBar::tab {
background-color: #f8fafc;
color: #94a3b8;
border: 1px solid #e2e8f0;
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
padding: 6px 16px;
margin-right: 2px;
font-size: 11px;
font-weight: 500;
}
/* 标签悬停 */
QTabBar::tab:hover {
background-color: #f1f5f9;
color: #64748b;
border-color: #cbd5e1;
}
/* 标签选中 */
QTabBar::tab:selected {
background-color: white;
color: #1e293b;
border-color: #e2e8f0;
border-bottom-color: white;
font-weight: 500;
margin-bottom: -1px;
padding-top: 7px;
}</string>
</property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
@ -57,6 +103,36 @@
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<widget class="QPushButton" name="btn_new"> <widget class="QPushButton" name="btn_new">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>新建项目</string> <string>新建项目</string>
</property> </property>
@ -64,6 +140,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_open"> <widget class="QPushButton" name="btn_open">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>加载项目</string> <string>加载项目</string>
</property> </property>
@ -71,6 +177,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_save"> <widget class="QPushButton" name="btn_save">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>保存设置</string> <string>保存设置</string>
</property> </property>

View File

@ -6,42 +6,129 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>178</width> <width>202</width>
<height>321</height> <height>321</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Dialog</string>
</property> </property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>10</number> <number>0</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>10</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>10</number> <number>0</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>10</number> <number>0</number>
</property> </property>
<property name="horizontalSpacing"> <property name="spacing">
<number>8</number> <number>0</number>
</property>
<property name="verticalSpacing">
<number>15</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QTreeView" name="treeView"/> <widget class="QWidget" name="titleBar" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>21</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QWidget {
background: #2c5282;
color: white;
border: none;
}
QWidget QLabel {
color: white;
font-size: 12px;
background: transparent;
}</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>10</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="text">
<string>加载</string>
</property>
</widget>
</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>
</layout>
</widget>
</item> </item>
<item row="1" column="0"> <item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing"> <property name="spacing">
<number>20</number> <number>20</number>
</property> </property>
<item> <item>
<widget class="QPushButton" name="btnOk"> <widget class="QPushButton" name="btnOk">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>确定</string> <string>确定</string>
</property> </property>
@ -49,6 +136,36 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btnCancel"> <widget class="QPushButton" name="btnCancel">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>取消</string> <string>取消</string>
</property> </property>
@ -56,6 +173,9 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0">
<widget class="QTreeView" name="treeView"/>
</item>
</layout> </layout>
</widget> </widget>
<resources/> <resources/>

View File

@ -13,6 +13,52 @@
<property name="windowTitle"> <property name="windowTitle">
<string>DiagramDesigner</string> <string>DiagramDesigner</string>
</property> </property>
<property name="styleSheet">
<string notr="true"> QMenuBar {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #2c5282, /* 顶部颜色 */
stop:1 #1a365d); /* 底部颜色 */
color: white;
border: none;
padding: 4px 0;
}
QMenuBar::item {
padding: 8px 16px;
border: 1px solid transparent;
}
QMenuBar::item:hover {
background-color: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
}
QMenuBar::item:pressed {
background-color: rgba(255, 255, 255, 0.2);
}
QMenu {
background-color: white;
border: 1px solid #cbd5e1;
color: #1e293b;
padding: 4px;
}
QMenu::item {
padding: 6px 30px 6px 20px;
border-radius: 2px;
}
QMenu::item:selected {
background-color: #2563eb;
color: white;
}
QMenu::separator {
height: 1px;
background-color: #e2e8f0;
margin: 4px 8px;
}</string>
</property>
<widget class="QWidget" name="centralwidget"/> <widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar"> <widget class="QMenuBar" name="menubar">
<property name="geometry"> <property name="geometry">
@ -20,7 +66,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1696</width> <width>1696</width>
<height>17</height> <height>38</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">

View File

@ -49,7 +49,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>80</width> <width>80</width>
<height>0</height> <height>20</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
@ -58,6 +58,30 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>生成监控</string> <string>生成监控</string>
</property> </property>

View File

@ -40,15 +40,13 @@
<item> <item>
<widget class="QWidget" name="widget" native="true"> <widget class="QWidget" name="widget" native="true">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QWidget#widget{ <string notr="true"/>
background-color: rgb(232, 232, 232);
}</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,3"> <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,3">
<item> <item>
<widget class="QWidget" name="widget_left" native="true"> <widget class="QWidget" name="widget_left" native="true">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(200, 200, 200);</string> <string notr="true"/>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_6">
<item> <item>
@ -79,9 +77,9 @@
<item> <item>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(165, 165, 165); <string notr="true">background-color: rgb(31, 92, 139);
font: 12pt &quot;Microsoft YaHei UI&quot;; font: 12pt &quot;Microsoft YaHei UI&quot;;
color: rgb(8, 8, 8);</string> color: rgb(255, 255, 255);</string>
</property> </property>
<property name="text"> <property name="text">
<string>模型索引</string> <string>模型索引</string>
@ -116,11 +114,42 @@ QTableView::item:selected
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
<widget class="QPushButton" name="btn_new"> <widget class="QPushButton" name="btn_new">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>12</pointsize> <pointsize>-1</pointsize>
<fontweight>Medium</fontweight>
</font> </font>
</property> </property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>新建</string> <string>新建</string>
</property> </property>
@ -151,13 +180,7 @@ QTableView::item:selected
<item> <item>
<widget class="QWidget" name="widget_right" native="true"> <widget class="QWidget" name="widget_right" native="true">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QWidget#widget_right{ <string notr="true"/>
background-color: rgb(200, 200, 200);
}
QWidget{
color: rgb(3, 3, 3);
font: 12pt &quot;Microsoft YaHei UI&quot;;
}</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="1" column="1"> <item row="1" column="1">
@ -175,6 +198,36 @@ QWidget{
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QPushButton" name="btn_apply"> <widget class="QPushButton" name="btn_apply">
<property name="minimumSize">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>&gt;&gt;</string> <string>&gt;&gt;</string>
</property> </property>
@ -197,6 +250,36 @@ QWidget{
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_save"> <widget class="QPushButton" name="btn_save">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>保存</string> <string>保存</string>
</property> </property>
@ -217,6 +300,36 @@ QWidget{
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_cancel"> <widget class="QPushButton" name="btn_cancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>关闭</string> <string>关闭</string>
</property> </property>
@ -247,9 +360,9 @@ QWidget{
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_5">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(165, 165, 165); <string notr="true">background-color: rgb(31, 92, 139);
font: 12pt &quot;Microsoft YaHei UI&quot;; font: 12pt &quot;Microsoft YaHei UI&quot;;
color: rgb(8, 8, 8);</string> color: rgb(255, 255, 255);</string>
</property> </property>
<property name="text"> <property name="text">
<string>元模型属性</string> <string>元模型属性</string>
@ -258,6 +371,36 @@ color: rgb(8, 8, 8);</string>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QPushButton" name="btn_revoke"> <widget class="QPushButton" name="btn_revoke">
<property name="minimumSize">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #5a79a1; /* 中性灰蓝,不刺眼 */
color: white;
border: none; /* 无边框,扁平化 */
border-radius: 4px; /* 小圆角,扁平感 */
font-size: 13px; /* 适中字号 */
font-weight: 500; /* 中等字重 */
}
QPushButton:hover {
background-color: #4a5d7e; /* 稍深的灰蓝 */
}
QPushButton:pressed {
background-color: #3d4e6b; /* 更深的灰蓝 */
}
QPushButton:disabled {
background-color: #a0b3d1; /* 灰调的浅蓝 */
color: #d1dce9; /* 浅灰色文字 */
}
</string>
</property>
<property name="text"> <property name="text">
<string>&lt;&lt;</string> <string>&lt;&lt;</string>
</property> </property>
@ -273,9 +416,9 @@ color: rgb(8, 8, 8);</string>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="label_6">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(165, 165, 165); <string notr="true">background-color: rgb(31, 92, 139);
font: 12pt &quot;Microsoft YaHei UI&quot;; font: 12pt &quot;Microsoft YaHei UI&quot;;
color: rgb(8, 8, 8);</string> color: rgb(255, 255, 255);</string>
</property> </property>
<property name="text"> <property name="text">
<string>工程模型属性</string> <string>工程模型属性</string>
@ -310,7 +453,7 @@ color: rgb(8, 8, 8);</string>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(200, 200, 200);</string> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>