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

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_WIRED_SECURITY_H
0008 #define PLASMA_NM_WIRED_SECURITY_H
0009 
0010 #include "plasmanm_editor_export.h"
0011 
0012 #include <QWidget>
0013 
0014 #include <NetworkManagerQt/Security8021xSetting>
0015 
0016 #include "security802-1x.h"
0017 #include "settingwidget.h"
0018 
0019 namespace Ui
0020 {
0021 class WiredSecurity;
0022 }
0023 
0024 class PLASMANM_EDITOR_EXPORT WiredSecurity : public SettingWidget
0025 {
0026     Q_OBJECT
0027 public:
0028     explicit WiredSecurity(const NetworkManager::Security8021xSetting::Ptr &setting8021x = NetworkManager::Security8021xSetting::Ptr(),
0029                            QWidget *parent = nullptr,
0030                            Qt::WindowFlags f = {});
0031     ~WiredSecurity() override;
0032     void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
0033     void loadSecrets(const NetworkManager::Setting::Ptr &setting) override;
0034     QVariantMap setting() const override;
0035 
0036     bool enabled8021x() const;
0037 
0038 private:
0039     Ui::WiredSecurity *const m_ui;
0040     Security8021x *m_8021xWidget = nullptr;
0041     NetworkManager::Security8021xSetting::Ptr m_8021xSetting;
0042 };
0043 
0044 #endif // PLASMA_NM_WIRED_SECURITY_H