Affichage du MAC Address
Ajout de l'affichage du MAC Address dans la page des paramètres Modbus
This commit is contained in:
parent
fcfa86a27b
commit
83ef8cbad9
@ -76,10 +76,10 @@ ENGLOG=3
|
||||
#STATION=ANGRIGNON
|
||||
#STATION=HENRI_BOURASSA
|
||||
#STATION=COTE_VERTU
|
||||
STATION=BERRI_UQAM
|
||||
#STATION=BERRI_UQAM
|
||||
#STATION=LONGUEIL
|
||||
#STATION=SAINT_MICHEL
|
||||
#STATION=SNOWDON_L5
|
||||
STATION=SNOWDON_L5
|
||||
#STATION=MONTMORENCY
|
||||
#STATION=MONTMORENCY_10_12
|
||||
#STATION=MONTMORENCY_10_22
|
||||
|
||||
Binary file not shown.
@ -36,8 +36,10 @@
|
||||
#include <QFont>
|
||||
#include <QGraphicsProxyWidget>
|
||||
#include <QMessageBox>
|
||||
#include <QNetworkInterface>
|
||||
//#include <sys/time.h>
|
||||
#include "ZTLog.h"
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
|
||||
@ -133,6 +135,14 @@ CModbusSettingsPage::CModbusSettingsPage(QGraphicsWidget *Parent)
|
||||
Proxy->setPos(100,100);
|
||||
connect(mUseModbusChkBox,SIGNAL(stateChanged(int)),this,SLOT(CheckBoxStatedChanged(int)));
|
||||
|
||||
|
||||
|
||||
IpSettingsPosx = 100, IpSettingsPosy = 250;
|
||||
mMACAddress = new QGraphicsTextItem("Adresse MAC: xx:xx:xx:xx",this);
|
||||
mMACAddress->setFont(font);
|
||||
mMACAddress->setPos(IpSettingsPosx,IpSettingsPosy);
|
||||
|
||||
|
||||
IpSettingsPosx = 100;
|
||||
IpSettingsPosy += 50;
|
||||
font.setPointSize(14);
|
||||
@ -222,6 +232,12 @@ int CModbusSettingsPage::SetActualSettings(bool UseModbus, QHostAddress CCHostAd
|
||||
mIPChunk1->setValue(add & 0x000000FF);
|
||||
|
||||
mApplyButton->hide();
|
||||
|
||||
QNetworkInterface IfInfo = QNetworkInterface::interfaceFromName("eth0");
|
||||
QString MacAddress = IfInfo.hardwareAddress();
|
||||
|
||||
mMACAddress->setPlainText(MacAddress.prepend("Adresse MAC: " ));
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ private:
|
||||
QSpinBox *mIPChunk1, *mIPChunk2, *mIPChunk3, *mIPChunk4;
|
||||
QString mCurIP;
|
||||
QCheckBox *mUseModbusChkBox;
|
||||
QGraphicsTextItem *mModbusCCConnectionState, *mModbusCCLinkState;
|
||||
QGraphicsTextItem *mMACAddress, *mModbusCCConnectionState, *mModbusCCLinkState;
|
||||
QGraphicsPixmapItem *mCCConnectionLED, *mCCModbusLinkLED;
|
||||
|
||||
void ShowApplyButton();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user