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

0001 /*
0002     SPDX-FileCopyrightText: 2011 Ilia Kats <ilia-kats@gmx.net>
0003     SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@redhat.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 #include "openconnectui.h"
0009 
0010 #include <KPluginFactory>
0011 
0012 #include "openconnectauth.h"
0013 #include "openconnectwidget.h"
0014 
0015 OpenconnectUiPlugin::OpenconnectUiPlugin(QObject *parent, const QVariantList &)
0016     : VpnUiPlugin(parent)
0017 {
0018 }
0019 
0020 OpenconnectUiPlugin::~OpenconnectUiPlugin() = default;
0021 
0022 SettingWidget *OpenconnectUiPlugin::widget(const NetworkManager::VpnSetting::Ptr &setting, QWidget *parent)
0023 {
0024     return new OpenconnectSettingWidget(setting, parent);
0025 }
0026 
0027 SettingWidget *OpenconnectUiPlugin::askUser(const NetworkManager::VpnSetting::Ptr &setting, const QStringList &hints, QWidget *parent)
0028 {
0029     return new OpenconnectAuthWidget(setting, hints, parent);
0030 }
0031 
0032 QString OpenconnectUiPlugin::suggestedFileName(const NetworkManager::ConnectionSettings::Ptr &connection) const
0033 {
0034     Q_UNUSED(connection);
0035     return {};
0036 }
0037 
0038 QMessageBox::StandardButtons OpenconnectUiPlugin::suggestedAuthDialogButtons() const
0039 {
0040     return QMessageBox::Close;
0041 }