Changeset View
Changeset View
Standalone View
Standalone View
libs/declarative/connectionicon.h
Show All 28 Lines | |||||
29 | #include <ModemManagerQt/modem.h> | 29 | #include <ModemManagerQt/modem.h> | ||
30 | #endif | 30 | #endif | ||
31 | 31 | | |||
32 | class ConnectionIcon : public QObject | 32 | class ConnectionIcon : public QObject | ||
33 | { | 33 | { | ||
34 | Q_PROPERTY(bool connecting READ connecting NOTIFY connectingChanged) | 34 | Q_PROPERTY(bool connecting READ connecting NOTIFY connectingChanged) | ||
35 | Q_PROPERTY(QString connectionIcon READ connectionIcon NOTIFY connectionIconChanged) | 35 | Q_PROPERTY(QString connectionIcon READ connectionIcon NOTIFY connectionIconChanged) | ||
36 | Q_PROPERTY(QString connectionTooltipIcon READ connectionTooltipIcon NOTIFY connectionTooltipIconChanged) | 36 | Q_PROPERTY(QString connectionTooltipIcon READ connectionTooltipIcon NOTIFY connectionTooltipIconChanged) | ||
37 | | ||||
38 | Q_PROPERTY(bool airplaneMode READ airplaneMode WRITE setAirplaneMode NOTIFY airplaneModeChanged) | | |||
39 | Q_OBJECT | 37 | Q_OBJECT | ||
40 | public: | 38 | public: | ||
41 | explicit ConnectionIcon(QObject* parent = nullptr); | 39 | explicit ConnectionIcon(QObject* parent = nullptr); | ||
42 | ~ConnectionIcon() override; | 40 | ~ConnectionIcon() override; | ||
43 | 41 | | |||
44 | bool connecting() const; | 42 | bool connecting() const; | ||
45 | QString connectionIcon() const; | 43 | QString connectionIcon() const; | ||
46 | QString connectionTooltipIcon() const; | 44 | QString connectionTooltipIcon() const; | ||
47 | 45 | | |||
48 | bool airplaneMode() const; | | |||
49 | void setAirplaneMode(bool airplaneMode); | | |||
50 | | ||||
51 | private Q_SLOTS: | 46 | private Q_SLOTS: | ||
52 | void activatingConnectionChanged(const QString & connection); | 47 | void activatingConnectionChanged(const QString & connection); | ||
53 | void activeConnectionAdded(const QString & activeConnection); | 48 | void activeConnectionAdded(const QString & activeConnection); | ||
54 | void activeConnectionDestroyed(); | 49 | void activeConnectionDestroyed(); | ||
55 | void activeConnectionStateChanged(NetworkManager::ActiveConnection::State state); | 50 | void activeConnectionStateChanged(NetworkManager::ActiveConnection::State state); | ||
56 | void carrierChanged(bool carrier); | 51 | void carrierChanged(bool carrier); | ||
57 | void connectivityChanged(); | 52 | void connectivityChanged(); | ||
58 | void deviceAdded(const QString & device); | 53 | void deviceAdded(const QString & device); | ||
Show All 27 Lines | 74 | private: | |||
86 | uint m_signal; | 81 | uint m_signal; | ||
87 | NetworkManager::WirelessNetwork::Ptr m_wirelessNetwork; | 82 | NetworkManager::WirelessNetwork::Ptr m_wirelessNetwork; | ||
88 | 83 | | |||
89 | bool m_connecting; | 84 | bool m_connecting; | ||
90 | bool m_limited; | 85 | bool m_limited; | ||
91 | bool m_vpn; | 86 | bool m_vpn; | ||
92 | QString m_connectionIcon; | 87 | QString m_connectionIcon; | ||
93 | QString m_connectionTooltipIcon; | 88 | QString m_connectionTooltipIcon; | ||
94 | bool m_airplaneMode; | | |||
95 | 89 | | |||
96 | void setDisconnectedIcon(); | 90 | void setDisconnectedIcon(); | ||
97 | void setIcons(); | 91 | void setIcons(); | ||
98 | void setStates(); | 92 | void setStates(); | ||
99 | void setWirelessIcon(const NetworkManager::Device::Ptr & device, const QString & ssid); | 93 | void setWirelessIcon(const NetworkManager::Device::Ptr & device, const QString & ssid); | ||
100 | #if WITH_MODEMMANAGER_SUPPORT | 94 | #if WITH_MODEMMANAGER_SUPPORT | ||
101 | ModemManager::Modem::Ptr m_modemNetwork; | 95 | ModemManager::Modem::Ptr m_modemNetwork; | ||
102 | void setModemIcon(const NetworkManager::Device::Ptr & device); | 96 | void setModemIcon(const NetworkManager::Device::Ptr & device); | ||
103 | #endif | 97 | #endif | ||
104 | }; | 98 | }; | ||
105 | 99 | | |||
106 | #endif // PLASMA_NM_CONNECTION_ICON_H | 100 | #endif // PLASMA_NM_CONNECTION_ICON_H |