summaryrefslogtreecommitdiffstats
path: root/network/wifinetworkmodel.h
blob: 94cc7f5ebb31714be536254437127b517f404c4d (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(QString service, QJsonObject properties) override;

    signals:
        void strengthChanged(int strength);

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

};
#endif // WIFI_NETWORK_MODEL_H