Attica

downloaddescription.cpp
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2009 Frederik Gladhorn <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8 
9 #include "downloaddescription.h"
10 
11 #include <QStringList>
12 
13 namespace Attica
14 {
15 class DownloadDescription::Private : public QSharedData
16 {
17 public:
18  int id = 0;
19  Attica::DownloadDescription::Type type = Attica::DownloadDescription::FileDownload;
20  bool hasPrice = false;
22  QString name;
23  QString link;
24  QString distributionType;
25  QString priceReason;
26  QString priceAmount;
27  QString gpgFingerprint;
28  QString gpgSignature;
29  QString packageName;
30  QString repository;
31  uint size = 0;
32  QStringList tags;
33 };
34 }
35 
36 using namespace Attica;
37 
38 DownloadDescription::DownloadDescription()
39  : d(new Private)
40 {
41 }
42 
43 DownloadDescription::DownloadDescription(const Attica::DownloadDescription &other)
44  : d(other.d)
45 {
46 }
47 
48 DownloadDescription &DownloadDescription::operator=(const Attica::DownloadDescription &other)
49 {
50  d = other.d;
51  return *this;
52 }
53 
54 DownloadDescription::~DownloadDescription()
55 {
56 }
57 
58 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
59 QString Attica::DownloadDescription::category()
60 {
61  return d->category;
62 }
63 #endif
64 
65 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
66 int DownloadDescription::id()
67 {
68  return d->id;
69 }
70 #endif
71 
72 QString Attica::DownloadDescription::category() const
73 {
74  return d->category;
75 }
76 
77 int DownloadDescription::id() const
78 {
79  return d->id;
80 }
81 
82 void DownloadDescription::setId(int id)
83 {
84  d->id = id;
85 }
86 
87 void DownloadDescription::setCategory(const QString &category)
88 {
89  d->category = category;
90 }
91 
92 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
93 QString Attica::DownloadDescription::distributionType()
94 {
95  return d->distributionType;
96 }
97 #endif
98 
99 QString Attica::DownloadDescription::distributionType() const
100 {
101  return d->distributionType;
102 }
103 
104 void DownloadDescription::setDistributionType(const QString &distributionType)
105 {
106  d->distributionType = distributionType;
107 }
108 
109 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
110 bool Attica::DownloadDescription::hasPrice()
111 {
112  return d->hasPrice;
113 }
114 #endif
115 
116 bool Attica::DownloadDescription::hasPrice() const
117 {
118  return d->hasPrice;
119 }
120 
121 void DownloadDescription::setHasPrice(bool hasPrice)
122 {
123  d->hasPrice = hasPrice;
124 }
125 
126 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
127 Attica::DownloadDescription::Type DownloadDescription::type()
128 {
129  return d->type;
130 }
131 #endif
132 
133 Attica::DownloadDescription::Type DownloadDescription::type() const
134 {
135  return d->type;
136 }
137 
138 void DownloadDescription::setType(Attica::DownloadDescription::Type type)
139 {
140  d->type = type;
141 }
142 
143 #if ATTICA_BUILD_DEPRECATED_SINCE(0, 2)
144 bool Attica::DownloadDescription::isDownloadtypLink()
145 {
146  return d->type == Attica::DownloadDescription::LinkDownload;
147 }
148 #endif
149 
150 #if ATTICA_BUILD_DEPRECATED_SINCE(0, 2)
151 void DownloadDescription::setDownloadtypLink(bool isLink)
152 {
153  if (isLink) {
154  d->type = Attica::DownloadDescription::LinkDownload;
155  } else {
156  d->type = Attica::DownloadDescription::FileDownload;
157  }
158 }
159 #endif
160 
161 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
162 QString Attica::DownloadDescription::link()
163 {
164  return d->link;
165 }
166 #endif
167 
168 QString Attica::DownloadDescription::link() const
169 {
170  return d->link;
171 }
172 
173 void DownloadDescription::setLink(const QString &link)
174 {
175  d->link = link;
176 }
177 
178 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
179 QString Attica::DownloadDescription::name()
180 {
181  return d->name;
182 }
183 #endif
184 
185 QString Attica::DownloadDescription::name() const
186 {
187  return d->name;
188 }
189 
190 void DownloadDescription::setName(const QString &name)
191 {
192  d->name = name;
193 }
194 
195 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
196 QString Attica::DownloadDescription::priceAmount()
197 {
198  return d->priceAmount;
199 }
200 #endif
201 
202 QString Attica::DownloadDescription::priceAmount() const
203 {
204  return d->priceAmount;
205 }
206 
207 void DownloadDescription::setPriceAmount(const QString &priceAmount)
208 {
209  d->priceAmount = priceAmount;
210 }
211 
212 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
213 QString Attica::DownloadDescription::priceReason()
214 {
215  return d->priceReason;
216 }
217 #endif
218 
219 QString Attica::DownloadDescription::priceReason() const
220 {
221  return d->priceReason;
222 }
223 
224 void Attica::DownloadDescription::setPriceReason(const QString &priceReason)
225 {
226  d->priceReason = priceReason;
227 }
228 
229 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
230 uint Attica::DownloadDescription::size()
231 {
232  return d->size;
233 }
234 #endif
235 
236 uint Attica::DownloadDescription::size() const
237 {
238  return d->size;
239 }
240 
241 void Attica::DownloadDescription::setSize(uint size)
242 {
243  d->size = size;
244 }
245 
246 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
247 QString Attica::DownloadDescription::gpgFingerprint()
248 {
249  return d->gpgFingerprint;
250 }
251 #endif
252 
253 QString Attica::DownloadDescription::gpgFingerprint() const
254 {
255  return d->gpgFingerprint;
256 }
257 
258 void Attica::DownloadDescription::setGpgFingerprint(const QString &fingerprint)
259 {
260  d->gpgFingerprint = fingerprint;
261 }
262 
263 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
264 QString Attica::DownloadDescription::gpgSignature()
265 {
266  return d->gpgSignature;
267 }
268 #endif
269 
270 QString Attica::DownloadDescription::gpgSignature() const
271 {
272  return d->gpgSignature;
273 }
274 
275 void Attica::DownloadDescription::setGpgSignature(const QString &signature)
276 {
277  d->gpgSignature = signature;
278 }
279 
280 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
281 QString Attica::DownloadDescription::packageName()
282 {
283  return d->packageName;
284 }
285 #endif
286 
287 QString Attica::DownloadDescription::packageName() const
288 {
289  return d->packageName;
290 }
291 
292 void Attica::DownloadDescription::setPackageName(const QString &packageName)
293 {
294  d->packageName = packageName;
295 }
296 
297 #if ATTICA_BUILD_DEPRECATED_SINCE(5, 4)
298 QString Attica::DownloadDescription::repository()
299 {
300  return d->repository;
301 }
302 #endif
303 
304 QString Attica::DownloadDescription::repository() const
305 {
306  return d->repository;
307 }
308 
309 void Attica::DownloadDescription::setRepository(const QString &repository)
310 {
311  d->repository = repository;
312 }
313 
314 QStringList Attica::DownloadDescription::tags() const
315 {
316  return d->tags;
317 }
318 
319 void Attica::DownloadDescription::setTags(const QStringList &tags)
320 {
321  d->tags = tags;
322 }
QString name(const QVariant &location)
Type type(const QSqlDatabase &db)
Category category(StandardShortcut id)
KIOCORE_EXPORT CopyJob * link(const QUrl &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 03:59:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.