Pages
API Documentation
On this page

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

List of all members, including inherited members

Public Types

Properties

Public Functions

Detailed Description

Lists all the alternatives to share a specified type of data then provides a method to trigger a job.

Member Type Documentation

enum AlternativesModel::Roles

Constant
Purpose::AlternativesModel::PluginIdRole Qt::UserRole + 1
Purpose::AlternativesModel::IconNameRole 258
Purpose::AlternativesModel::ActionDisplayRole 259

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.

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.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.