|
|
@@ -144,7 +144,14 @@ void Widget::SetData(QLabel *pLab, QString strShow)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Widget::SetV(QString strShow){SetData(ui->label_8,strShow);SetData(ui->label_phV,strShow);}
|
|
|
+void Widget::SetV(QString strShow)
|
|
|
+{
|
|
|
+ SetData(ui->label_8,strShow);SetData(ui->label_phV,strShow);
|
|
|
+ if(m_nMonwayType==3)
|
|
|
+ {
|
|
|
+ SetData(ui->label_V,strShow);
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
void Widget::SetA(QString strShow){SetData(ui->label_13,strShow);SetData(ui->label_A,strShow);SetData(ui->label_phA,strShow);}
|
|
|
|
|
|
@@ -160,7 +167,13 @@ void Widget::SetCO2(QString strShow){SetData(ui->label_CO2,strShow+" PPM");}
|
|
|
|
|
|
void Widget::SetVer(QString strShow){SetData(ui->label_2,"Version:"+strShow);}
|
|
|
|
|
|
-void Widget::SetStatus(QString strShow){SetData(ui->label_V,strShow);}
|
|
|
+void Widget::SetStatus(QString strShow){
|
|
|
+ if(m_nMonwayType==2)
|
|
|
+ {
|
|
|
+ SetData(ui->label_V,strShow);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
void Widget::SetIP(QString strIP)
|
|
|
{
|
|
|
@@ -437,6 +450,18 @@ void Widget::CtrlBtnSet(int nIndex, int nData)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void Widget::setMAXChildIndex(int nIndex)
|
|
|
+{
|
|
|
+ if(m_nMonwayType==1)
|
|
|
+ {
|
|
|
+ nMAXChildIndex=0;
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ nMAXChildIndex=nIndex;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
void Widget::ShowMSGWidget(QString strShowData)
|
|
|
{
|
|
|
if(strShowData.isEmpty())
|
|
|
@@ -516,6 +541,36 @@ void Widget::adjustMSGWidgetPosition(bool isAuto)
|
|
|
qDebug() << "MSGWidget geometry:" << m_pMSGWidget->geometry();
|
|
|
}
|
|
|
|
|
|
+void Widget::setMonwayType(int nType)
|
|
|
+{
|
|
|
+ m_nMonwayType= nType;
|
|
|
+ switch (m_nMonwayType) {
|
|
|
+ case 1://总监控
|
|
|
+ {
|
|
|
+ nMAXChildIndex=0;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 3://分监视不控制
|
|
|
+ {
|
|
|
+ ui->label_34->setText("Volt(V):");
|
|
|
+ ui->label_V->setStyleSheet("");
|
|
|
+ SetData(ui->label_V,"0.00");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ {
|
|
|
+ ui->label_34->setText("Switch");
|
|
|
+ SetData(ui->label_V,"OFF");
|
|
|
+#ifdef RS485Type
|
|
|
+ ui->label_V->setStyleSheet("QLabel {color: rgb(0,255,255);}");
|
|
|
+#else
|
|
|
+ ui->label_V->setStyleSheet("QLabel {color: rgb(0,0,255);}");
|
|
|
+#endif
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
void Widget::resizeEvent(QResizeEvent *event)
|
|
|
{
|
|
|
if(m_pMSGWidget&&!m_pMSGWidget->isHidden())
|