• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • plasma
pluginloader.h
Go to the documentation of this file.
1/*
2 * Copyright 2010 by Ryan Rix <ry@n.rix.si>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License as
6 * published by the Free Software Foundation; either version 2, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20#ifndef PLUGIN_LOADER_H
21#define PLUGIN_LOADER_H
22
23#include <plasma/plasma.h>
24#include <kplugininfo.h>
25
26namespace Plasma {
27
28class Applet;
29class DataEngine;
30class Service;
31class AbstractRunner;
32
33class PluginLoaderPrivate;
34
35//TODO:
36// * add support for ContainmentActions plugins
37// * add KPluginInfo listing support for Containments (already loaded via the applet loading code)
38
51class PLASMA_EXPORT PluginLoader
52{
53public:
54 PluginLoader();
55
56 virtual ~PluginLoader();
57
67 Applet *loadApplet(const QString &name, uint appletId = 0,
68 const QVariantList &args = QVariantList());
69
76 DataEngine *loadDataEngine(const QString &name);
77
83 AbstractRunner *loadRunner(const QString &name);
84
94 Service *loadService(const QString &name, const QVariantList &args, QObject *parent = 0);
95
113 KPluginInfo::List listAppletInfo(const QString &category, const QString &parentApp = QString());
114
125 KPluginInfo::List listDataEngineInfo(const QString &parentApp = QString());
126
137 KPluginInfo::List listRunnerInfo(const QString &parentApp = QString());
138
145 static void setPluginLoader(PluginLoader* loader);
146
150 static PluginLoader* pluginLoader();
151
152protected:
166 virtual Applet *internalLoadApplet(const QString &name, uint appletId = 0,
167 const QVariantList &args = QVariantList());
168
179 virtual AbstractRunner *internalLoadRunner(const QString &name);
180
191 virtual DataEngine *internalLoadDataEngine(const QString &name);
192
206 virtual Service *internalLoadService(const QString &name, const QVariantList &args, QObject *parent = 0);
207
225 virtual KPluginInfo::List internalAppletInfo(const QString &category) const;
226
233 virtual KPluginInfo::List internalDataEngineInfo() const;
234
240 virtual KPluginInfo::List internalRunnerInfo() const;
241
247 virtual KPluginInfo::List internalServiceInfo() const;
248
264 KPluginInfo::List standardInternalAppletInfo(const QString &category) const;
265
275 KPluginInfo::List standardInternalDataEngineInfo() const;
276
286 KPluginInfo::List standardInternalRunnerInfo() const;
287
297 KPluginInfo::List standardInternalServiceInfo() const;
298
299private:
300 PluginLoaderPrivate * const d;
301};
302
303}
304
305Q_DECLARE_METATYPE(Plasma::PluginLoader*)
306
307#endif
Plasma::AbstractRunner
An abstract base class for Plasma Runner plugins.
Definition abstractrunner.h:64
Plasma::Applet
The base Applet class.
Definition applet.h:78
Plasma::DataEngine
Data provider for plasmoids (Plasma plugins)
Definition dataengine.h:59
Plasma::PluginLoader
This is an abstract base class which defines an interface to which Plasma's Applet Loading logic can ...
Definition pluginloader.h:52
Plasma::PluginLoader::internalLoadDataEngine
virtual DataEngine * internalLoadDataEngine(const QString &name)
A re-implementable method that allows subclasses to override the default behaviour of loadDataEngine.
Definition pluginloader.cpp:327
Plasma::PluginLoader::setPluginLoader
static void setPluginLoader(PluginLoader *loader)
Set the plugin loader which will be queried for all loads.
Definition pluginloader.cpp:58
Plasma::PluginLoader::internalServiceInfo
virtual KPluginInfo::List internalServiceInfo() const
Returns a list of all known Runner implementations.
Definition pluginloader.cpp:363
Plasma::PluginLoader::listAppletInfo
KPluginInfo::List listAppletInfo(const QString &category, const QString &parentApp=QString())
Returns a list of all known applets.
Definition pluginloader.cpp:247
Plasma::PluginLoader::standardInternalAppletInfo
KPluginInfo::List standardInternalAppletInfo(const QString &category) const
Standardized mechanism for providing internal Applets by install .desktop files in $APPPDATA/plasma/i...
Definition pluginloader.cpp:390
Plasma::PluginLoader::listDataEngineInfo
KPluginInfo::List listDataEngineInfo(const QString &parentApp=QString())
Returns a list of all known DataEngines.
Definition pluginloader.cpp:281
Plasma::PluginLoader::internalDataEngineInfo
virtual KPluginInfo::List internalDataEngineInfo() const
A re-implementable method that allows subclasses to provide additional DataEngines for DataEngineMana...
Definition pluginloader.cpp:353
Plasma::PluginLoader::loadService
Service * loadService(const QString &name, const QVariantList &args, QObject *parent=0)
Load a Service plugin.
Definition pluginloader.cpp:206
Plasma::PluginLoader::internalRunnerInfo
virtual KPluginInfo::List internalRunnerInfo() const
Returns a list of all known Runner implementations.
Definition pluginloader.cpp:358
Plasma::PluginLoader::standardInternalServiceInfo
KPluginInfo::List standardInternalServiceInfo() const
Standardized mechanism for providing internal Applets by install .desktop files in $APPPDATA/plasma/i...
Definition pluginloader.cpp:405
Plasma::PluginLoader::internalAppletInfo
virtual KPluginInfo::List internalAppletInfo(const QString &category) const
A re-implementable method that allows subclasses to provide additional applets for listAppletInfo.
Definition pluginloader.cpp:347
Plasma::PluginLoader::internalLoadService
virtual Service * internalLoadService(const QString &name, const QVariantList &args, QObject *parent=0)
A re-implementable method that allows subclasses to override the default behaviour of loadService.
Definition pluginloader.cpp:339
Plasma::PluginLoader::loadDataEngine
DataEngine * loadDataEngine(const QString &name)
Load a DataEngine plugin.
Definition pluginloader.cpp:161
Plasma::PluginLoader::listRunnerInfo
KPluginInfo::List listRunnerInfo(const QString &parentApp=QString())
Returns a list of all known Runner implementations.
Definition pluginloader.cpp:300
Plasma::PluginLoader::pluginLoader
static PluginLoader * pluginLoader()
Return the active plugin loader.
Definition pluginloader.cpp:67
Plasma::PluginLoader::standardInternalDataEngineInfo
KPluginInfo::List standardInternalDataEngineInfo() const
Standardized mechanism for providing internal Applets by install .desktop files in $APPPDATA/plasma/i...
Definition pluginloader.cpp:395
Plasma::PluginLoader::internalLoadApplet
virtual Applet * internalLoadApplet(const QString &name, uint appletId=0, const QVariantList &args=QVariantList())
A re-implementable method that allows subclasses to override the default behaviour of loadApplet.
Definition pluginloader.cpp:319
Plasma::PluginLoader::standardInternalRunnerInfo
KPluginInfo::List standardInternalRunnerInfo() const
Standardized mechanism for providing internal Applets by install .desktop files in $APPPDATA/plasma/i...
Definition pluginloader.cpp:400
Plasma::PluginLoader::loadApplet
Applet * loadApplet(const QString &name, uint appletId=0, const QVariantList &args=QVariantList())
Load an Applet plugin.
Definition pluginloader.cpp:79
Plasma::PluginLoader::PluginLoader
PluginLoader()
Definition pluginloader.cpp:48
Plasma::PluginLoader::loadRunner
AbstractRunner * loadRunner(const QString &name)
Load a Runner plugin.
Definition pluginloader.cpp:199
Plasma::PluginLoader::internalLoadRunner
virtual AbstractRunner * internalLoadRunner(const QString &name)
A re-implementable method that allows subclasses to override the default behaviour of loadRunner.
Definition pluginloader.cpp:333
Plasma::Service
This class provides a generic API for write access to settings or services.
Definition service.h:92
QObject
Plasma
Namespace for everything in libplasma.
Definition abstractdialogmanager.cpp:25
plasma.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal