Purpose::AlternativesModel Class
Interface for client applications to share data. More...
Header: | #include <Purpose/AlternativesModel> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Purpose) target_link_libraries(mytarget PRIVATE KF6::Purpose) |
Inherits: | QAbstractListModel |
Properties
- disabledPlugins : QStringList
- inputData : QJsonObject
- pluginType : QString
Public Functions
AlternativesModel(QObject *parent = nullptr) | |
virtual | ~AlternativesModel() override |
Purpose::Configuration * | configureJob(int row) |
QStringList | disabledPlugins() const |
QJsonObject | inputData() const |
QString | pluginType() const |
void | setDisabledPlugins(const QStringList &pluginIds) |
void | setInputData(const QJsonObject &input) |
void | setPluginType(const QString &pluginType) |
Signals
void | disabledPluginsChanged() |
void | inputDataChanged() |
void | pluginTypeChanged() |
Detailed Description
Lists all the alternatives to share a specified type of data then provides a method to trigger a job.
Property Documentation
disabledPlugins : QStringList
Provides a list of plugin names to have filtered out.
Access functions:
QStringList | disabledPlugins() const |
void | setDisabledPlugins(const QStringList &pluginIds) |
Notifier signal:
void | disabledPluginsChanged() |
inputData : QJsonObject
Specifies the information that will be given to the plugin once it's started.
Note: some plugins might be filtered out based on this setting
Access functions:
QJsonObject | inputData() const |
void | setInputData(const QJsonObject &input) |
Notifier signal:
void | inputDataChanged() |
pluginType : QString
Specifies the type of the plugin we want to list.
Access functions:
QString | pluginType() const |
void | setPluginType(const QString &pluginType) |
Notifier signal:
void | pluginTypeChanged() |
See also inputData.
Member Function Documentation
[explicit]
AlternativesModel::AlternativesModel(QObject *parent = nullptr)
Constructs an alternatives model with the given parent.
[override virtual noexcept]
AlternativesModel::~AlternativesModel()
Destroys the alternatives model.
Purpose::Configuration *AlternativesModel::configureJob(int row)
This shouldn't require to have the job actually running on the same process as the app.
row specifies the alternative to be used.
Returns the configuration instance that will offer the job.