Pages
API Documentation
On this page

Purpose::Configuration Class

This class will be in charge of figuring out the job configuration. More...

  • Header: #include <Purpose/Configuration>
  • CMake: find_package(KF6 REQUIRED COMPONENTS Purpose)
    target_link_libraries(mytarget PRIVATE KF6::Purpose)
  • Inherits: QObject

List of all members, including inherited members

Properties

Public Functions

Detailed Description

Once it's figured out, it can proceed to create the job.

The object will be destroyed as soon as the job finishes.

Property Documentation

[read-only] configSourceCode : const QUrl

Specifies the QML source code to be used, to configure the current job.

Access functions:

  • QUrl configSourceCode() const

data : QJsonObject

Represents the data the job will have available to perform its task.

Access functions:

  • QJsonObject data() const
  • void setData(const QJsonObject &data)

Notifier signal:

  • void dataChanged()

[read-only] isReady : bool

Tells whether there's still information to be provided, to be able to run the job.

Access functions:

  • bool isReady() const

Notifier signal:

[read-only] neededArguments : const QJsonArray

Specifies the arguments the config file and the job will be sharing.

Access functions:

  • QJsonArray neededArguments() const

[read-only] pluginName : const QString

Returns the plugin name to display.

Access functions:

  • QString pluginName() const

[read-only] pluginTypeName : const QString

Returns the plugin type name to display.

Access functions:

  • QString pluginTypeName() const

Member Function Documentation

Configuration::Configuration(const QJsonObject &inputData, const QString &pluginTypeName, const KPluginMetaData &pluginInformation, QObject *parent = nullptr)

Constructs a new configuration.

Configuration::Configuration(const QJsonObject &inputData, const QString &pluginTypeName, const QJsonObject &pluginType, const KPluginMetaData &pluginInformation, QObject *parent = nullptr)

Constructs a new configuration.

[override virtual noexcept] Configuration::~Configuration()

Destroys the configuration.

Purpose::Job *Configuration::createJob()

Returns the configured job ready to be started.

Before calling it, make sure that all information has been filled by checking isReady().

void Configuration::setUseSeparateProcess(bool separate)

separate will specify whether the process will be forced to execute in-process or in a separate process.

See also useSeparateProcess()

bool Configuration::useSeparateProcess() const

Returns whether the job will be run in the same process.

By default it will be true, unless the environment variable KDE_PURPOSE_LOCAL_JOBS is defined.

See also setUseSeparateProcess()

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