KParts
partloader.h
55namespace PartLoader
72KPARTS_EXPORT void getErrorStrings(QString *errorString, QString *errorText, const QString &argument, ErrorType type);
77 * Parses the associated capabilities from the KPart. This parses the deprecated "ServiceTypes" array of the "KPlugin" object
100 * if (auto result = KParts::PartLoader::instantiatePart<MyPart>(metaData, parentWidget, parent, args)) {
115instantiatePart(const KPluginMetaData &data, QWidget *parentWidget = nullptr, QObject *parent = nullptr, const QVariantList &args = {})
127 Private::getErrorStrings(&result.errorString, &result.errorText, fileName, Private::CouldNotLoadPlugin);
140 * if (auto result = KParts::PartLoader::instantiatePartForMimeType<KParts::ReadOnlyPart>(mimeType, parentWidget, parent, args)) {
156instantiatePartForMimeType(const QString &mimeType, QWidget *parentWidget = nullptr, QObject *parent = nullptr, const QVariantList &args = {})
162 Private::getErrorStrings(&errorResult.errorString, &errorResult.errorText, mimeType, Private::NoPartFoundForMimeType);
175 Private::getErrorStrings(&errorResult.errorString, &errorResult.errorText, mimeType, Private::NoPartInstantiatedForMimeType);
QString errorString
QString errorText
QString fileName() const
static KPluginFactory::Result< T > instantiatePartForMimeType(const QString &mimeType, QWidget *parentWidget=nullptr, QObject *parent=nullptr, const QVariantList &args={})
Use this method to create a KParts part.
Definition partloader.h:156
KPARTS_EXPORT PartCapabilities partCapabilities(const KPluginMetaData &data)
Parses the associated capabilities from the KPart.
Definition partloader.cpp:57
KPARTS_EXPORT QList< KPluginMetaData > partsForMimeType(const QString &mimeType)
Locate all available KParts using KPluginMetaData::findPlugins for a mimetype.
Definition partloader.cpp:101
static KPluginFactory::Result< T > instantiatePart(const KPluginMetaData &data, QWidget *parentWidget=nullptr, QObject *parent=nullptr, const QVariantList &args={})
Attempts to create a KPart from the given metadata.
Definition partloader.h:115
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 12:00:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 12:00:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.