parent
d6a09759fe
commit
04a887578d
@ -0,0 +1,11 @@
|
|||||||
|
#include "networkinterface.h"
|
||||||
|
|
||||||
|
NetworkInterface::NetworkInterface(const QNetworkInterface& networkInterface, QObject *parent)
|
||||||
|
: QObject(parent), m_networkInterface(networkInterface)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QString NetworkInterface::name() const
|
||||||
|
{
|
||||||
|
return m_networkInterface.name();
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef NETWORKINTERFACE_H
|
||||||
|
#define NETWORKINTERFACE_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QNetworkInterface>
|
||||||
|
|
||||||
|
class NetworkInterface : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit NetworkInterface(const QNetworkInterface& networkInterface, QObject *parent = nullptr);
|
||||||
|
Q_INVOKABLE QString name() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QNetworkInterface m_networkInterface;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // NETWORKINTERFACE_H
|
Loading…
Reference in new issue