2024-08-26 16:46:41 +08:00
|
|
|
|
#ifndef __DATASTRUCTURE_H__
|
2024-08-16 16:24:15 +08:00
|
|
|
|
#define __DATASTRUCTURE_H__
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
#include <QQmlEngine>
|
|
|
|
|
|
|
|
|
|
struct NetworkInfomation {
|
|
|
|
|
Q_GADGET
|
|
|
|
|
QML_NAMED_ELEMENT(networkInfomation)
|
|
|
|
|
Q_PROPERTY(bool dhcp MEMBER dhcp)
|
|
|
|
|
Q_PROPERTY(QString ip MEMBER ip)
|
|
|
|
|
Q_PROPERTY(QString netmask MEMBER netmask)
|
|
|
|
|
Q_PROPERTY(QString gateway MEMBER gateway)
|
2024-08-22 10:48:28 +08:00
|
|
|
|
Q_PROPERTY(QString dns MEMBER dns)
|
2024-08-16 16:24:15 +08:00
|
|
|
|
public:
|
|
|
|
|
bool dhcp;
|
2024-08-21 16:03:49 +08:00
|
|
|
|
QString ip;
|
2024-08-16 16:24:15 +08:00
|
|
|
|
QString netmask;
|
|
|
|
|
QString gateway;
|
2024-08-22 12:28:11 +08:00
|
|
|
|
QString dns = "8.8.8.8"; // dns被屏蔽,现在默认赋值 8.8.8.8 以通过校验
|
2024-08-16 16:24:15 +08:00
|
|
|
|
};
|
|
|
|
|
Q_DECLARE_METATYPE(NetworkInfomation)
|
|
|
|
|
|
|
|
|
|
#endif // __DATASTRUCTURE_H__
|