File indexing completed on 2025-04-20 05:03:19
0001 /* 0002 SPDX-FileCopyrightText: 2013 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_WIRED_CONNECTION_WIDGET_H 0008 #define PLASMA_NM_WIRED_CONNECTION_WIDGET_H 0009 0010 #include "plasmanm_editor_export.h" 0011 0012 #include <QWidget> 0013 0014 #include "settingwidget.h" 0015 0016 namespace Ui 0017 { 0018 class WiredConnectionWidget; 0019 } 0020 0021 class PLASMANM_EDITOR_EXPORT WiredConnectionWidget : public SettingWidget 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 enum LinkNegotiation { 0027 Ignore = 0, 0028 Automatic, 0029 Manual, 0030 }; 0031 0032 enum Duplex { 0033 Half = 0, 0034 Full, 0035 }; 0036 0037 explicit WiredConnectionWidget(const NetworkManager::Setting::Ptr &setting, QWidget *parent = nullptr, Qt::WindowFlags f = {}); 0038 ~WiredConnectionWidget() override; 0039 0040 void loadConfig(const NetworkManager::Setting::Ptr &setting) override; 0041 0042 QVariantMap setting() const override; 0043 0044 bool isValid() const override; 0045 0046 private Q_SLOTS: 0047 void generateRandomClonedMac(); 0048 0049 private: 0050 Ui::WiredConnectionWidget *const m_widget; 0051 }; 0052 0053 #endif // PLASMA_NM_WIRED_CONNECTION_WIDGET_H