File indexing completed on 2024-02-25 05:45:22

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 "plasmanm_editor_export.h"
0011 
0012 #include <NetworkManagerQt/Manager>
0013 #include <QMutex>
0014 #include <QObject>
0015 
0016 class PLASMANM_EDITOR_EXPORT Configuration : public QObject
0017 {
0018     Q_OBJECT
0019 public:
0020     bool unlockModemOnDetection() const;
0021     void setUnlockModemOnDetection(bool unlock);
0022 
0023     bool manageVirtualConnections() const;
0024     void setManageVirtualConnections(bool manage);
0025 
0026     bool airplaneModeEnabled() const;
0027     void setAirplaneModeEnabled(bool enabled);
0028 
0029     QString hotspotName() const;
0030     void setHotspotName(const QString &name);
0031 
0032     QString hotspotPassword() const;
0033     void setHotspotPassword(const QString &password);
0034 
0035     QString hotspotConnectionPath() const;
0036     void setHotspotConnectionPath(const QString &path);
0037 
0038     bool showPasswordDialog() const;
0039 
0040     bool systemConnectionsByDefault() const;
0041 
0042     static Configuration &self();
0043 
0044 Q_SIGNALS:
0045     void airplaneModeEnabledChanged();
0046     void manageVirtualConnectionsChanged(bool manage);
0047 
0048 private:
0049     Configuration() = default;
0050     static QMutex sMutex;
0051 };
0052 
0053 #endif // PLAMA_NM_CONFIGURATION_H