Purpose

pluginbase.h
1/*
2 SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef PURPOSE_PLUGINBASE_H
8#define PURPOSE_PLUGINBASE_H
9
10#include "job.h"
11#include <kcoreaddons_export.h>
12
13#include <QObject>
14
15namespace Purpose
16{
17/**
18 * @brief Base class to implement by plugins
19 *
20 * Class for Qt native plugins to extend. Plugins will just be issuing jobs
21 * that will be configured then started.
22 *
23 * See README.md on how to create plugins on technologies different
24 * to Qt.
25 *
26 * @note This file shouldn't be included by any application.
27 */
28class PURPOSE_EXPORT PluginBase : public QObject
29{
30 Q_OBJECT
31public:
32 explicit PluginBase(QObject *parent = nullptr);
33 ~PluginBase() override;
34
35 /** @returns the job that will perform the plugin's action. */
36 virtual Job *createJob() const = 0;
37};
38
39}
40
41Q_DECLARE_INTERFACE(Purpose::PluginBase, "org.kde.purpose")
42
43#endif
Job that will actually perform the sharing.
Definition job.h:34
Base class to implement by plugins.
Definition pluginbase.h:29
virtual Job * createJob() const =0
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:05 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.