Warning, file /plasma/plasma-nm/libs/declarative/enabledconnections.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2013 Jan Grulich <jgrulich@redhat.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef PLASMA_NM_ENABLED_CONNECTIONS_H 0008 #define PLASMA_NM_ENABLED_CONNECTIONS_H 0009 0010 #include <QObject> 0011 0012 #include <NetworkManagerQt/Manager> 0013 0014 class EnabledConnections : public QObject 0015 { 0016 /** 0017 * Indicates if overall networking is currently enabled or not 0018 */ 0019 Q_PROPERTY(bool networkingEnabled READ isNetworkingEnabled NOTIFY networkingEnabled) 0020 /** 0021 * Indicates if wireless is currently enabled or not 0022 */ 0023 Q_PROPERTY(bool wirelessEnabled READ isWirelessEnabled NOTIFY wirelessEnabled) 0024 /** 0025 * Indicates if the wireless hardware is currently enabled, i.e. the state of the RF kill switch 0026 */ 0027 Q_PROPERTY(bool wirelessHwEnabled READ isWirelessHwEnabled NOTIFY wirelessHwEnabled) 0028 /** 0029 * Indicates if mobile broadband devices are currently enabled or not. 0030 */ 0031 Q_PROPERTY(bool wwanEnabled READ isWwanEnabled NOTIFY wwanEnabled) 0032 /** 0033 * Indicates if the mobile broadband hardware is currently enabled, i.e. the state of the RF kill switch. 0034 */ 0035 Q_PROPERTY(bool wwanHwEnabled READ isWwanHwEnabled NOTIFY wwanHwEnabled) 0036 0037 Q_OBJECT 0038 public: 0039 explicit EnabledConnections(QObject *parent = nullptr); 0040 ~EnabledConnections() override; 0041 0042 bool isNetworkingEnabled() const; 0043 bool isWirelessEnabled() const; 0044 bool isWirelessHwEnabled() const; 0045 bool isWwanEnabled() const; 0046 bool isWwanHwEnabled() const; 0047 0048 public Q_SLOTS: 0049 void onNetworkingEnabled(bool enabled); 0050 void onWirelessEnabled(bool enabled); 0051 void onWirelessHwEnabled(bool enabled); 0052 void onWwanEnabled(bool enabled); 0053 void onWwanHwEnabled(bool enabled); 0054 0055 Q_SIGNALS: 0056 void networkingEnabled(bool enabled); 0057 void wirelessEnabled(bool enabled); 0058 void wirelessHwEnabled(bool enabled); 0059 void wwanEnabled(bool enabled); 0060 void wwanHwEnabled(bool enabled); 0061 0062 private: 0063 bool m_networkingEnabled; 0064 bool m_wirelessEnabled; 0065 bool m_wirelessHwEnabled; 0066 bool m_wwanEnabled; 0067 bool m_wwanHwEnabled; 0068 }; 0069 0070 #endif // PLASMA_NM_ENABLED_CONNECTIONS_H