File indexing completed on 2024-07-14 05:24:11

0001 /*
0002     SPDX-FileCopyrightText: 2016 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_CONNECTION_EDITOR_TAB_WIDGET_H
0008 #define PLASMA_NM_CONNECTION_EDITOR_TAB_WIDGET_H
0009 
0010 #include "plasmanm_editor_export.h"
0011 
0012 #include "connectioneditorbase.h"
0013 
0014 #include <QDBusPendingCallWatcher>
0015 #include <QDialog>
0016 
0017 namespace Ui
0018 {
0019 class ConnectionEditorTabWidget;
0020 }
0021 
0022 class PLASMANM_EDITOR_EXPORT ConnectionEditorTabWidget : public ConnectionEditorBase
0023 {
0024     Q_OBJECT
0025 public:
0026     explicit ConnectionEditorTabWidget(const NetworkManager::ConnectionSettings::Ptr &connection,
0027                                        QWidget *parent = nullptr,
0028                                        Qt::WindowFlags f = Qt::WindowFlags());
0029     ~ConnectionEditorTabWidget() override;
0030 
0031     void setConnection(const NetworkManager::ConnectionSettings::Ptr &connection) override;
0032 
0033 protected:
0034     void addWidget(QWidget *widget, const QString &text) override;
0035     QString connectionName() const override;
0036 
0037 private:
0038     Ui::ConnectionEditorTabWidget *const m_ui;
0039 
0040     void initializeTabWidget(const NetworkManager::ConnectionSettings::Ptr &connection);
0041 };
0042 
0043 #endif // PLASMA_NM_CONNECTION_EDITOR_TAB_WIDGET_H