File indexing completed on 2023-05-30 09:17:25

0001 /**
0002  * SPDX-FileCopyrightText: 2015 Albert Vaca <albertvaka@gmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #ifndef KDECONNECTPLUGINKCM_H
0008 #define KDECONNECTPLUGINKCM_H
0009 
0010 #include <KCModule>
0011 
0012 #include "core/kdeconnectpluginconfig.h"
0013 #include "kdeconnectpluginkcm_export.h"
0014 
0015 struct KdeConnectPluginKcmPrivate;
0016 
0017 /**
0018  * Inheriting your plugin's KCM from this class gets you a easy way to share
0019  * configuration values between the KCM and the plugin.
0020  */
0021 class KDECONNECTPLUGINKCM_EXPORT KdeConnectPluginKcm : public KCModule
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     KdeConnectPluginKcm(QWidget *parent, const QVariantList &args, const QString &componentName);
0027     ~KdeConnectPluginKcm() override;
0028 
0029     /**
0030      * The device this kcm is instantiated for
0031      */
0032     QString deviceId() const;
0033 
0034     /**
0035      * The object where to save the config, so the plugin can access it
0036      */
0037     KdeConnectPluginConfig *config() const;
0038 
0039 private:
0040     QScopedPointer<KdeConnectPluginKcmPrivate> d;
0041 };
0042 
0043 #endif