KCoreAddons
kpluginmetadata.h
114 * If KCoreAddons should keep metadata in cache. This makes querying the namespace again faster. Consider using this if you need revalidation of plugins
117 CacheMetaData = 2,
126 * Reads the plugin metadata from a QPluginLoader instance. You must call QPluginLoader::setFileName()
168 * Load a KPluginMetaData instance from a .json file. Unlike the constructor with a single file argument,
177 * @param directory The directory to search for plugins. If a relative path is given for @p directory,
178 * all entries of QCoreApplication::libraryPaths() will be checked with @p directory appended as a
182 * @param pluginId The Id of the plugin. The id should be the same as the filename, see KPluginMetaData::pluginId()
186 static KPluginMetaData findPluginById(const QString &directory, const QString &pluginId, KPluginMetaDataOptions options = {});
189 * Find all plugins inside @p directory. Only plugins which have JSON metadata will be considered.
191 * @param directory The directory to search for plugins. If a relative path is given for @p directory,
192 * all entries of QCoreApplication::libraryPaths() will be checked with @p directory appended as a
203 findPlugins(const QString &directory, std::function<bool(const KPluginMetaData &)> filter = {}, KPluginMetaDataOptions options = {});
220 * When the KPluginMetaData(QJsonObject, QString) constructor is used, the string is not modified.
257 * @return a list of people that contributed to this plugin (other than the authors and translators).
322 * @return a list of MIME types this plugin can handle (e.g. "application/pdf", "image/png", etc.)
336 * @return A string list of formfactors this plugin is useful for, e.g. desktop, handset or mediacenter.
337 * The keys for this are not formally defined, though the above-mentioned values should be used when applicable.
350 * Returns @c true if the plugin is enabled in @p config, otherwise returns isEnabledByDefault().
366 * @return the string value for @p key from the metadata or @p defaultValue if the key does not exist
368 * if QString is not the correct type for @p key you should use the other overloads or @ref KPluginMetaData::rawData
371 QString value(const QString &key, const QString &defaultValue = QString()) const; // TODO KF7: remove
388 /** @return the value for @p key from the metadata or @p defaultValue if the key does not exist.
395 QStringList value(const QString &key, const QStringList &defaultValue) const; // TODO KF7: remove
This class is used to store information about a person or developer.
Definition kaboutdata.h:64
KPluginFactory provides a convenient way to provide factory-style plugins.
Definition kpluginfactory.h:300
This class allows easily accessing some standardized values from the JSON metadata that can be embedd...
Definition kpluginmetadata.h:82
bool operator!=(const KPluginMetaData &other) const
Definition kpluginmetadata.h:405
bool isEnabled(const T &config) const
Returns true if the plugin is enabled in config, otherwise returns isEnabledByDefault().
Definition kpluginmetadata.h:359
KCALENDARCORE_EXPORT size_t qHash(const KCalendarCore::Period &key, size_t seed=0)
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
KDB_EXPORT KDbVersionInfo version()
QString name(GameStandardAction id)
bool isValid(QStringView ifopt)
Category category(StandardShortcut id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:59:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:59:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.