File indexing completed on 2024-04-28 07:49:50
0001 /* 0002 SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #ifndef PURPOSE_PLUGINBASE_H 0008 #define PURPOSE_PLUGINBASE_H 0009 0010 #include "job.h" 0011 #include <kcoreaddons_export.h> 0012 0013 #include <QObject> 0014 0015 namespace Purpose 0016 { 0017 /** 0018 * @brief Base class to implement by plugins 0019 * 0020 * Class for Qt native plugins to extend. Plugins will just be issuing jobs 0021 * that will be configured then started. 0022 * 0023 * See README.md on how to create plugins on technologies different 0024 * to Qt. 0025 * 0026 * @note This file shouldn't be included by any application. 0027 */ 0028 class PURPOSE_EXPORT PluginBase : public QObject 0029 { 0030 Q_OBJECT 0031 public: 0032 explicit PluginBase(QObject *parent = nullptr); 0033 ~PluginBase() override; 0034 0035 /** @returns the job that will perform the plugin's action. */ 0036 virtual Job *createJob() const = 0; 0037 }; 0038 0039 } 0040 0041 Q_DECLARE_INTERFACE(Purpose::PluginBase, "org.kde.purpose") 0042 0043 #endif