File indexing completed on 2024-04-28 16:52:51

0001 /*
0002     SPDX-FileCopyrightText: 2009 Will Stephenson <wstephenson@kde.org>
0003     SPDX-FileCopyrightText: 2013 Lukáš Tinkl <ltinkl@redhat.com>
0004 
0005     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006 */
0007 
0008 #ifndef PPTPWIDGET_H
0009 #define PPTPWIDGET_H
0010 
0011 #include "passwordfield.h"
0012 #include "settingwidget.h"
0013 
0014 #include <NetworkManagerQt/VpnSetting>
0015 
0016 class PptpSettingWidgetPrivate;
0017 
0018 class PptpSettingWidget : public SettingWidget
0019 {
0020     Q_OBJECT
0021     Q_DECLARE_PRIVATE(PptpSettingWidget)
0022 public:
0023     explicit PptpSettingWidget(const NetworkManager::VpnSetting::Ptr &setting, QWidget *parent = nullptr);
0024     ~PptpSettingWidget() override;
0025 
0026     void loadConfig(const NetworkManager::Setting::Ptr &setting) override;
0027     void loadSecrets(const NetworkManager::Setting::Ptr &setting) override;
0028 
0029     QVariantMap setting() const override;
0030     bool isValid() const override;
0031 
0032 private Q_SLOTS:
0033     void doAdvancedDialog();
0034 
0035 private:
0036     PptpSettingWidgetPrivate *const d_ptr;
0037     void fillOnePasswordCombo(PasswordField *, NetworkManager::Setting::SecretFlags);
0038     void handleOnePasswordType(const PasswordField *, const QString &, NMStringMap &) const;
0039 };
0040 
0041 #endif // PPTPWIDGET_H