File indexing completed on 2025-02-16 08:18:44
0001 /* 0002 SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@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_WIFI_CONNECTION_WIDGET_H 0008 #define PLASMA_NM_WIFI_CONNECTION_WIDGET_H 0009 0010 #include "plasmanm_editor_export.h" 0011 0012 #include <QWidget> 0013 0014 #include <NetworkManagerQt/WirelessSetting> 0015 0016 #include "settingwidget.h" 0017 0018 namespace Ui 0019 { 0020 class WifiConnectionWidget; 0021 } 0022 0023 class PLASMANM_EDITOR_EXPORT WifiConnectionWidget : public SettingWidget 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 explicit WifiConnectionWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), 0029 QWidget *parent = nullptr, 0030 Qt::WindowFlags f = {}); 0031 ~WifiConnectionWidget() override; 0032 0033 void loadConfig(const NetworkManager::Setting::Ptr &setting) override; 0034 0035 QVariantMap setting() const override; 0036 0037 bool isValid() const override; 0038 0039 Q_SIGNALS: 0040 void ssidChanged(const QString &ssid); 0041 0042 private Q_SLOTS: 0043 void generateRandomClonedMac(); 0044 void ssidChanged(); 0045 void modeChanged(int mode); 0046 void bandChanged(int band); 0047 0048 private: 0049 Ui::WifiConnectionWidget *const m_ui; 0050 void fillChannels(NetworkManager::WirelessSetting::FrequencyBand band); 0051 }; 0052 0053 #endif // PLASMA_NM_WIFI_CONNECTION_WIDGET_H