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

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_BSSIDCOMBOBOX_H
0009 #define PLASMA_NM_BSSIDCOMBOBOX_H
0010 
0011 #include "plasmanm_editor_export.h"
0012 
0013 #include <QComboBox>
0014 
0015 #include <NetworkManagerQt/AccessPoint>
0016 #include <NetworkManagerQt/Device>
0017 
0018 class PLASMANM_EDITOR_EXPORT BssidComboBox : public QComboBox
0019 {
0020     Q_OBJECT
0021 public:
0022     explicit BssidComboBox(QWidget *parent = nullptr);
0023 
0024     QString bssid() const;
0025     bool isValid() const;
0026 
0027 Q_SIGNALS:
0028     void bssidChanged();
0029 
0030 public Q_SLOTS:
0031     void init(const QString &bssid, const QString &ssid);
0032 
0033 private Q_SLOTS:
0034     void slotEditTextChanged(const QString &);
0035     void slotCurrentIndexChanged(int);
0036 
0037 private:
0038     void addBssidsToCombo(const QList<NetworkManager::AccessPoint::Ptr> &aps);
0039 
0040     QString m_initialBssid;
0041     bool m_dirty = false;
0042 };
0043 
0044 #endif // PLASMA_NM_BSSIDCOMBOBOX_H