File indexing completed on 2024-09-15 10:38:48
0001 /* 0002 SPDX-FileCopyrightText: 2017 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_CONFIGURATION_H 0008 #define PLASMA_NM_CONFIGURATION_H 0009 0010 #include <NetworkManagerQt/Manager> 0011 #include <QMutex> 0012 #include <QObject> 0013 0014 class Q_DECL_EXPORT Configuration : public QObject 0015 { 0016 Q_OBJECT 0017 public: 0018 bool unlockModemOnDetection() const; 0019 void setUnlockModemOnDetection(bool unlock); 0020 0021 bool manageVirtualConnections() const; 0022 void setManageVirtualConnections(bool manage); 0023 0024 bool airplaneModeEnabled() const; 0025 void setAirplaneModeEnabled(bool enabled); 0026 0027 QString hotspotName() const; 0028 void setHotspotName(const QString &name); 0029 0030 QString hotspotPassword() const; 0031 void setHotspotPassword(const QString &password); 0032 0033 QString hotspotConnectionPath() const; 0034 void setHotspotConnectionPath(const QString &path); 0035 0036 bool showPasswordDialog() const; 0037 0038 bool systemConnectionsByDefault() const; 0039 0040 static Configuration &self(); 0041 0042 Q_SIGNALS: 0043 void airplaneModeEnabledChanged(); 0044 void manageVirtualConnectionsChanged(bool manage); 0045 0046 private: 0047 Configuration() = default; 0048 static QMutex sMutex; 0049 }; 0050 0051 #endif // PLAMA_NM_CONFIGURATION_H