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
- [read-only] configSourceCode : const QUrl
- data : QJsonObject
- [read-only] isReady : bool
- [read-only] neededArguments : const QJsonArray
- [read-only] pluginName : const QString
- [read-only] pluginTypeName : const QString
Public Functions
- Configuration(const QJsonObject &inputData, const QString &pluginTypeName, const KPluginMetaData &pluginInformation, QObject *parent = nullptr)
- Configuration(const QJsonObject &inputData, const QString &pluginTypeName, const QJsonObject &pluginType, const KPluginMetaData &pluginInformation, QObject *parent = nullptr)
- ~Configuration()
- Purpose::Job *createJob()
- void setUseSeparateProcess(bool separate)
- bool useSeparateProcess() const
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:
QUrlconfigSourceCode() const
data : QJsonObject
Represents the data the job will have available to perform its task.
Access functions:
QJsonObjectdata() constvoidsetData(constQJsonObject&data)
Notifier signal:
voiddataChanged()
[read-only] isReady : bool
Tells whether there's still information to be provided, to be able to run the job.
Access functions:
boolisReady() const
Notifier signal:
voiddataChanged()
[read-only] neededArguments : const QJsonArray
Specifies the arguments the config file and the job will be sharing.
Access functions:
QJsonArrayneededArguments() const
[read-only] pluginName : const QString
Returns the plugin name to display.
Access functions:
QStringpluginName() const
[read-only] pluginTypeName : const QString
Returns the plugin type name to display.
Access functions:
QStringpluginTypeName() 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()