1/*
2 SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#include "job.h"
8
9using namespace Purpose;
10
11class Purpose::JobPrivate
12{
13public:
14 QJsonObject m_data;
15 QJsonObject m_output = {{QStringLiteral("uninitialized"), QStringLiteral("true")}};
16};
17
18Job::Job(QObject *parent)
19 : KJob(parent)
20 , d_ptr(new JobPrivate)
21{
22}
23
24Job::~Job()
25{
26}
27
28QJsonObject Job::data() const
29{
30 Q_D(const Job);
31 return d->m_data;
32}
33
34void Job::setData(const QJsonObject &data)
35{
36 Q_D(Job);
37 d->m_data = data;
38}
39
40QJsonObject Job::output() const
41{
42 Q_D(const Job);
43 return d->m_output;
44}
45
46void Job::setOutput(const QJsonObject &output)
47{
48 Q_D(Job);
49 if (d->m_output != output) {
50 d->m_output = output;
51 Q_EMIT outputChanged(output);
52 }
53}
54
55#include "moc_job.cpp"
56

source code of purpose/src/job.cpp