File indexing completed on 2024-12-01 11:13:10

0001 /*
0002     SPDX-FileCopyrightText: 2019 Bruce Anderson <banderson19com@san.rr.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_WIREGUARD_TAB_WIDGET_H
0008 #define PLASMA_NM_WIREGUARD_TAB_WIDGET_H
0009 
0010 #include <QDialog>
0011 
0012 #include <NetworkManagerQt/WireguardSetting>
0013 
0014 class Q_DECL_EXPORT WireGuardTabWidget : public QDialog
0015 {
0016     Q_OBJECT
0017 
0018 public:
0019     explicit WireGuardTabWidget(const NMVariantMapList &peerData, QWidget *parent = nullptr, Qt::WindowFlags f = {});
0020     ~WireGuardTabWidget() override;
0021 
0022     enum EndPointValid { BothValid, AddressValid, PortValid, BothInvalid };
0023 
0024     void loadConfig(const NMVariantMapList &peerData);
0025 
0026     NMVariantMapList setting() const;
0027 
0028     void slotAddPeer();
0029     void slotAddPeerWithData(const QVariantMap &peerData);
0030     void slotRemovePeer();
0031 
0032 private:
0033     void slotWidgetChanged();
0034 
0035     class Private;
0036     Private *const d;
0037 };
0038 
0039 #endif // PLASMA_NM_WIREGUARD_TAB_WIDGET_H