Attica

downloaddescription.cpp
1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2009 Frederik Gladhorn <gladhorn@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 "downloaddescription.h"
10
11#include <QStringList>
12
13namespace Attica
14{
15class Q_DECL_HIDDEN DownloadDescription::Private : public QSharedData
16{
17public:
18 int id = 0;
19 Attica::DownloadDescription::Type type = Attica::DownloadDescription::FileDownload;
20 bool hasPrice = false;
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;
34};
35}
36
37using namespace Attica;
38
39DownloadDescription::DownloadDescription()
40 : d(new Private)
41{
42}
43
44DownloadDescription::DownloadDescription(const Attica::DownloadDescription &other)
45 : d(other.d)
46{
47}
48
49DownloadDescription &DownloadDescription::operator=(const Attica::DownloadDescription &other)
50{
51 d = other.d;
52 return *this;
53}
54
55DownloadDescription::~DownloadDescription()
56{
57}
58
59QString Attica::DownloadDescription::category() const
60{
61 return d->category;
62}
63
65{
66 return d->id;
67}
68
69void DownloadDescription::setId(int id)
70{
71 d->id = id;
72}
73
74void DownloadDescription::setCategory(const QString &category)
75{
76 d->category = category;
77}
78
79QString Attica::DownloadDescription::distributionType() const
80{
81 return d->distributionType;
82}
83
84void DownloadDescription::setDistributionType(const QString &distributionType)
85{
86 d->distributionType = distributionType;
87}
88
89bool Attica::DownloadDescription::hasPrice() const
90{
91 return d->hasPrice;
92}
93
94void DownloadDescription::setHasPrice(bool hasPrice)
95{
96 d->hasPrice = hasPrice;
97}
98
99Attica::DownloadDescription::Type DownloadDescription::type() const
100{
101 return d->type;
102}
103
104void DownloadDescription::setType(Attica::DownloadDescription::Type type)
105{
106 d->type = type;
107}
108
109QString Attica::DownloadDescription::link() const
110{
111 return d->link;
112}
113
114void DownloadDescription::setLink(const QString &link)
115{
116 d->link = link;
117}
118
119QString Attica::DownloadDescription::name() const
120{
121 return d->name;
122}
123
124void DownloadDescription::setName(const QString &name)
125{
126 d->name = name;
127}
128
129QString Attica::DownloadDescription::priceAmount() const
130{
131 return d->priceAmount;
132}
133
134void DownloadDescription::setPriceAmount(const QString &priceAmount)
135{
136 d->priceAmount = priceAmount;
137}
138
139QString Attica::DownloadDescription::priceReason() const
140{
141 return d->priceReason;
142}
143
144void Attica::DownloadDescription::setPriceReason(const QString &priceReason)
145{
146 d->priceReason = priceReason;
147}
148
149uint Attica::DownloadDescription::size() const
150{
151 return d->size;
152}
153
154void Attica::DownloadDescription::setSize(uint size)
155{
156 d->size = size;
157}
158
159QString Attica::DownloadDescription::gpgFingerprint() const
160{
161 return d->gpgFingerprint;
162}
163
164void Attica::DownloadDescription::setGpgFingerprint(const QString &fingerprint)
165{
166 d->gpgFingerprint = fingerprint;
167}
168
169QString Attica::DownloadDescription::gpgSignature() const
170{
171 return d->gpgSignature;
172}
173
174void Attica::DownloadDescription::setGpgSignature(const QString &signature)
175{
176 d->gpgSignature = signature;
177}
178
179QString Attica::DownloadDescription::packageName() const
180{
181 return d->packageName;
182}
183
184void Attica::DownloadDescription::setPackageName(const QString &packageName)
185{
186 d->packageName = packageName;
187}
188
189QString Attica::DownloadDescription::repository() const
190{
191 return d->repository;
192}
193
194void Attica::DownloadDescription::setRepository(const QString &repository)
195{
196 d->repository = repository;
197}
198
200{
201 return d->tags;
202}
203
205{
206 d->tags = tags;
207}
208
210{
211 return d->version;
212}
213
215{
216 d->version = version;
217}
Represents a download description.
void setTags(const QStringList &tags)
Set the list of tags for this download description.
void setVersion(const QString &version)
QString version() const
The download version as set on the remote.
QStringList tags() const
Get the list of tags for this download description.
int id() const
The id of the description - as one Content can have multiple download descriptions associated.
Type type(const QSqlDatabase &db)
The Attica namespace,.
KDB_EXPORT KDbVersionInfo version()
KIOCORE_EXPORT CopyJob * link(const QList< QUrl > &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
QString name(StandardAction id)
Category category(StandardShortcut id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:54:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.