添加128k配置
This commit is contained in:
parent
892f43fb29
commit
6263b93ee9
@ -21,6 +21,7 @@ COtherConfig::COtherConfig(QWidget *parent) :
|
|||||||
|
|
||||||
ui->radioButton_closeIO->setChecked(1);
|
ui->radioButton_closeIO->setChecked(1);
|
||||||
LoadWorkingConditionConfig();
|
LoadWorkingConditionConfig();
|
||||||
|
get_status = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
COtherConfig::~COtherConfig()
|
COtherConfig::~COtherConfig()
|
||||||
@ -301,7 +302,20 @@ void COtherConfig::slotNetMgr(QString sAddr, const QVariant &msg)
|
|||||||
{
|
{
|
||||||
QJsonValue arrays_value = objec.take("cmd");
|
QJsonValue arrays_value = objec.take("cmd");
|
||||||
qDebug()<<"cmd ="<<arrays_value.toString();
|
qDebug()<<"cmd ="<<arrays_value.toString();
|
||||||
{
|
if(arrays_value.toString() == "113" && get_status){
|
||||||
|
ui->pushButton_open_close->setEnabled("true");
|
||||||
|
bool enable = objec.take("enable").toBool();
|
||||||
|
if(enable){
|
||||||
|
ui->radioButton_open_2->setChecked(true);
|
||||||
|
ui->radioButton_close_2->setChecked(false);
|
||||||
|
ui->pushButton_open_close->setText("关闭");
|
||||||
|
}else{
|
||||||
|
ui->radioButton_open_2->setChecked(false);
|
||||||
|
ui->radioButton_close_2->setChecked(true);
|
||||||
|
ui->pushButton_open_close->setText("打开");
|
||||||
|
}
|
||||||
|
get_status = false;
|
||||||
|
}else{
|
||||||
bool Status = objec.take("success").toBool();
|
bool Status = objec.take("success").toBool();
|
||||||
QString strMessage = objec.take("message").toString();
|
QString strMessage = objec.take("message").toString();
|
||||||
if(Status){
|
if(Status){
|
||||||
@ -473,3 +487,64 @@ void COtherConfig::on_radioButton_closeIO_clicked()
|
|||||||
g_strIOControl = "0";
|
g_strIOControl = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void COtherConfig::on_radioButton_open_2_clicked()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
void COtherConfig::on_radioButton_close_2_clicked()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void COtherConfig::on_pushButton_get_clicked()
|
||||||
|
{
|
||||||
|
QJsonObject sendData;
|
||||||
|
sendData["cmd"] = "113";
|
||||||
|
sendData["subcmd"] = 0;
|
||||||
|
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&)));
|
||||||
|
|
||||||
|
get_status = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void COtherConfig::on_pushButton_open_close_clicked()
|
||||||
|
{
|
||||||
|
QMessageBox::StandardButton ret = QMessageBox::question(nullptr, "确认", "是否继续?",
|
||||||
|
QMessageBox::Yes | QMessageBox::No,
|
||||||
|
QMessageBox::Yes);
|
||||||
|
|
||||||
|
if (ret == QMessageBox::No) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QString btn_text = ui->pushButton_open_close->text();
|
||||||
|
if(btn_text == "打开"){
|
||||||
|
QJsonObject sendData;
|
||||||
|
sendData["cmd"] = "113";
|
||||||
|
sendData["subcmd"] = 1;
|
||||||
|
sendData["enable"] = true;
|
||||||
|
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&)));
|
||||||
|
ui->pushButton_open_close->setText("关闭");
|
||||||
|
|
||||||
|
}else if(btn_text == "关闭"){
|
||||||
|
QJsonObject sendData;
|
||||||
|
sendData["cmd"] = "113";
|
||||||
|
sendData["subcmd"] = 1;
|
||||||
|
sendData["enable"] = false;
|
||||||
|
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&)));
|
||||||
|
ui->pushButton_open_close->setText("打开");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,13 +32,21 @@ private slots:
|
|||||||
|
|
||||||
void on_radioButton_closeIO_clicked();
|
void on_radioButton_closeIO_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_open_2_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_get_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_close_2_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_open_close_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::COtherConfig *ui;
|
Ui::COtherConfig *ui;
|
||||||
|
|
||||||
QString m_strTriggerTime;
|
QString m_strTriggerTime;
|
||||||
QString m_strConfidence;
|
QString m_strConfidence;
|
||||||
QString m_strSegments;
|
QString m_strSegments;
|
||||||
|
bool get_status;
|
||||||
void LoadWorkingConditionConfig();
|
void LoadWorkingConditionConfig();
|
||||||
QString GBK2UTF8(QByteArray inStr);
|
QString GBK2UTF8(QByteArray inStr);
|
||||||
};
|
};
|
||||||
|
|||||||
117
OtherConfig.ui
117
OtherConfig.ui
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>905</width>
|
<width>921</width>
|
||||||
<height>580</height>
|
<height>580</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -450,6 +450,118 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QGroupBox" name="groupBox_6">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>290</y>
|
||||||
|
<width>251</width>
|
||||||
|
<height>131</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>128k配置</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QPushButton" name="pushButton_open_close">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>80</y>
|
||||||
|
<width>96</width>
|
||||||
|
<height>28</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>96</width>
|
||||||
|
<height>28</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">#pushButton_open_close { border-image: url(:/image/Btn/normal_Btn.png);
|
||||||
|
color:#1f5188 }
|
||||||
|
#pushButton_open_close:hover { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||||
|
color:#ffffff}
|
||||||
|
#pushButton_open_close:pressed { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||||
|
color:#ffffff}
|
||||||
|
#pushButton_open_close:checked { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||||
|
color:#ffffff}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QRadioButton" name="radioButton_open_2">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>120</x>
|
||||||
|
<y>40</y>
|
||||||
|
<width>37</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>开</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_get">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>40</y>
|
||||||
|
<width>96</width>
|
||||||
|
<height>28</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>96</width>
|
||||||
|
<height>28</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">#pushButton_get { border-image: url(:/image/Btn/normal_Btn.png);
|
||||||
|
color:#1f5188 }
|
||||||
|
#pushButton_get:hover { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||||
|
color:#ffffff}
|
||||||
|
#pushButton_get:pressed { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||||
|
color:#ffffff}
|
||||||
|
#pushButton_get:checked { border-image: url(:/image/Btn/normal_Btn_p.png);
|
||||||
|
color:#ffffff}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>获取</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QRadioButton" name="radioButton_close_2">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>180</x>
|
||||||
|
<y>40</y>
|
||||||
|
<width>37</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>关</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -462,4 +574,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
<buttongroups>
|
||||||
|
<buttongroup name="buttonGroup"/>
|
||||||
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user