File indexing completed on 2024-04-21 04:58:35

0001 /*
0002     SPDX-FileCopyrightText: 2008 Urs Wolfer <uwolfer@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "rdppreferences.h"
0008 #include "remoteviewfactory.h"
0009 #include "settings.h"
0010 
0011 #include "ui_rdppreferences.h"
0012 
0013 K_PLUGIN_CLASS(RdpPreferences)
0014 
0015 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0016 RdpPreferences::RdpPreferences(QWidget *parent, const QVariantList &args)
0017     : KCModule(parent, args)
0018 #else
0019 RdpPreferences::RdpPreferences(QObject *parent)
0020     : KCModule(parent)
0021 #endif
0022 {
0023     Ui::RdpPreferences rdpUi;
0024 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0025     rdpUi.setupUi(this);
0026 #else
0027     rdpUi.setupUi(widget());
0028 #endif
0029     // would need a lot of code duplication. find a solution, but it's not
0030     // that important because you will not change this configuration each day...
0031     // see rdp/rdphostpreferences.cpp
0032     rdpUi.kcfg_Resolution->hide();
0033     rdpUi.kcfg_Height->setEnabled(true);
0034     rdpUi.kcfg_Width->setEnabled(true);
0035     rdpUi.heightLabel->setEnabled(true);
0036     rdpUi.widthLabel->setEnabled(true);
0037 
0038 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0039     addConfig(Settings::self(), this);
0040 #else
0041     addConfig(Settings::self(), widget());
0042 #endif
0043 }
0044 
0045 RdpPreferences::~RdpPreferences()
0046 {
0047 }
0048 
0049 void RdpPreferences::load()
0050 {
0051     KCModule::load();
0052 }
0053 
0054 void RdpPreferences::save()
0055 {
0056     KCModule::save();
0057 }
0058 
0059 #include "rdppreferences.moc"