Plasma5Support

pluginloader.h
1/*
2 SPDX-FileCopyrightText: 2010 Ryan Rix <ry@n.rix.si>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef PLUGIN_LOADER_H
8#define PLUGIN_LOADER_H
9
10#include <QString>
11#include <plasma5support/plasma5support_export.h>
12
13class KPluginMetaData;
14namespace Plasma5Support
15{
16class DataEngine;
17class Service;
18
19class PluginLoaderPrivate;
20
21/**
22 * @class PluginLoader plasma/pluginloader.h <Plasma/PluginLoader>
23 *
24 * This is an abstract base class which defines an interface to which Plasma's
25 * DataEngine and Service Loading logic can communicate with a parent application.
26 * This is deprecated api in KF6, use C++ based QML imports instead
27 */
28class PLASMA5SUPPORT_EXPORT PluginLoader
29{
30public:
31 /**
32 * Load a Service plugin.
33 *
34 * @param name the plugin name of the service to load
35 * @param args a list of arguments to supply to the service plugin when loading it
36 * @param parent the parent object, if any, for the service
37 *
38 * @return a Service object, unlike Plasma5Support::Service::loadService, this can return null.
39 **/
40 static Service *loadService(const QString &name, QObject *parent = nullptr);
41
42 /**
43 * Returns a list of all known dataengines.
44 *
45 * @param parentApp the application to filter dataengines on. Uses the
46 * X-KDE-ParentApp entry (if any) in the plugin info.
47 * The default value of QString() will result in a
48 * list of all dataengines
49 * @return list of dataengines
50 **/
51 static QList<KPluginMetaData> listDataEngineMetaData(const QString &parentApp = QString());
52
53private:
54 PluginLoader() = default;
55 virtual ~PluginLoader();
56 void *d;
57};
58
59}
60
61#endif
This is an abstract base class which defines an interface to which Plasma's DataEngine and Service Lo...
This class provides a generic API for write access to settings or services.
Definition service.h:78
Namespace for everything in libplasma.
Definition datamodel.cpp:15
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.