2010-07-15 21:06:21 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2010 by Ryan Rix <ry@n.rix.si>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Library General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this program; if not, write to the
|
|
|
|
* Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PLUGIN_LOADER_H
|
|
|
|
#define PLUGIN_LOADER_H
|
|
|
|
|
2011-07-13 20:20:36 +02:00
|
|
|
#include <plasma/package.h>
|
2010-07-15 21:06:21 +00:00
|
|
|
#include <plasma/plasma.h>
|
Moving Plasma::Applet::listAppletInfo into the PluginLoader logic. Also implemented internalAppletNames which, if implemented, will return a QStringList of the available applets' names. PluginLoader::listAppletInfo will then search for .desktop files in $APPDATA/plasma/applets/ which match the applets' names (ie. $APPDATA/plasma/applets/org.skrooge.report.desktop), and add them to the KPluginInfo::List returned by PluginLoader::listAppletInfo and subsequently Plasma::Applet::listAppletInfo.
Since the applets are dynamically loaded, the .desktop files don't need an X-KDE-Library entries, but the others will be used, for example X-KDE-PluginInfo-Name (which will be the value given to PluginLoader::internalAppletLoad, so it is really important), Icon, Type, ServiceTypes...
svn path=/trunk/KDE/kdelibs/; revision=1154551
2010-07-25 20:56:03 +00:00
|
|
|
#include <kplugininfo.h>
|
2010-07-15 21:06:21 +00:00
|
|
|
|
2014-04-26 01:45:47 +02:00
|
|
|
namespace Plasma
|
|
|
|
{
|
2010-07-15 21:06:21 +00:00
|
|
|
|
|
|
|
class Applet;
|
2011-07-19 21:39:51 +02:00
|
|
|
class Containment;
|
|
|
|
class ContainmentActions;
|
2010-07-15 21:06:21 +00:00
|
|
|
class DataEngine;
|
|
|
|
class Service;
|
|
|
|
|
|
|
|
class PluginLoaderPrivate;
|
|
|
|
|
2010-08-03 01:35:32 +00:00
|
|
|
//TODO:
|
2011-07-19 22:04:22 +02:00
|
|
|
// * add loadWallpaper
|
2010-08-03 01:35:32 +00:00
|
|
|
// * add KPluginInfo listing support for Containments (already loaded via the applet loading code)
|
|
|
|
|
2010-07-15 21:06:21 +00:00
|
|
|
/**
|
2017-05-26 19:55:09 +02:00
|
|
|
* @class PluginLoader plasma/pluginloader.h <Plasma/PluginLoader>
|
|
|
|
*
|
2014-04-26 01:45:47 +02:00
|
|
|
* This is an abstract base class which defines an interface to which Plasma's
|
2010-07-15 21:11:20 +00:00
|
|
|
* Applet Loading logic can communicate with a parent application. The plugin loader
|
|
|
|
* must be set before any plugins are loaded, otherwise (for safety reasons), the
|
2011-01-19 00:33:01 +00:00
|
|
|
* default PluginLoader implementation will be used. The reimplemented version should
|
|
|
|
* not do more than simply returning a loaded plugin. It should not init() it, and it should not
|
|
|
|
* hang on to it. The associated methods will be called only when a component of Plasma
|
2012-10-02 19:28:58 +02:00
|
|
|
* needs to load a _new_ plugin. (e.g. DataEngine does its own caching).
|
2011-01-19 00:33:01 +00:00
|
|
|
*
|
2010-07-15 21:06:21 +00:00
|
|
|
* @author Ryan Rix <ry@n.rix.si>
|
|
|
|
* @since 4.6
|
|
|
|
**/
|
|
|
|
class PLASMA_EXPORT PluginLoader
|
|
|
|
{
|
2014-04-26 01:45:47 +02:00
|
|
|
public:
|
2010-07-15 21:06:21 +00:00
|
|
|
/**
|
2010-07-15 21:54:06 +00:00
|
|
|
* Load an Applet plugin.
|
2010-07-15 21:06:21 +00:00
|
|
|
*
|
|
|
|
* @param name the plugin name, as returned by KPluginInfo::pluginName()
|
|
|
|
* @param appletId unique ID to assign the applet, or zero to have one
|
|
|
|
* assigned automatically.
|
|
|
|
* @param args to send the applet extra arguments
|
|
|
|
* @return a pointer to the loaded applet, or 0 on load failure
|
|
|
|
**/
|
2010-07-15 21:54:06 +00:00
|
|
|
Applet *loadApplet(const QString &name, uint appletId = 0,
|
|
|
|
const QVariantList &args = QVariantList());
|
2010-07-15 21:11:20 +00:00
|
|
|
|
2010-07-15 21:06:21 +00:00
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* Load a dataengine plugin.
|
2010-07-15 21:06:21 +00:00
|
|
|
*
|
|
|
|
* @param name the name of the engine
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return the dataengine that was loaded, or the NullEngine on failure.
|
2010-07-15 21:06:21 +00:00
|
|
|
**/
|
2010-07-15 21:54:06 +00:00
|
|
|
DataEngine *loadDataEngine(const QString &name);
|
2010-07-15 21:11:20 +00:00
|
|
|
|
2013-04-04 17:33:55 +02:00
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return a listing of all known dataengines by name
|
2013-04-04 17:33:55 +02:00
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @param parentApp the application to filter dataengines on. Uses the
|
2013-04-04 17:33:55 +02:00
|
|
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
|
|
|
* The default value of QString() will result in a
|
pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.
In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.
Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,
- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet
This behavior is more filter like instead of other way around.
CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.
Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing
Reviewers: mart, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:25:28 +05:30
|
|
|
* list of all dataengines.
|
2013-04-04 17:33:55 +02:00
|
|
|
*/
|
|
|
|
static QStringList listAllEngines(const QString &parentApp = QString());
|
|
|
|
|
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* Returns a list of all known dataengines.
|
2013-04-04 17:33:55 +02:00
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @param parentApp the application to filter dataengines on. Uses the
|
2013-04-04 17:33:55 +02:00
|
|
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
|
|
|
* The default value of QString() will result in a
|
pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.
In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.
Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,
- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet
This behavior is more filter like instead of other way around.
CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.
Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing
Reviewers: mart, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:25:28 +05:30
|
|
|
* list of all dataengines.
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of dataengines
|
2013-04-04 17:33:55 +02:00
|
|
|
**/
|
|
|
|
static KPluginInfo::List listEngineInfo(const QString &parentApp = QString());
|
|
|
|
|
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* Returns a list of all known dataengines filtering by category.
|
2013-04-04 17:33:55 +02:00
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @param category the category to filter dataengines on. Uses the
|
2013-04-04 17:33:55 +02:00
|
|
|
* X-KDE-PluginInfo-Category entry (if any) in the
|
|
|
|
* plugin info. The value of QString() will
|
2016-08-20 17:19:14 +02:00
|
|
|
* result in a list of dataengines with an empty category.
|
2013-04-04 17:33:55 +02:00
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @param parentApp the application to filter dataengines on. Uses the
|
2013-04-04 17:33:55 +02:00
|
|
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
|
|
|
* The default value of QString() will result in a
|
pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.
In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.
Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,
- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet
This behavior is more filter like instead of other way around.
CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.
Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing
Reviewers: mart, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:25:28 +05:30
|
|
|
* list of all dataengines in specified categories.
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of dataengines
|
2013-04-04 17:33:55 +02:00
|
|
|
* @since 4.3
|
|
|
|
**/
|
|
|
|
static KPluginInfo::List listEngineInfoByCategory(const QString &category, const QString &parentApp = QString());
|
|
|
|
|
2010-07-15 21:06:21 +00:00
|
|
|
/**
|
2010-07-15 21:54:06 +00:00
|
|
|
* Load a Service plugin.
|
2010-07-15 21:06:21 +00:00
|
|
|
*
|
|
|
|
* @param name the plugin name of the service to load
|
|
|
|
* @param args a list of arguments to supply to the service plugin when loading it
|
|
|
|
* @param parent the parent object, if any, for the service
|
|
|
|
*
|
|
|
|
* @return a Service object, unlike Plasma::Service::loadService, this can return null.
|
|
|
|
**/
|
2017-12-13 07:35:58 +01:00
|
|
|
Service *loadService(const QString &name, const QVariantList &args, QObject *parent = nullptr);
|
2010-07-15 21:11:20 +00:00
|
|
|
|
2011-07-19 21:39:51 +02:00
|
|
|
/**
|
|
|
|
* Load a ContainmentActions plugin.
|
|
|
|
*
|
|
|
|
* Returns a pointer to the containmentactions if successful.
|
|
|
|
* The caller takes responsibility for the containmentactions, including
|
|
|
|
* deleting it when no longer needed.
|
|
|
|
*
|
|
|
|
* @param parent the parent containment. @since 4.6 null is allowed.
|
|
|
|
* @param name the plugin name, as returned by KPluginInfo::pluginName()
|
|
|
|
* @param args to send the containmentactions extra arguments
|
2018-10-22 21:05:29 +03:00
|
|
|
* @return a ContainmentActions object
|
2011-07-19 21:39:51 +02:00
|
|
|
**/
|
|
|
|
ContainmentActions *loadContainmentActions(Containment *parent, const QString &containmentActionsName,
|
2014-04-26 01:45:47 +02:00
|
|
|
const QVariantList &args = QVariantList());
|
2011-07-19 21:39:51 +02:00
|
|
|
|
2019-10-15 20:23:31 +02:00
|
|
|
#if PLASMA_ENABLE_DEPRECATED_SINCE(5, 30)
|
2011-07-13 20:20:36 +02:00
|
|
|
/**
|
|
|
|
* Load a Package plugin.
|
|
|
|
*
|
|
|
|
* @param name the plugin name of the package to load
|
2011-07-15 13:34:10 +02:00
|
|
|
* @param specialization used to find script extensions for the given format, e.g. "QML" for "Plasma/Applet"
|
2011-07-13 20:20:36 +02:00
|
|
|
*
|
|
|
|
* @return a Package object matching name, or an invalid package on failure
|
2019-10-15 20:23:31 +02:00
|
|
|
* @deprecated Since 5.30, use KPackage::PackageLoader::loadPackage(const QString& packageFormat, const QString& packagePath) instead.
|
2011-07-13 20:20:36 +02:00
|
|
|
**/
|
2019-10-15 20:23:31 +02:00
|
|
|
PLASMA_DEPRECATED_VERSION(5, 30, "Use KPackage::PackageLoader::loadPackage(const QString&, const QString&")
|
|
|
|
Package loadPackage(const QString &packageFormat, const QString &specialization = QString());
|
2016-12-26 17:06:09 +01:00
|
|
|
#endif
|
2011-07-13 20:20:36 +02:00
|
|
|
|
2019-10-15 20:23:31 +02:00
|
|
|
#if PLASMA_ENABLE_DEPRECATED_SINCE(5, 28)
|
2010-07-27 22:07:53 +00:00
|
|
|
/**
|
|
|
|
* Returns a list of all known applets.
|
|
|
|
* This may skip applets based on security settings and ExcludeCategories in the application's config.
|
|
|
|
*
|
2018-10-22 21:05:29 +03:00
|
|
|
* @param category Only applets matching this category will be returned.
|
2010-07-27 22:07:53 +00:00
|
|
|
* Useful in conjunction with knownCategories.
|
|
|
|
* If "Misc" is passed in, then applets without a
|
|
|
|
* Categories= entry are also returned.
|
|
|
|
* If an empty string is passed in, all applets are
|
|
|
|
* returned.
|
|
|
|
* @param parentApp the application to filter applets on. Uses the
|
|
|
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
|
|
|
* The default value of QString() will result in a
|
pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.
In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.
Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,
- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet
This behavior is more filter like instead of other way around.
CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.
Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing
Reviewers: mart, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:25:28 +05:30
|
|
|
* list of all applets in specified category.
|
2010-07-27 22:07:53 +00:00
|
|
|
* @return list of applets
|
2016-10-10 16:27:50 +02:00
|
|
|
*
|
2019-10-15 20:23:31 +02:00
|
|
|
* @deprecated Since 5.28. Doesn't support metadata.json packages.
|
|
|
|
* Use listAppletMetaData(const QString &category, const QString &parentApp) instead.
|
2016-10-10 16:27:50 +02:00
|
|
|
**/
|
2019-10-15 20:23:31 +02:00
|
|
|
PLASMA_DEPRECATED_VERSION(5, 28, "Use PluginLoader::listAppletMetaData(const QString &, const QString &)")
|
|
|
|
KPluginInfo::List listAppletInfo(const QString &category, const QString &parentApp = QString());
|
|
|
|
#endif
|
2016-10-10 16:27:50 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a list of all known applets.
|
|
|
|
* This may skip applets based on security settings and ExcludeCategories in the application's config.
|
|
|
|
*
|
|
|
|
* @param category Only applets matchin this category will be returned.
|
|
|
|
* Useful in conjunction with knownCategories.
|
|
|
|
* If "Misc" is passed in, then applets without a
|
|
|
|
* Categories= entry are also returned.
|
|
|
|
* If an empty string is passed in, all applets are
|
|
|
|
* returned.
|
|
|
|
* @param parentApp the application to filter applets on. Uses the
|
|
|
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
|
|
|
* The default value of QString() will result in a
|
pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.
In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.
Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,
- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet
This behavior is more filter like instead of other way around.
CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.
Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing
Reviewers: mart, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:25:28 +05:30
|
|
|
* list of all applets in specified categories.
|
2016-10-10 16:27:50 +02:00
|
|
|
* @return list of applets
|
|
|
|
*
|
|
|
|
* @since 5.28
|
2010-07-27 22:07:53 +00:00
|
|
|
**/
|
2016-10-10 16:27:50 +02:00
|
|
|
QList<KPluginMetaData> listAppletMetaData(const QString &category, const QString &parentApp = QString());
|
2010-07-27 22:07:53 +00:00
|
|
|
|
2019-10-15 20:23:31 +02:00
|
|
|
#if PLASMA_ENABLE_DEPRECATED_SINCE(5, 36)
|
2013-02-12 21:34:24 +01:00
|
|
|
/**
|
|
|
|
* Returns a list of all known applets associated with a certain mimetype.
|
|
|
|
*
|
|
|
|
* @return list of applets
|
2017-05-31 02:15:16 +02:00
|
|
|
*
|
2019-09-08 23:50:40 +02:00
|
|
|
* @deprecated Since 5.36, use listAppletMetaDataForMimeType(const QString &mimetype) instead.
|
2017-05-31 02:15:16 +02:00
|
|
|
**/
|
2019-10-15 20:23:31 +02:00
|
|
|
PLASMA_DEPRECATED_VERSION(5, 36, "Use PluginLoader::listAppletMetaDataForMimeType(const QString &)")
|
|
|
|
KPluginInfo::List listAppletInfoForMimeType(const QString &mimetype);
|
|
|
|
#endif
|
2017-05-31 02:15:16 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a list of all known applets associated with a certain mimetype.
|
|
|
|
*
|
|
|
|
* @return list of applets
|
2019-09-08 23:51:04 +02:00
|
|
|
* @since 5.36
|
2017-05-31 02:15:16 +02:00
|
|
|
**/
|
|
|
|
QList<KPluginMetaData> listAppletMetaDataForMimeType(const QString &mimetype);
|
|
|
|
|
2019-10-15 20:23:31 +02:00
|
|
|
#if PLASMA_ENABLE_DEPRECATED_SINCE(5, 36)
|
2017-05-31 02:15:16 +02:00
|
|
|
/**
|
|
|
|
* Returns a list of all known applets associated with a certain URL.
|
|
|
|
*
|
|
|
|
* @return list of applets
|
|
|
|
*
|
2019-09-08 23:50:40 +02:00
|
|
|
* @deprecated Since 5.36, use listAppletMetaDataForUrl(const QUrl &url) instead.
|
2013-02-12 21:34:24 +01:00
|
|
|
**/
|
2019-10-15 20:23:31 +02:00
|
|
|
PLASMA_DEPRECATED_VERSION(5, 36, "Use PluginLoader::listAppletMetaDataForUrl(const QUrl &)")
|
|
|
|
KPluginInfo::List listAppletInfoForUrl(const QUrl &url);
|
|
|
|
#endif
|
2013-02-12 21:34:24 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a list of all known applets associated with a certain URL.
|
|
|
|
*
|
|
|
|
* @return list of applets
|
2019-09-08 23:51:04 +02:00
|
|
|
* @since 5.36
|
2013-02-12 21:34:24 +01:00
|
|
|
**/
|
2017-05-31 02:15:16 +02:00
|
|
|
QList<KPluginMetaData> listAppletMetaDataForUrl(const QUrl &url);
|
2013-02-12 21:40:59 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a list of all the categories used by installed applets.
|
|
|
|
*
|
|
|
|
* @param parentApp the application to filter applets on. Uses the
|
|
|
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
|
|
|
* The default value of QString() will result in a
|
pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.
In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.
Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,
- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet
This behavior is more filter like instead of other way around.
CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.
Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing
Reviewers: mart, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:25:28 +05:30
|
|
|
* list of all Applets.
|
2013-02-12 21:40:59 +01:00
|
|
|
* @return list of categories
|
|
|
|
* @param visibleOnly true if it should only return applets that are marked as visible
|
|
|
|
*/
|
|
|
|
QStringList listAppletCategories(const QString &parentApp = QString(),
|
|
|
|
bool visibleOnly = true);
|
2013-02-12 21:34:24 +01:00
|
|
|
|
2013-02-12 21:45:18 +01:00
|
|
|
/**
|
|
|
|
* Sets the list of custom categories that are used in addition to the default
|
2016-08-20 17:19:14 +02:00
|
|
|
* set of categories known to libplasma for applets.
|
2013-02-12 21:45:18 +01:00
|
|
|
* @param categories a list of categories
|
|
|
|
* @since 4.3
|
|
|
|
*/
|
|
|
|
void setCustomAppletCategories(const QStringList &categories);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return the list of custom categories known to libplasma
|
|
|
|
* @since 4.3
|
|
|
|
*/
|
|
|
|
QStringList customAppletCategories() const;
|
|
|
|
|
2013-02-12 21:54:08 +01:00
|
|
|
/**
|
|
|
|
* Get the category of the given applet
|
|
|
|
*
|
|
|
|
* @param appletName the name of the applet
|
|
|
|
*/
|
|
|
|
QString appletCategory(const QString &appletName);
|
|
|
|
|
2013-02-19 13:09:33 +01:00
|
|
|
/**
|
|
|
|
* Returns a list of all known containments.
|
|
|
|
*
|
|
|
|
* @param category Only containments matching this category will be returned.
|
|
|
|
* Useful in conjunction with knownCategories.
|
2016-08-20 17:19:14 +02:00
|
|
|
* If "Miscellaneous" is passed in, then containments without a
|
2013-02-19 13:09:33 +01:00
|
|
|
* Categories= entry are also returned.
|
2016-08-20 17:19:14 +02:00
|
|
|
* If an empty string is passed in, all containments are
|
2013-02-19 13:09:33 +01:00
|
|
|
* returned.
|
2016-08-20 17:19:14 +02:00
|
|
|
* @param parentApp the application to filter containments on. Uses the
|
2013-02-19 13:09:33 +01:00
|
|
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
|
|
|
* The default value of QString() will result in a
|
pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.
In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.
Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,
- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet
This behavior is more filter like instead of other way around.
CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.
Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing
Reviewers: mart, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:25:28 +05:30
|
|
|
* list of all containments.
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of containments
|
2013-02-19 13:09:33 +01:00
|
|
|
**/
|
|
|
|
static KPluginInfo::List listContainments(const QString &category = QString(),
|
2014-04-26 01:45:47 +02:00
|
|
|
const QString &parentApp = QString());
|
2013-02-19 13:09:33 +01:00
|
|
|
|
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* Returns a list of all known containments that match the parameters.
|
2013-02-19 13:09:33 +01:00
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @param type Only containments with this string in X-Plasma-ContainmentType
|
2013-02-19 13:09:33 +01:00
|
|
|
* in their .desktop files will be returned. Common values are panel and
|
|
|
|
* desktop
|
2018-10-22 21:05:29 +03:00
|
|
|
* @param category Only containments matching this category will be returned.
|
2013-02-19 13:09:33 +01:00
|
|
|
* Useful in conjunction with knownCategories.
|
2016-08-20 17:19:14 +02:00
|
|
|
* If "Miscellaneous" is passed in, then containments without a
|
2013-02-19 13:09:33 +01:00
|
|
|
* Categories= entry are also returned.
|
2016-08-20 17:19:14 +02:00
|
|
|
* If an empty string is passed in, all containments are
|
2013-02-19 13:09:33 +01:00
|
|
|
* returned.
|
2016-08-20 17:19:14 +02:00
|
|
|
* @param parentApp the application to filter containments on. Uses the
|
2013-02-19 13:09:33 +01:00
|
|
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
|
|
|
* The default value of QString() will result in a
|
pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.
In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.
Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,
- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet
This behavior is more filter like instead of other way around.
CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.
Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing
Reviewers: mart, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:25:28 +05:30
|
|
|
* list of all containments, matching categories/type.
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of containments
|
2013-02-19 13:09:33 +01:00
|
|
|
**/
|
|
|
|
static KPluginInfo::List listContainmentsOfType(const QString &type,
|
2014-04-26 01:45:47 +02:00
|
|
|
const QString &category = QString(),
|
|
|
|
const QString &parentApp = QString());
|
2013-02-19 13:09:33 +01:00
|
|
|
|
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return a list of all known types of containments on this system
|
2013-02-19 13:09:33 +01:00
|
|
|
*/
|
|
|
|
static QStringList listContainmentTypes();
|
|
|
|
|
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* Returns a list of all known containments associated with a certain MimeType
|
2013-02-19 13:09:33 +01:00
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of containments
|
2013-02-19 13:09:33 +01:00
|
|
|
**/
|
|
|
|
static KPluginInfo::List listContainmentsForMimeType(const QString &mimeType);
|
|
|
|
|
2010-07-27 22:07:53 +00:00
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* Returns a list of all known dataengines.
|
2010-07-27 22:07:53 +00:00
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @param parentApp the application to filter dataengines on. Uses the
|
2010-07-27 22:07:53 +00:00
|
|
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
|
|
|
* The default value of QString() will result in a
|
pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.
In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.
Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,
- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet
This behavior is more filter like instead of other way around.
CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.
Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing
Reviewers: mart, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:25:28 +05:30
|
|
|
* list of all dataengines
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of dataengines
|
2010-07-27 22:07:53 +00:00
|
|
|
**/
|
|
|
|
KPluginInfo::List listDataEngineInfo(const QString &parentApp = QString());
|
|
|
|
|
2011-07-19 21:39:51 +02:00
|
|
|
/**
|
|
|
|
* Returns a list of all known ContainmentActions.
|
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @param parentApp the application to filter ContainmentActions on. Uses the
|
2011-07-19 21:39:51 +02:00
|
|
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
|
|
|
* The default value of QString() will result in a
|
pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.
In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.
Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,
- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet
This behavior is more filter like instead of other way around.
CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.
Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing
Reviewers: mart, apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:25:28 +05:30
|
|
|
* list of all ContainmentActions.
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of ContainmentActions
|
2011-07-19 21:39:51 +02:00
|
|
|
**/
|
|
|
|
KPluginInfo::List listContainmentActionsInfo(const QString &parentApp);
|
|
|
|
|
2010-07-15 21:06:21 +00:00
|
|
|
/**
|
|
|
|
* Set the plugin loader which will be queried for all loads.
|
2011-01-19 00:33:01 +00:00
|
|
|
*
|
2010-07-15 21:06:21 +00:00
|
|
|
* @param loader A subclass of PluginLoader which will be supplied
|
|
|
|
* by the application
|
|
|
|
**/
|
2014-04-26 01:45:47 +02:00
|
|
|
static void setPluginLoader(PluginLoader *loader);
|
2010-07-15 21:11:20 +00:00
|
|
|
|
2010-07-15 21:06:21 +00:00
|
|
|
/**
|
|
|
|
* Return the active plugin loader
|
|
|
|
**/
|
2011-07-19 21:40:12 +02:00
|
|
|
static PluginLoader *self();
|
2010-07-15 21:06:21 +00:00
|
|
|
|
2010-07-15 21:38:56 +00:00
|
|
|
protected:
|
|
|
|
/**
|
|
|
|
* A re-implementable method that allows subclasses to override
|
|
|
|
* the default behaviour of loadApplet. If the applet requested is not recognized,
|
|
|
|
* then the implementation should return a NULL pointer. This method is called
|
|
|
|
* by loadApplet prior to attempting to load an applet using the standard Plasma
|
|
|
|
* plugin mechanisms.
|
|
|
|
*
|
|
|
|
* @param name the plugin name, as returned by KPluginInfo::pluginName()
|
|
|
|
* @param appletId unique ID to assign the applet, or zero to have one
|
|
|
|
* assigned automatically.
|
|
|
|
* @param args to send the applet extra arguments
|
|
|
|
* @return a pointer to the loaded applet, or 0 on load failure
|
|
|
|
**/
|
|
|
|
virtual Applet *internalLoadApplet(const QString &name, uint appletId = 0,
|
2010-08-11 18:19:05 +00:00
|
|
|
const QVariantList &args = QVariantList());
|
2010-07-15 21:38:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A re-implementable method that allows subclasses to override
|
|
|
|
* the default behaviour of loadDataEngine. If the engine requested is not recognized,
|
|
|
|
* then the implementation should return a NULL pointer. This method is called
|
|
|
|
* by loadDataEngine prior to attempting to load a DataEgine using the standard Plasma
|
|
|
|
* plugin mechanisms.
|
|
|
|
*
|
|
|
|
* @param name the name of the engine
|
|
|
|
* @return the data engine that was loaded, or the NullEngine on failure.
|
|
|
|
**/
|
|
|
|
virtual DataEngine *internalLoadDataEngine(const QString &name);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A re-implementable method that allows subclasses to override
|
|
|
|
* the default behaviour of loadService. If the service requested is not recognized,
|
|
|
|
* then the implementation should return a NULL pointer. This method is called
|
|
|
|
* by loadService prior to attempting to load a Service using the standard Plasma
|
|
|
|
* plugin mechanisms.
|
|
|
|
*
|
|
|
|
* @param name the plugin name of the service to load
|
|
|
|
* @param args a list of arguments to supply to the service plugin when loading it
|
|
|
|
* @param parent the parent object, if any, for the service
|
|
|
|
*
|
|
|
|
* @return a Service object, unlike Plasma::Service::loadService, this can return null.
|
|
|
|
**/
|
2017-12-13 07:35:58 +01:00
|
|
|
virtual Service *internalLoadService(const QString &name, const QVariantList &args, QObject *parent = nullptr);
|
2010-07-15 21:38:56 +00:00
|
|
|
|
2011-07-19 21:39:51 +02:00
|
|
|
/**
|
|
|
|
* A re-implementable method that allows subclasses to override
|
2016-08-20 17:19:14 +02:00
|
|
|
* the default behaviour of loadContainmentActions. If the ContainmentActions requested is not recognized,
|
2011-07-19 21:39:51 +02:00
|
|
|
* then the implementation should return a NULL pointer. This method is called
|
|
|
|
* by loadService prior to attempting to load a Service using the standard Plasma
|
|
|
|
* plugin mechanisms.
|
|
|
|
*
|
|
|
|
* Returns a pointer to the containmentactions if successful.
|
|
|
|
* The caller takes responsibility for the containmentactions, including
|
|
|
|
* deleting it when no longer needed.
|
|
|
|
*
|
|
|
|
* @param parent the parent containment. @since 4.6 null is allowed.
|
|
|
|
* @param name the plugin name, as returned by KPluginInfo::pluginName()
|
|
|
|
* @param args to send the containmentactions extra arguments
|
2018-10-22 21:05:29 +03:00
|
|
|
* @return a ContainmentActions object
|
2011-07-19 21:39:51 +02:00
|
|
|
**/
|
|
|
|
virtual ContainmentActions *internalLoadContainmentActions(Containment *parent, const QString &containmentActionsName, const QVariantList &args);
|
|
|
|
|
2011-07-13 20:20:36 +02:00
|
|
|
/**
|
|
|
|
* A re-implementable method that allows subclasses to override
|
|
|
|
* the default behaviour of loadPackage. If the service requested is not recognized,
|
|
|
|
* then the implementation should return a NULL pointer. This method is called
|
|
|
|
* by loadService prior to attempting to load a Service using the standard Plasma
|
|
|
|
* plugin mechanisms.
|
|
|
|
*
|
|
|
|
* @param name the plugin name of the service to load
|
|
|
|
* @param args a list of arguments to supply to the service plugin when loading it
|
|
|
|
* @param parent the parent object, if any, for the service
|
|
|
|
*
|
|
|
|
* @return a Service object, unlike Plasma::Service::loadService, this can return null.
|
2019-10-15 20:23:31 +02:00
|
|
|
* @deprecated since 5.30, use KPackage API
|
2011-07-13 20:20:36 +02:00
|
|
|
**/
|
2019-10-15 20:23:31 +02:00
|
|
|
PLASMA_DEPRECATED_VERSION(5, 30, "Use KPackage API")
|
|
|
|
virtual Package internalLoadPackage(const QString &name, const QString &specialization);
|
2011-07-13 20:20:36 +02:00
|
|
|
|
Moving Plasma::Applet::listAppletInfo into the PluginLoader logic. Also implemented internalAppletNames which, if implemented, will return a QStringList of the available applets' names. PluginLoader::listAppletInfo will then search for .desktop files in $APPDATA/plasma/applets/ which match the applets' names (ie. $APPDATA/plasma/applets/org.skrooge.report.desktop), and add them to the KPluginInfo::List returned by PluginLoader::listAppletInfo and subsequently Plasma::Applet::listAppletInfo.
Since the applets are dynamically loaded, the .desktop files don't need an X-KDE-Library entries, but the others will be used, for example X-KDE-PluginInfo-Name (which will be the value given to PluginLoader::internalAppletLoad, so it is really important), Icon, Type, ServiceTypes...
svn path=/trunk/KDE/kdelibs/; revision=1154551
2010-07-25 20:56:03 +00:00
|
|
|
/**
|
|
|
|
* A re-implementable method that allows subclasses to provide additional applets
|
2014-04-26 01:45:47 +02:00
|
|
|
* for listAppletInfo. If the application has no applets to give to the application,
|
2010-07-27 22:07:53 +00:00
|
|
|
* then the implementation should return an empty list.
|
|
|
|
*
|
Moving Plasma::Applet::listAppletInfo into the PluginLoader logic. Also implemented internalAppletNames which, if implemented, will return a QStringList of the available applets' names. PluginLoader::listAppletInfo will then search for .desktop files in $APPDATA/plasma/applets/ which match the applets' names (ie. $APPDATA/plasma/applets/org.skrooge.report.desktop), and add them to the KPluginInfo::List returned by PluginLoader::listAppletInfo and subsequently Plasma::Applet::listAppletInfo.
Since the applets are dynamically loaded, the .desktop files don't need an X-KDE-Library entries, but the others will be used, for example X-KDE-PluginInfo-Name (which will be the value given to PluginLoader::internalAppletLoad, so it is really important), Icon, Type, ServiceTypes...
svn path=/trunk/KDE/kdelibs/; revision=1154551
2010-07-25 20:56:03 +00:00
|
|
|
* This method is called by listAppletInfo prior to generating the list of applets installed
|
|
|
|
* on the system using the standard Plasma plugin mechanisms, and will try to find .desktop
|
|
|
|
* files for your applets.
|
2011-01-19 00:33:01 +00:00
|
|
|
*
|
2010-07-27 22:07:53 +00:00
|
|
|
* @param category Only applets matching this category will be returned.
|
Moving Plasma::Applet::listAppletInfo into the PluginLoader logic. Also implemented internalAppletNames which, if implemented, will return a QStringList of the available applets' names. PluginLoader::listAppletInfo will then search for .desktop files in $APPDATA/plasma/applets/ which match the applets' names (ie. $APPDATA/plasma/applets/org.skrooge.report.desktop), and add them to the KPluginInfo::List returned by PluginLoader::listAppletInfo and subsequently Plasma::Applet::listAppletInfo.
Since the applets are dynamically loaded, the .desktop files don't need an X-KDE-Library entries, but the others will be used, for example X-KDE-PluginInfo-Name (which will be the value given to PluginLoader::internalAppletLoad, so it is really important), Icon, Type, ServiceTypes...
svn path=/trunk/KDE/kdelibs/; revision=1154551
2010-07-25 20:56:03 +00:00
|
|
|
* Useful in conjunction with knownCategories.
|
|
|
|
* If "Misc" is passed in, then applets without a
|
|
|
|
* Categories= entry are also returned.
|
|
|
|
* If an empty string is passed in, all applets are
|
|
|
|
* returned.
|
|
|
|
* @return list of applets
|
|
|
|
**/
|
2010-07-27 22:07:53 +00:00
|
|
|
virtual KPluginInfo::List internalAppletInfo(const QString &category) const;
|
|
|
|
|
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* A re-implementable method that allows subclasses to provide additional dataengines
|
2012-09-24 15:51:14 +02:00
|
|
|
* for DataEngine::listDataEngines.
|
2010-07-27 22:07:53 +00:00
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of dataengine info, or an empty list if none
|
2010-07-27 22:07:53 +00:00
|
|
|
**/
|
|
|
|
virtual KPluginInfo::List internalDataEngineInfo() const;
|
|
|
|
|
|
|
|
/**
|
2014-04-16 18:56:22 +02:00
|
|
|
* Returns a list of all known Service implementations
|
2010-07-28 18:17:36 +00:00
|
|
|
*
|
2014-04-16 18:56:22 +02:00
|
|
|
* @return list of Service info, or an empty list if none
|
2010-07-28 18:17:36 +00:00
|
|
|
*/
|
|
|
|
virtual KPluginInfo::List internalServiceInfo() const;
|
|
|
|
|
2011-07-19 21:39:51 +02:00
|
|
|
/**
|
2014-04-16 18:56:22 +02:00
|
|
|
* Returns a list of all known ContainmentActions implementations
|
2011-07-19 21:39:51 +02:00
|
|
|
*
|
|
|
|
* @return list of ContainmentActions info, or an empty list if none
|
|
|
|
*/
|
|
|
|
virtual KPluginInfo::List internalContainmentActionsInfo() const;
|
|
|
|
|
2010-07-27 22:07:53 +00:00
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* Standardized mechanism for providing internal applets by install .desktop files
|
2010-07-27 22:07:53 +00:00
|
|
|
* in $APPPDATA/plasma/internal/applets/
|
2011-01-19 00:33:01 +00:00
|
|
|
*
|
2010-07-27 22:07:53 +00:00
|
|
|
* For applications that do this, internalAppletInfo can be implemented as a one-liner
|
|
|
|
* call to this method.
|
2011-01-19 00:33:01 +00:00
|
|
|
*
|
2010-07-27 22:07:53 +00:00
|
|
|
* @param category Only applets matching this category will be returned.
|
|
|
|
* Useful in conjunction with knownCategories.
|
|
|
|
* If "Misc" is passed in, then applets without a
|
|
|
|
* Categories= entry are also returned.
|
|
|
|
* If an empty string is passed in, all applets are
|
|
|
|
* returned.
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of applets, or an empty list if none
|
2010-07-27 22:07:53 +00:00
|
|
|
*/
|
|
|
|
KPluginInfo::List standardInternalAppletInfo(const QString &category) const;
|
|
|
|
|
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* Standardized mechanism for providing internal dataengines by install .desktop files
|
2010-07-27 22:07:53 +00:00
|
|
|
* in $APPPDATA/plasma/internal/dataengines/
|
2011-01-19 00:33:01 +00:00
|
|
|
*
|
2010-07-27 22:07:53 +00:00
|
|
|
* For applications that do this, internalDataEngineInfo can be implemented as a one-liner
|
|
|
|
* call to this method.
|
2011-01-19 00:33:01 +00:00
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of dataengines
|
2010-07-27 22:07:53 +00:00
|
|
|
*/
|
|
|
|
KPluginInfo::List standardInternalDataEngineInfo() const;
|
Moving Plasma::Applet::listAppletInfo into the PluginLoader logic. Also implemented internalAppletNames which, if implemented, will return a QStringList of the available applets' names. PluginLoader::listAppletInfo will then search for .desktop files in $APPDATA/plasma/applets/ which match the applets' names (ie. $APPDATA/plasma/applets/org.skrooge.report.desktop), and add them to the KPluginInfo::List returned by PluginLoader::listAppletInfo and subsequently Plasma::Applet::listAppletInfo.
Since the applets are dynamically loaded, the .desktop files don't need an X-KDE-Library entries, but the others will be used, for example X-KDE-PluginInfo-Name (which will be the value given to PluginLoader::internalAppletLoad, so it is really important), Icon, Type, ServiceTypes...
svn path=/trunk/KDE/kdelibs/; revision=1154551
2010-07-25 20:56:03 +00:00
|
|
|
|
2010-07-28 18:17:36 +00:00
|
|
|
/**
|
2016-08-20 17:19:14 +02:00
|
|
|
* Standardized mechanism for providing internal services by install .desktop files
|
2010-07-28 18:17:36 +00:00
|
|
|
* in $APPPDATA/plasma/internal/services/
|
2011-01-19 00:33:01 +00:00
|
|
|
*
|
2014-04-16 18:56:22 +02:00
|
|
|
* For applications that do this, internalServiceInfo can be implemented as a one-liner
|
2010-07-28 18:17:36 +00:00
|
|
|
* call to this method.
|
2011-01-19 00:33:01 +00:00
|
|
|
*
|
2016-08-20 17:19:14 +02:00
|
|
|
* @return list of services
|
2010-07-28 18:17:36 +00:00
|
|
|
*/
|
|
|
|
KPluginInfo::List standardInternalServiceInfo() const;
|
|
|
|
|
2011-07-19 21:40:12 +02:00
|
|
|
PluginLoader();
|
|
|
|
virtual ~PluginLoader();
|
|
|
|
|
2010-07-15 21:06:21 +00:00
|
|
|
private:
|
2016-06-12 15:35:17 +02:00
|
|
|
bool isPluginVersionCompatible(KPluginLoader &loader);
|
|
|
|
|
2014-04-26 01:45:47 +02:00
|
|
|
PluginLoaderPrivate *const d;
|
2010-07-15 21:06:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-04-26 01:45:47 +02:00
|
|
|
Q_DECLARE_METATYPE(Plasma::PluginLoader *)
|
2010-08-03 01:35:32 +00:00
|
|
|
|
2011-01-19 00:33:01 +00:00
|
|
|
#endif
|