新增生成IDC文件
This commit is contained in:
parent
894a563ff8
commit
cd815c2de3
@ -749,6 +749,8 @@ void MainWindow::slotNetMgr(QString sAddr, const QVariant &msg)
|
||||
{
|
||||
QJsonValue arrays_value = objec.take("cmd");
|
||||
qDebug()<<"cmd ="<<arrays_value.toString();
|
||||
QString cmd = arrays_value.toString();
|
||||
if(cmd == "87")
|
||||
{
|
||||
bool Status = objec.take("success").toBool();
|
||||
QString strMessage = objec.take("message").toString();
|
||||
@ -769,6 +771,15 @@ void MainWindow::slotNetMgr(QString sAddr, const QVariant &msg)
|
||||
}else{
|
||||
QMessageBox::information(this, QStringLiteral("提示"), strMessage);
|
||||
}
|
||||
}else if(cmd == "61850"){
|
||||
bool Status = objec.take("success").toBool();
|
||||
QString strMessage = objec.take("message").toString();
|
||||
if(Status){
|
||||
QMessageBox::information(this, QStringLiteral("提示"), strMessage);
|
||||
|
||||
}else{
|
||||
QMessageBox::question(this, QStringLiteral("提示"), strMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
disconnect(g_NetMgr,SIGNAL(sigNetMgr(QString, const QVariant&)), this, SLOT(slotNetMgr(QString,const QVariant&)));
|
||||
@ -787,3 +798,16 @@ void MainWindow::on_pushButton_detail_clicked()
|
||||
connect(g_NetMgr,SIGNAL(sigNetMgr(QString, const QVariant&)), this, SLOT(slotNetMgr(QString,const QVariant&)));
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_pushButton_generate_clicked()
|
||||
{
|
||||
QJsonObject sendData;
|
||||
sendData["cmd"] = "61850";
|
||||
QNetworkRequest req;
|
||||
QString sUrl = QString("http://%1/cgi-bin/General.cgi/").arg(IP);
|
||||
req.setUrl(sUrl);
|
||||
g_NetMgr->PostJson(req,sendData);
|
||||
connect(g_NetMgr,SIGNAL(sigNetMgr(QString, const QVariant&)), this, SLOT(slotNetMgr(QString,const QVariant&)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -65,6 +65,8 @@ private slots:
|
||||
|
||||
void on_pushButton_detail_clicked();
|
||||
void slotNetMgr(QString sAddr,const QVariant& msg);
|
||||
void on_pushButton_generate_clicked();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
QList<QAbstractButton *> btnsConfig;
|
||||
|
||||
@ -1788,6 +1788,35 @@ background-image: url(:/image/bj.jpg);
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_generate">
|
||||
<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_generate { border-image: url(:/image/Btn/normal_Btn.png);
|
||||
color:#1f5188 }
|
||||
#pushButton_generate:hover { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}
|
||||
#pushButton_generate:pressed { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}
|
||||
#pushButton_generate:checked { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||
color:#ffffff}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>生成ICD文件</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user