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