blob: c8ea92d3dd006304c915260f38ad2ba3da6cf491 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef WIRED_NETWORK_MODEL_H
#define WIRED_NETWORK_MODEL_H
#include "abstractnetworkmodel.h"
class WiredNetworkModel : public AbstractNetworkModel
{
Q_OBJECT
public:
enum WiredNetworkRoles {
AddressRole = Qt::UserRole + 1,
SecurityRole,
ServiceRole,
StateRole,
RouteRole,
NameServerRole,
};
WiredNetworkModel(QObject *parent = Q_NULLPTR);
Q_INVOKABLE QVariantList readCurrentRouteConfig(const QModelIndex &index) const;
Q_INVOKABLE QVariantList readCurrentNameServerConfig(const QModelIndex &index) const;
QString getType() const override { return "wired"; }
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
void updateProperties(QString service, QJsonObject properties) override;
protected:
QHash<int, QByteArray> roleNames() const;
};
#endif // WIRED_NETWORK_MODEL_H
|