summaryrefslogtreecommitdiffstats
path: root/network/wifinetworkmodel.h
blob: 381350379d8e6dd55125f9bee9b9cf4b1c840dd1 (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
33
#ifndef WIFI_NETWORK_MODEL_H
#define WIFI_NETWORK_MODEL_H

#include "abstractnetworkmodel.h"

class WifiNetworkModel : public AbstractNetworkModel
{
	Q_OBJECT

public:
        enum WifiNetworkRoles {
		AddressRole = Qt::UserRole + 1,
		SecurityRole,
		ServiceRole,
		StateRole,
		SsidRole,
		StrengthRole
        };

        WifiNetworkModel(QObject *parent = Q_NULLPTR);

        QString getType() const override { return "wifi"; }
        QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
        void updateProperties(const QString &service, const QVariantMap &properties) override;

signals:
        void strengthChanged(int strength);

protected:
        QHash<int, QByteArray> roleNames() const;

};
#endif // WIFI_NETWORK_MODEL_H