2
* This file is part of system-settings
4
* Copyright (C) 2014-2016 Canonical Ltd.
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License version 3, as published
8
* by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranties of
12
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13
* PURPOSE. See the GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License along
16
* with this program. If not, see <http://www.gnu.org/licenses/>.
19
* Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
22
#ifndef MOCK_NETWORKINGSTATUS_H
23
#define MOCK_NETWORKINGSTATUS_H
28
class Q_DECL_EXPORT MockNetworkingStatus : public QObject
31
Q_DISABLE_COPY(MockNetworkingStatus)
36
Q_PROPERTY(QVector<Limitations> limitations READ limitations NOTIFY limitationsChanged)
37
Q_PROPERTY(Status status READ status NOTIFY statusChanged)
38
Q_PROPERTY(bool online READ online NOTIFY onlineChanged)
39
Q_PROPERTY(bool limitedBandwith READ limitedBandwith WRITE setLimitedBandwidth NOTIFY limitedBandwithChanged)
42
explicit MockNetworkingStatus(QObject *parent = 0);
43
virtual ~MockNetworkingStatus();
55
QVector<Limitations> limitations() const;
56
Status status() const;
58
bool limitedBandwith() const;
60
void setLimitedBandwidth(bool limited); // mock only
61
Q_INVOKABLE void setStatus(Status status); // mock only
64
void limitationsChanged();
65
void statusChanged(Status value);
66
void onlineChanged(bool value);
67
void limitedBandwithChanged(bool value);
70
QVector<MockNetworkingStatus::Limitations> m_limitations;
74
Q_DECLARE_METATYPE(MockNetworkingStatus::Limitations)
75
Q_DECLARE_METATYPE(QVector<MockNetworkingStatus::Limitations>)
76
Q_DECLARE_METATYPE(MockNetworkingStatus::Status)
78
#endif // MOCK_NETWORKINGSTATUS_H