Purpose
alternativesmodel.cpp
55 const QRegularExpression re(QRegularExpression::wildcardToRegularExpression(constraint), QRegularExpression::CaseInsensitiveOption);
103 // qDebug() << "discarding" << meta.name() << KPluginMetaData::readStringList(meta.rawData(), QStringLiteral("X-Purpose-PluginTypes"));
141 const bool acceptable = s_matchFunctions.value(propertyName, defaultMatch)(constrainedValue, m_inputData.value(propertyName));
143 // qDebug() << "not accepted" << meta.name() << propertyName << constrainedValue << m_inputData[propertyName];
232 return new Configuration(d->m_inputData, d->m_pluginType, d->m_pluginTypeData, pluginData, this);
261 const QString action = KJsonUtils::readTranslatedString(pluginData, QStringLiteral("X-Purpose-ActionDisplay"));
268static QList<KPluginMetaData> findScriptedPackages(std::function<bool(const KPluginMetaData &)> filter)
273 QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("kpackage/Purpose"), QStandardPaths::LocateDirectory);
283 const KPluginMetaData info = Purpose::createMetaData(dir.absoluteFilePath(QStringLiteral("metadata.json")));
301 const QJsonArray inbound = d->m_pluginTypeData.value(QLatin1String("X-Purpose-InboundArguments")).toArray();
304 qWarning().nospace() << "Cannot initialize model with data " << d->m_inputData << ". missing: " << arg;
QString pluginId() const
QJsonObject rawData() const
static QList< KPluginMetaData > findPlugins(const QString &directory, std::function< bool(const KPluginMetaData &)> filter={}, KPluginMetaDataOptions options={})
QString iconName() const
QString name() const
QString description() const
Interface for client applications to share data.
Definition alternativesmodel.h:27
QJsonObject inputData
Specifies the information that will be given to the plugin once it's started.
Definition alternativesmodel.h:41
QString pluginType
Specifies the type of the plugin we want to list.
Definition alternativesmodel.h:34
QStringList disabledPlugins
Provides a list of plugin names to have filtered out.
Definition alternativesmodel.h:46
Q_SCRIPTABLE Purpose::Configuration * configureJob(int row)
This shouldn't require to have the job actually running on the same process as the app.
Definition alternativesmodel.cpp:228
This class will be in charge of figuring out the job configuration.
Definition configuration.h:33
KCOREADDONS_EXPORT Result match(QStringView pattern, QStringView str)
KIOCORE_EXPORT QString dir(const QString &fileClass)
void beginResetModel()
void endResetModel()
virtual QHash< int, QByteArray > roleNames() const const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
QDBusConnectionInterface * interface() const const
QDBusConnection sessionBus()
QDBusReply< bool > isServiceRegistered(const QString &serviceName) const const
Dirs
iterator insert(const Key &key, const T &value)
QIcon fromTheme(const QString &name)
QJsonValue value(QLatin1StringView key) const const
bool isArray() const const
bool isObject() const const
QJsonArray toArray() const const
QJsonObject toObject() const const
QString toString() const const
QMimeType mimeTypeForName(const QString &nameOrAlias) const const
bool inherits(const QString &mimeTypeName) const const
bool isValid() const const
int row() const const
Q_EMITQ_EMIT
QObject * parent() const const
QRegularExpressionMatch match(QStringView subjectView, qsizetype offset, MatchType matchType, MatchOptions matchOptions) const const
CaseInsensitiveOption
bool isValid() const const
QString wildcardToRegularExpression(QStringView pattern, WildcardConversionOptions options)
bool contains(const QSet< T > &other) const const
LocateDirectory
ApplicationsLocation
QString findExecutable(const QString &executableName, const QStringList &paths)
QString locate(StandardLocation type, const QString &fileName, LocateOptions options)
QStringList locateAll(StandardLocation type, const QString &fileName, LocateOptions options)
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
DisplayRole
ToolTip
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:05 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:05 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.