Attica

buildservicejob.cpp
1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2010 Sebastian Kügler <sebas@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#include "buildservicejob.h"
10
11using namespace Attica;
12
13class Q_DECL_HIDDEN BuildServiceJob::Private : public QSharedData
14{
15public:
16 QString id;
18 int status;
19 qreal progress;
20 QString projectId;
21 QString target;
22 QString buildServiceId;
23 QString url;
24 QString message;
25
26 Private()
27 {
28 }
29};
30
31BuildServiceJob::BuildServiceJob()
32 : d(new Private)
33{
34}
35
36BuildServiceJob::BuildServiceJob(const BuildServiceJob &other)
37 : d(other.d)
38{
39}
40
41BuildServiceJob &BuildServiceJob::operator=(const Attica::BuildServiceJob &other)
42{
43 d = other.d;
44 return *this;
45}
46
47BuildServiceJob::~BuildServiceJob()
48{
49}
50
51void BuildServiceJob::setId(const QString &u)
52{
53 d->id = u;
54}
55
56QString BuildServiceJob::id() const
57{
58 return d->id;
59}
60
61void BuildServiceJob::setName(const QString &u)
62{
63 d->name = u;
64}
65
66QString BuildServiceJob::name() const
67{
68 return d->name;
69}
70
71void BuildServiceJob::setProgress(const qreal p)
72{
73 d->progress = p;
74}
75
76qreal BuildServiceJob::progress() const
77{
78 return d->progress;
79}
80
81void BuildServiceJob::setStatus(const int status)
82{
83 d->status = status;
84}
85
86bool BuildServiceJob::isRunning() const
87{
88 return d->status == 1;
89}
90
91bool BuildServiceJob::isCompleted() const
92{
93 return d->status == 2;
94}
95
96bool BuildServiceJob::isFailed() const
97{
98 return d->status == 3;
99}
100
101void BuildServiceJob::setUrl(const QString &u)
102{
103 d->url = u;
104}
105
106QString BuildServiceJob::url() const
107{
108 return d->url;
109}
110
111void BuildServiceJob::setMessage(const QString &u)
112{
113 d->message = u;
114}
115
116QString BuildServiceJob::message() const
117{
118 return d->message;
119}
120
121void BuildServiceJob::setProjectId(const QString &u)
122{
123 d->projectId = u;
124}
125
126QString BuildServiceJob::projectId() const
127{
128 return d->projectId;
129}
130
131void BuildServiceJob::setTarget(const QString &u)
132{
133 d->target = u;
134}
135
136QString BuildServiceJob::target() const
137{
138 return d->target;
139}
140
141void BuildServiceJob::setBuildServiceId(const QString &u)
142{
143 d->buildServiceId = u;
144}
145
146QString BuildServiceJob::buildServiceId() const
147{
148 return d->buildServiceId;
149}
150
151bool BuildServiceJob::isValid() const
152{
153 return !(d->id.isEmpty());
154}
Represents a build service job.
Q_SCRIPTABLE CaptureState status()
The Attica namespace,.
QString name(StandardAction id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.