修复一些bug
This commit is contained in:
parent
77b7e2c846
commit
86c69992d5
@ -467,6 +467,7 @@ void CBoardSetting::PushData()
|
||||
g_FtpClient->SetUserInfo("root","@#cidw!@123456");
|
||||
g_FtpClient->UpLoadFile(fileName,"UnitWorkConditionsInfo.json");
|
||||
|
||||
|
||||
QJsonDocument jsonDocUnit;
|
||||
QJsonObject UnitObj;
|
||||
UnitObj["NULL"] = "";
|
||||
@ -482,6 +483,17 @@ void CBoardSetting::PushData()
|
||||
g_FtpClient->SetUserInfo("root","@#cidw!@123456");
|
||||
g_FtpClient->UpLoadFile(fileNameUnit,"UnitConfigurations.json");
|
||||
|
||||
QString fileNameUnit2 = QCoreApplication::applicationDirPath() + "\\config\\UnitConfigurations2.json";
|
||||
|
||||
QFile fileUnit2(fileNameUnit2);
|
||||
fileUnit2.open(QIODevice::WriteOnly);
|
||||
fileUnit2.write(jsonDocUnit.toJson());
|
||||
fileUnit2.close();
|
||||
QString str22 = QString("ftp://%1/CIDW/qtconfig/%2").arg(IP).arg("UnitConfigurations2.json");
|
||||
g_FtpClient->SetServerInfo(str22);
|
||||
g_FtpClient->SetUserInfo("root","@#cidw!@123456");
|
||||
g_FtpClient->UpLoadFile(fileNameUnit2,"UnitConfigurations2.json");
|
||||
|
||||
g_channelSetting = g_SqliteDB->GetDataMultiLine("t_ChannelSetting");
|
||||
for (int i = 0; i < g_channelSetting.size(); i++)
|
||||
{
|
||||
@ -532,6 +544,17 @@ void CBoardSetting::PushData()
|
||||
g_FtpClient->SetUserInfo("root","@#cidw!@123456");
|
||||
g_FtpClient->UpLoadFile(fileNameTri,"TriggerSettings.json");
|
||||
|
||||
|
||||
QString fileNameTri2 = QCoreApplication::applicationDirPath() + "\\config\\TriggerSettings2.json";
|
||||
QFile fileTri2(fileNameTri2);
|
||||
fileTri2.open(QIODevice::WriteOnly);
|
||||
fileTri2.write(jsonDocTri.toJson());
|
||||
fileTri2.close();
|
||||
QString strTri2 = QString("ftp://%1/CIDW/qtconfig/%2").arg(IP).arg("TriggerSettings2.json");
|
||||
g_FtpClient->SetServerInfo(strTri2);
|
||||
g_FtpClient->SetUserInfo("root","@#cidw!@123456");
|
||||
g_FtpClient->UpLoadFile(fileNameTri2,"TriggerSettings2.json");
|
||||
|
||||
QString str = QString("ftp://%1/CIDW/qtconfig/%2").arg(IP).arg("UnitBoardsInfo.json");
|
||||
g_FtpClient->SetServerInfo(str);
|
||||
g_FtpClient->SetUserInfo("root","@#cidw!@123456");
|
||||
@ -737,14 +760,12 @@ void CBoardSetting::on_pushButton_Init_clicked()
|
||||
'%68','%69','%70',%71,%72,%73,'%74','%75','%76','%77','%78','%79','%80','%81','%82','%83','%84',%85,'%86','%87','%88','%89','%90','%91','%92','%93','%94','%95','',98,1,'','');").\
|
||||
arg("NULL").arg(0).arg("true").arg("ACCELEROMETER").arg("0").arg("Bottom").arg("false").arg(0).arg("false").arg(0).arg("false").arg(0).arg("false").arg(0).arg("false").arg(0).arg("false").arg(0).arg(0).arg(0).arg("false").
|
||||
arg(0).arg("false").arg(0).arg("false").arg(0).arg(strChannelID).arg("NONE").arg(strChannelName).arg("false").arg(0).arg("false").arg(0).arg("RMSValue").arg("").arg(0).arg("false").arg(0).arg("CTC-AC102").arg("false").arg(0).arg("false").arg(0).arg("").\
|
||||
arg("true").arg(strMAC).arg(0).arg(1000).arg(0).arg("Hamming").arg("15000").arg("0.5").arg(10).arg("5000").arg("").arg(0).arg(0).arg("0").arg("60000").arg(0).arg("NONE").arg("").arg("0").arg(1024).arg("").arg("").arg(timeStamp).\
|
||||
arg("true").arg(strMAC).arg(0).arg(1000).arg(0).arg("Hamming").arg("15000").arg("0.5").arg(10).arg("5000").arg("").arg(1).arg(1).arg("0").arg("60000").arg(0).arg("NONE").arg("").arg("0").arg(1024).arg("").arg("").arg(timeStamp).\
|
||||
arg("m/s^2").arg("").arg("").arg(0).arg(BoardNo).arg(i+1).arg("2032").arg("1").arg("-2").arg("-20").arg("10.2").arg("").arg("").arg("").arg("").arg("true").arg("").arg(0).arg("").arg("").arg("").arg("").arg("").arg("").arg("").arg(tempOptions.at(ii)["BoardTypeNo"].toInt()).arg("").arg("峰峰值");
|
||||
qDebug() << "str" << str << endl;
|
||||
|
||||
g_SqliteDB->InsertData(taleName,str);
|
||||
}
|
||||
|
||||
|
||||
}else if(tempOptions.at(ii)["BoardTypeNo"].toInt() == 1){
|
||||
int BoardNo = tempOptions.at(ii)["BoardNo"].toInt();
|
||||
int BoardTypeNo = tempOptions.at(ii)["BoardTypeNo"].toInt();
|
||||
@ -758,7 +779,7 @@ void CBoardSetting::on_pushButton_Init_clicked()
|
||||
'%68','%69','%70',%71,%72,%73,'%74','%75','%76','%77','%78','%79','%80','%81','%82','%83','%84',%85,'%86','%87','%88','%89','%90','%91','%92','%93','%94','%95','',98,1,'','');").\
|
||||
arg("NULL").arg(0).arg("true").arg("PULSE_CURRENT").arg("0").arg("Bottom").arg("false").arg(0).arg("false").arg(0).arg("false").arg(0).arg("false").arg(0).arg("false").arg(0).arg("false").arg(0).arg(0).arg(0).arg("false").
|
||||
arg(0).arg("false").arg(0).arg("false").arg(0).arg(strChannelID).arg("NONE").arg(strChannelName).arg("false").arg(0).arg("false").arg(0).arg("RMSValue").arg("").arg(0).arg("false").arg(0).arg("电流变送器").arg("false").arg(0).arg("false").arg(0).arg("").\
|
||||
arg("true").arg(MAC).arg(0).arg(1000).arg(0).arg("Hamming").arg("").arg("").arg(20).arg("5000").arg("").arg(0).arg(0).arg("0").arg("60000").arg(0).arg("NONE").arg("").arg("0").arg(1024).arg("").arg("").arg(timeStamp).\
|
||||
arg("true").arg(MAC).arg(0).arg(1000).arg(0).arg("Hamming").arg("").arg("").arg(20).arg("5000").arg("").arg(1).arg(1).arg("0").arg("60000").arg(0).arg("NONE").arg("").arg("0").arg(1024).arg("").arg("").arg(timeStamp).\
|
||||
arg("mA").arg("").arg("").arg(0).arg(BoardNo).arg(i+1).arg("").arg("1").arg("-2").arg("-20").arg("0").arg("").arg("").arg("").arg("").arg("true").arg("").arg(0).arg("").arg("").arg("").arg("20").arg("").arg("4").arg("4").arg(tempOptions.at(ii)["BoardTypeNo"].toInt()).arg("").arg("平均值");
|
||||
qDebug() << "str" << str << endl;
|
||||
|
||||
|
||||
@ -5,8 +5,9 @@
|
||||
#include <QLabel>
|
||||
#include <QDateTime>
|
||||
#include <QDate>
|
||||
#include <QTime>
|
||||
#include <QInputDialog>
|
||||
|
||||
#include "NetMgr.h"
|
||||
|
||||
CChannelList::CChannelList(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@ -633,3 +634,38 @@ void CChannelList::on_pushButton_refresh_clicked()
|
||||
initReadConfig();
|
||||
}
|
||||
|
||||
void CChannelList::slotNetMgr(QString sAddr, const QVariant &msg)
|
||||
{
|
||||
QJsonObject objec = msg.value<QJsonObject>();
|
||||
if(objec.contains("cmd"))
|
||||
{
|
||||
QJsonValue arrays_value = objec.take("cmd");
|
||||
//qDebug()<<"cmd ="<<arrays_value.toString();
|
||||
if(arrays_value.toString() == "08"){
|
||||
bool Status = objec.take("success").toBool();
|
||||
QString strMessage = objec.take("message").toString();
|
||||
if(Status){
|
||||
QMessageBox::information(NULL, QStringLiteral("提示"), strMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void CChannelList::on_pushButton_restart_clicked()
|
||||
{
|
||||
QMessageBox::StandardButton reply;
|
||||
reply = QMessageBox::question(NULL, "提示", "确认后将重启服务",
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||
if (reply == QMessageBox::Yes)
|
||||
{
|
||||
connect(g_NetMgr,SIGNAL(sigNetMgr(QString, const QVariant&)), this, SLOT(slotNetMgr(QString,const QVariant&)));
|
||||
QJsonObject allObj,cmdBody;
|
||||
allObj.insert("cmd", "08");
|
||||
allObj["cmdBody"] = cmdBody;
|
||||
QNetworkRequest req;
|
||||
QString sUrl = QString("http://%1/cgi-bin/General.cgi/").arg(IP);
|
||||
req.setUrl(sUrl);
|
||||
g_NetMgr->PostJson(req,allObj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStandardItemModel> //数据模型类
|
||||
#include <QMessageBox>
|
||||
#include "HeaderView.h"
|
||||
#include "TableHeaderView.h"
|
||||
#include "global.h"
|
||||
@ -10,6 +11,7 @@
|
||||
#include "SlowSpeedChannelSetting.h"
|
||||
#include "ChannelSetting.h"
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class CChannelList;
|
||||
}
|
||||
@ -60,7 +62,10 @@ private slots:
|
||||
|
||||
void on_pushButton_close_clicked();
|
||||
void on_pushButton_open_clicked();
|
||||
void on_pushButton_restart_clicked();
|
||||
void on_pushButton_refresh_clicked();
|
||||
|
||||
void slotNetMgr(QString sAddr,const QVariant& msg);
|
||||
};
|
||||
|
||||
#endif // CHANNELLIST_H
|
||||
|
||||
@ -32,7 +32,7 @@ CConfiguration::CConfiguration(QWidget *parent) :
|
||||
pHeader2->setStretchLastSection(false);
|
||||
|
||||
connect(ui->comboBox_WC,SIGNAL(currentTextChanged(const QString &)),this,SLOT(on_comboBox_WC_currentTextChanged2(const QString&)));
|
||||
connect(g_NetMgr,SIGNAL(sigNetMgr(QString, const QVariant&)), this, SLOT(slotNetMgr(QString,const QVariant&)));
|
||||
|
||||
}
|
||||
|
||||
CConfiguration::~CConfiguration()
|
||||
@ -124,30 +124,57 @@ void CConfiguration::Init()
|
||||
item2->appendRow(itemChannel);
|
||||
|
||||
for (int k = 0; k < arrayConfig.size(); k++){
|
||||
QString str = arrayConfig.at(k)["triggerEventName"].toString();
|
||||
QStringList strList = arrayConfig.at(k)["triggerEventName"].toString().split('-');
|
||||
QString strStaticData;
|
||||
QStandardItem *item = NULL;
|
||||
int xAlertOverEnabled = arrayConfig.at(k)["xAlertOverEnabled"].toInt();
|
||||
int xAlertUnderEnabled = arrayConfig.at(k)["xAlertUnderEnabled"].toInt();
|
||||
int xDangerOverEnabled = arrayConfig.at(k)["xDangerOverEnabled"].toInt();
|
||||
int xDangerUnderEnabled = arrayConfig.at(k)["xDangerUnderEnabled"].toInt();
|
||||
if(strList[0] == "MinValues")
|
||||
strStaticData = "最小值";
|
||||
else if(strList[0] == "MaxValues")
|
||||
strStaticData = "最大值";
|
||||
else if( strList[0] == "DCValues")
|
||||
strStaticData = "平均值";
|
||||
else if(strList[0] == "RMSValues")
|
||||
strStaticData = "有效值";
|
||||
else if(strList[0] == "DiagnosisPk2Pk")
|
||||
strStaticData = "诊断峰峰值";
|
||||
else if(strList[0] == "IntegratRMS")//积分
|
||||
strStaticData = "积分有效值";
|
||||
else if(strList[0] == "IntegratPk2Pk")
|
||||
strStaticData = "积分峰峰值";
|
||||
else if(strList[0] == "SpeedProfileSpeed")
|
||||
strStaticData = "转速";
|
||||
else if(strList[0] == "IntegratPk2Pk/2")//积分
|
||||
strStaticData = "积分峰值";
|
||||
else if(strList[0] == "DiagnosisPeak")
|
||||
strStaticData = "峰值";
|
||||
else if(strList[0] == "MonitorPk2Pk")
|
||||
strStaticData = "监测保护峰峰值";
|
||||
if(xAlertOverEnabled == 1){
|
||||
item = new QStandardItem(QString(channelName + "-" + "高于警报值"));
|
||||
|
||||
item = new QStandardItem(QString(channelName + "-" + strStaticData + "-" + "高于警报值"));
|
||||
//item = new QStandardItem(QString(channelName + "-" + str + "-Over-"+"警报"));
|
||||
itemChannel->appendRow(item);
|
||||
}
|
||||
if(xAlertUnderEnabled == 1){
|
||||
item = new QStandardItem(QString(channelName + "-" + "低于警报值"));
|
||||
item = new QStandardItem(QString(channelName + "-" + strStaticData + "-"+ "低于警报值"));
|
||||
//item = new QStandardItem(QString(channelName + "-" + str + "-Under-"+"警报"));
|
||||
itemChannel->appendRow(item);
|
||||
}
|
||||
if(xDangerOverEnabled == 1){
|
||||
item = new QStandardItem(QString(channelName + "-" + strStaticData + "-" + "高于危险值"));
|
||||
//item = new QStandardItem(QString(channelName + "-" + str + "-Over-"+"危险"));
|
||||
item = new QStandardItem(QString(channelName + "-" + "高于危险值"));
|
||||
itemChannel->appendRow(item);
|
||||
}
|
||||
if(xDangerUnderEnabled == 1){
|
||||
item = new QStandardItem(QString(channelName + "-" + "低于危险值"));
|
||||
item = new QStandardItem(QString(channelName + "-" + strStaticData + "-" + "低于危险值"));
|
||||
//item = new QStandardItem(QString(channelName + "-" + str + "-Under-"+"危险"));
|
||||
itemChannel->appendRow(item);
|
||||
}
|
||||
itemChannel->setData(strStaticData);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -444,6 +471,7 @@ void CConfiguration::slotNetMgr(QString sAddr, const QVariant &msg)
|
||||
bool Status = objec.take("success").toBool();
|
||||
if(Status){
|
||||
PushData();
|
||||
disconnect(g_NetMgr,SIGNAL(sigNetMgr(QString, const QVariant&)), this, SLOT(slotNetMgr(QString,const QVariant&)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -451,6 +479,7 @@ void CConfiguration::slotNetMgr(QString sAddr, const QVariant &msg)
|
||||
|
||||
void CConfiguration::on_pushButton_save_clicked()
|
||||
{
|
||||
connect(g_NetMgr,SIGNAL(sigNetMgr(QString, const QVariant&)), this, SLOT(slotNetMgr(QString,const QVariant&)));
|
||||
g_NetMgr->DetectNet();
|
||||
}
|
||||
|
||||
@ -671,34 +700,57 @@ void CConfiguration::on_comboBox_WC_currentTextChanged2(const QString &arg1)
|
||||
if(arrayConfig.size() > 0){
|
||||
item2->appendRow(itemChannel);
|
||||
for (int k = 0; k < arrayConfig.size(); k++){
|
||||
QString str = arrayConfig.at(k)["triggerEventName"].toString();
|
||||
QStringList strList = arrayConfig.at(k)["triggerEventName"].toString().split('-');
|
||||
QString strStaticData;
|
||||
QStandardItem *item = NULL;
|
||||
int xAlertOverEnabled = arrayConfig.at(k)["xAlertOverEnabled"].toInt();
|
||||
int xAlertUnderEnabled = arrayConfig.at(k)["xAlertUnderEnabled"].toInt();
|
||||
int xDangerOverEnabled = arrayConfig.at(k)["xDangerOverEnabled"].toInt();
|
||||
int xDangerUnderEnabled = arrayConfig.at(k)["xDangerUnderEnabled"].toInt();
|
||||
if(strList[0] == "MinValues")
|
||||
strStaticData = "最小值";
|
||||
else if(strList[0] == "MaxValues")
|
||||
strStaticData = "最大值";
|
||||
else if( strList[0] == "DCValues")
|
||||
strStaticData = "平均值";
|
||||
else if(strList[0] == "RMSValues")
|
||||
strStaticData = "有效值";
|
||||
else if(strList[0] == "DiagnosisPk2Pk")
|
||||
strStaticData = "诊断峰峰值";
|
||||
else if(strList[0] == "IntegratRMS")//积分
|
||||
strStaticData = "积分有效值";
|
||||
else if(strList[0] == "IntegratPk2Pk")
|
||||
strStaticData = "积分峰峰值";
|
||||
else if(strList[0] == "SpeedProfileSpeed")
|
||||
strStaticData = "转速";
|
||||
else if(strList[0] == "IntegratPk2Pk/2")//积分
|
||||
strStaticData = "积分峰值";
|
||||
else if(strList[0] == "DiagnosisPeak")
|
||||
strStaticData = "峰值";
|
||||
else if(strList[0] == "MonitorPk2Pk")
|
||||
strStaticData = "监测保护峰峰值";
|
||||
if(xAlertOverEnabled == 1){
|
||||
|
||||
item = new QStandardItem(QString(channelName + "-" + "高于警报值"));
|
||||
item = new QStandardItem(QString(channelName + "-" + strStaticData + "-" + "高于警报值"));
|
||||
//item = new QStandardItem(QString(channelName + "-" + str + "-Over-"+"警报"));
|
||||
itemChannel->appendRow(item);
|
||||
}
|
||||
if(xAlertUnderEnabled == 1){
|
||||
item = new QStandardItem(QString(channelName + "-" + "低于警报值"));
|
||||
item = new QStandardItem(QString(channelName + "-" + strStaticData + "-"+ "低于警报值"));
|
||||
//item = new QStandardItem(QString(channelName + "-" + str + "-Under-"+"警报"));
|
||||
itemChannel->appendRow(item);
|
||||
}
|
||||
if(xDangerOverEnabled == 1){
|
||||
item = new QStandardItem(QString(channelName + "-" + "高于危险值"));
|
||||
item = new QStandardItem(QString(channelName + "-" + strStaticData + "-" + "高于危险值"));
|
||||
//item = new QStandardItem(QString(channelName + "-" + str + "-Over-"+"危险"));
|
||||
itemChannel->appendRow(item);
|
||||
}
|
||||
if(xDangerUnderEnabled == 1){
|
||||
item = new QStandardItem(QString(channelName + "-" + "低于危险值"));
|
||||
item = new QStandardItem(QString(channelName + "-" + strStaticData + "-" + "低于危险值"));
|
||||
//item = new QStandardItem(QString(channelName + "-" + str + "-Under-"+"危险"));
|
||||
itemChannel->appendRow(item);
|
||||
}
|
||||
itemChannel->setData(str);
|
||||
itemChannel->setData(strStaticData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +38,7 @@ SOURCES += \
|
||||
FileServerConfig.cpp \
|
||||
HistoryAlarm.cpp \
|
||||
Mqttclient.cpp \
|
||||
MyTreeView.cpp \
|
||||
NTPServerConfig.cpp \
|
||||
NetMgr.cpp \
|
||||
OtherConfig.cpp \
|
||||
@ -87,6 +88,7 @@ HEADERS += \
|
||||
FileServerConfig.h \
|
||||
HistoryAlarm.h \
|
||||
Mqttclient.h \
|
||||
MyTreeView.h \
|
||||
NTPServerConfig.h \
|
||||
NetMgr.h \
|
||||
OtherConfig.h \
|
||||
|
||||
72
MyTreeView.cpp
Normal file
72
MyTreeView.cpp
Normal file
@ -0,0 +1,72 @@
|
||||
#include "MyTreeView.h"
|
||||
#include <QMouseEvent>
|
||||
#include <QDebug>
|
||||
|
||||
MyTreeView::MyTreeView(QWidget *parent)
|
||||
: QTreeView(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MyTreeView::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
qDebug()<<"mousePressEvent";
|
||||
//实现点空白处取消选择
|
||||
QPoint p = event->pos();
|
||||
QModelIndex index = indexAt(p);
|
||||
if(!index.isValid())
|
||||
{
|
||||
setCurrentIndex(QModelIndex());
|
||||
return;
|
||||
}
|
||||
QModelIndex index2 = indexAt(event->pos());
|
||||
int clickedColumn = index2.row();
|
||||
|
||||
qDebug() << "clickedColumn" << clickedColumn << endl;
|
||||
//调用基类的点击处理,不然点击的原有响应也失效了
|
||||
//但如果就想禁用tree控件单击,不调用即可
|
||||
QTreeView::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void MyTreeView::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
qDebug()<<"mouseReleaseEvent";
|
||||
|
||||
|
||||
|
||||
QTreeView::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
void MyTreeView::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
{
|
||||
qDebug()<<"mouseDoubleClickEvent";
|
||||
|
||||
|
||||
|
||||
QTreeView::mouseDoubleClickEvent(event);
|
||||
}
|
||||
|
||||
void MyTreeView::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
qDebug()<<"mouseMoveEvent";
|
||||
|
||||
|
||||
QTreeView::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
void MyTreeView::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
qDebug()<<"keyPressEvent";
|
||||
|
||||
|
||||
|
||||
QTreeView::keyPressEvent(event);
|
||||
}
|
||||
void MyTreeView::dragEnterEvent(QDragEnterEvent *event)
|
||||
{
|
||||
qDebug()<<"dragEnterEvent";
|
||||
}
|
||||
void MyTreeView::dropEvent(QDropEvent *event)
|
||||
{
|
||||
qDebug()<<"dropEvent";
|
||||
}
|
||||
28
MyTreeView.h
Normal file
28
MyTreeView.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef MYTREEVIEW_H
|
||||
#define MYTREEVIEW_H
|
||||
|
||||
#include <QTreeView>
|
||||
#include <QStandardItemModel> //数据模型类
|
||||
|
||||
//继承QTreeView重写点击消息,实现点空白处取消选择
|
||||
|
||||
class MyTreeView : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MyTreeView(QWidget *parent = Q_NULLPTR);
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
void mousePressEvent ( QMouseEvent * event )override ;
|
||||
void mouseReleaseEvent(QMouseEvent *event)override ;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event)override ;
|
||||
void mouseMoveEvent(QMouseEvent *event)override ;
|
||||
void keyPressEvent(QKeyEvent *event)override ;
|
||||
void dragEnterEvent(QDragEnterEvent *event)override;
|
||||
void dropEvent(QDropEvent *event)override;
|
||||
|
||||
};
|
||||
|
||||
#endif // MYTREEVIEW_H
|
||||
@ -4,7 +4,7 @@
|
||||
#include "QMyTableViewBtnDelegate.h"
|
||||
#include "AlarmDetails.h"
|
||||
#include "sqlitedb.h"
|
||||
|
||||
#include <QTimeZone>
|
||||
#include "ftpclient.h"
|
||||
|
||||
|
||||
@ -71,7 +71,10 @@ void CRealTimeAlarm::initTable()
|
||||
if(m_vecTriggerAlarmStatusInfo.size() > 0){
|
||||
for (int i = 0; i < m_vecTriggerAlarmStatusInfo.size(); i++) {
|
||||
QVariantList strRowItem ;
|
||||
QString TStr = QDateTime::fromSecsSinceEpoch(m_vecTriggerAlarmStatusInfo[i].timestamp).toString("yyyy-MM-dd hh:mm:ss");
|
||||
QDateTime dateTime = QDateTime::fromSecsSinceEpoch(m_vecTriggerAlarmStatusInfo[i].timestamp);
|
||||
QTimeZone timeZone("Asia/Shanghai");
|
||||
dateTime = dateTime.toTimeZone(timeZone);
|
||||
QString TStr = dateTime.toString("yyyy-MM-dd hh:mm:ss");
|
||||
QString triggerLevel = "",triggerEventName = "";
|
||||
if(m_vecTriggerAlarmStatusInfo[i].triggerLevel == "1"){
|
||||
triggerLevel = "警报";
|
||||
|
||||
894
TerminalInfo.ui
894
TerminalInfo.ui
@ -103,185 +103,217 @@
|
||||
<property name="title">
|
||||
<string>终端信息</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>在线状态:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>在线状态:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgb(0, 170, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>在线</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgb(0, 170, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>在线</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>终端号:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>终端号:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_DatawatchNo">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_DatawatchNo">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>终端名称:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>终端名称:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_DatawatchName">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_DatawatchName">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>版本:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>版本:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Version">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Version">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>固件升级:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_17">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GUI版本:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Version_GUI">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_Update">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#pushButton_Update { border-image: url(:/image/Btn/normal_Btn.png);
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>固件升级:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_Update">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#pushButton_Update { border-image: url(:/image/Btn/normal_Btn.png);
|
||||
color:#1f5188 }
|
||||
#pushButton_Update:hover { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}
|
||||
@ -289,265 +321,265 @@
|
||||
color:#ffffff}
|
||||
#pushButton_Update:checked { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>升级</string>
|
||||
</property>
|
||||
</widget>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>升级</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>城市:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>城市:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_City">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_City">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>安装时间:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>安装时间:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Time">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Time">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>添加人:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>添加人:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_User">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_User">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>终端类型:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>终端类型:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Type">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Type">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>序列号:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>序列号:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_SerialNo">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_SerialNo">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>终端地址:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>终端地址:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Address">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_Address">
|
||||
<property name="text">
|
||||
<string>- -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_16">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据拷贝:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonCopy">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#pushButtonCopy { border-image: url(:/image/Btn/normal_Btn.png);
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_16">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据拷贝:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonCopy">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#pushButtonCopy { border-image: url(:/image/Btn/normal_Btn.png);
|
||||
color:#1f5188 }
|
||||
#pushButtonCopy:hover { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}
|
||||
@ -555,24 +587,26 @@
|
||||
color:#ffffff}
|
||||
#pushButtonCopy:checked { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>拷贝</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>拷贝</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
||||
@ -178,7 +178,7 @@ QTableView::item {
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_line">
|
||||
<widget class="QPushButton" name="pushButton_restart">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>96</width>
|
||||
@ -192,17 +192,17 @@ QTableView::item {
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#pushButton_line { border-image: url(:/image/Btn/normal_Btn.png);
|
||||
<string notr="true">#pushButton_restart { border-image: url(:/image/Btn/normal_Btn.png);
|
||||
color:#1f5188 }
|
||||
#pushButton_line:hover { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
#pushButton_restart:hover { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}
|
||||
#pushButton_line:pressed { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
#pushButton_restart:pressed { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}
|
||||
#pushButton_line:checked { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
#pushButton_restart:checked { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>查看线路图</string>
|
||||
<string>重启服务</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@ -635,7 +635,7 @@ color: rgb(27, 30, 35);
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@ -844,6 +844,9 @@ color: rgb(27, 30, 35);
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_sensorICP">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@ -1808,6 +1811,9 @@ color: rgb(27, 30, 35);
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_sensorICP_2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
||||
@ -188,6 +188,15 @@ void MainWindow::initWindow()
|
||||
g_MapChannelType.insert("DI","开入");
|
||||
g_MapChannelType.insert("DO","开出");
|
||||
g_MapChannelType.insert("AIRGAP","气隙");
|
||||
|
||||
|
||||
//返回与应用程序所连接的窗口系统相关联的所有屏幕的列表。
|
||||
QList<QScreen *> screen_list= QGuiApplication::screens();
|
||||
for(int i=0;i<screen_list.count();i++)
|
||||
{
|
||||
qDebug()<<screen_list.at(0)->size(); //此属性保存屏幕的像素分辨率
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::initStyle()
|
||||
|
||||
@ -762,11 +762,11 @@ QMessageBox {
|
||||
}
|
||||
|
||||
QMessageBox QLabel#qt_msgbox_label { /* textLabel */
|
||||
color: #298DFF;
|
||||
color: #245d9b;
|
||||
background-color: transparent;
|
||||
min-width: 340px; /* textLabel设置最小宽度可以相应的改变QMessageBox的最小宽度 */
|
||||
min-height: 40px; /* textLabel和iconLabel高度保持一致 */
|
||||
font-size: 24pt;
|
||||
font-size: 18pt;
|
||||
}
|
||||
|
||||
QMessageBox QLabel#qt_msgboxex_icon_label { /* iconLabel */
|
||||
|
||||
@ -425,7 +425,7 @@ void CRealTimeForm::on_addchannel(channelBaseInfo channelbaseInfo,QString str)
|
||||
pTextUnits->setDefaultTextColor(QColor(27, 30, 35));
|
||||
pTextChannel->setFont(font);
|
||||
pTextValue->setFont(font2);
|
||||
pTextValue->setPos(150,0);
|
||||
pTextValue->setPos(160,-2);
|
||||
pTextValue->setDefaultTextColor(QColor(31, 81, 136));
|
||||
pTextChannel->setPos(0,2);
|
||||
pTextChannel->setDefaultTextColor(QColor(27, 30, 35));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user