File indexing completed on 2024-07-14 09:00:24

0001 /*
0002     SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@redhat.com>
0003     SPDX-FileCopyrightText: 2013 Jan Grulich <jgrulich@redhat.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 #ifndef PLASMA_NM_SSIDCOMBOBOX_H
0009 #define PLASMA_NM_SSIDCOMBOBOX_H
0010 
0011 #include "plasmanm_editor_export.h"
0012 
0013 #include <KComboBox>
0014 
0015 #include <NetworkManagerQt/WirelessNetwork>
0016 
0017 class PLASMANM_EDITOR_EXPORT SsidComboBox : public KComboBox
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit SsidComboBox(QWidget *parent = nullptr);
0022 
0023     void init(const QString &ssid);
0024 
0025     QString ssid() const;
0026 
0027 Q_SIGNALS:
0028     void ssidChanged();
0029 
0030 private Q_SLOTS:
0031     void slotEditTextChanged(const QString &text);
0032     void slotCurrentIndexChanged(int);
0033 
0034 private:
0035     void addSsidsToCombo(const QList<NetworkManager::WirelessNetwork::Ptr> &networks);
0036     QString m_initialSsid;
0037 };
0038 
0039 #endif // PLASMA_NM_SSIDCOMBOBOX_H