• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.4 API Reference
  • KDE Home
  • Contact Us
 

KNewStuff

  • knewstuff
  • knewstuff2
  • core
knewstuff2/core/entry.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KNewStuff2.
3  Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4  Copyright (c) 2003 - 2007 Josef Spillner <spillner@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #include "entry.h"
21 
22 using namespace KNS;
23 
24 struct KNS::EntryPrivate {
25  EntryPrivate() : mReleaseDate(QDate::currentDate())
26  , mRelease(0)
27  , mRating(0)
28  , mDownloads(0)
29  , mIdNumber(0)
30  , mStatus(Entry::Invalid)
31  , mSource(Entry::Online) {}
32 
33  QString mCategory;
34  QString mLicense;
35  QString mVersion;
36  QDate mReleaseDate;
37  Author mAuthor;
38  int mRelease;
39  int mRating;
40  int mDownloads;
41  KTranslatable mName;
42  KTranslatable mSummary;
43  KTranslatable mPayload;
44  KTranslatable mPreview;
45  QStringList mInstalledFiles;
46  int mIdNumber;
47  QStringList mUnInstalledFiles;
48 
49  QString mChecksum;
50  QString mSignature;
51  Entry::Status mStatus;
52  Entry::Source mSource;
53 };
54 
55 Entry::Entry()
56  : d(new EntryPrivate)
57 {
58 }
59 
60 Entry::Entry(const Entry& other)
61  : d(new EntryPrivate(*other.d))
62 {
63 }
64 
65 Entry& Entry::operator=(const Entry & other)
66 {
67  *d = *other.d;
68  return *this;
69 }
70 
71 Entry::~Entry()
72 {
73  delete d;
74 }
75 
76 void Entry::setName(const KTranslatable& name)
77 {
78  d->mName = name;
79 }
80 
81 KTranslatable Entry::name() const
82 {
83  return d->mName;
84 }
85 
86 void Entry::setCategory(const QString& category)
87 {
88  d->mCategory = category;
89 }
90 
91 QString Entry::category() const
92 {
93  return d->mCategory;
94 }
95 
96 void Entry::setAuthor(const Author &author)
97 {
98  d->mAuthor = author;
99 }
100 
101 Author Entry::author() const
102 {
103  return d->mAuthor;
104 }
105 
106 void Entry::setLicense(const QString &license)
107 {
108  d->mLicense = license;
109 }
110 
111 QString Entry::license() const
112 {
113  return d->mLicense;
114 }
115 
116 void Entry::setSummary(const KTranslatable &text)
117 {
118  d->mSummary = text;
119 }
120 
121 KTranslatable Entry::summary() const
122 {
123  return d->mSummary;
124 }
125 
126 void Entry::setVersion(const QString& version)
127 {
128  d->mVersion = version;
129 }
130 
131 QString Entry::version() const
132 {
133  return d->mVersion;
134 }
135 
136 void Entry::setRelease(int release)
137 {
138  d->mRelease = release;
139 }
140 
141 int Entry::release() const
142 {
143  return d->mRelease;
144 }
145 
146 void Entry::setReleaseDate(const QDate& date)
147 {
148  d->mReleaseDate = date;
149 }
150 
151 QDate Entry::releaseDate() const
152 {
153  return d->mReleaseDate;
154 }
155 
156 void Entry::setPayload(const KTranslatable& url)
157 {
158  d->mPayload = url;
159 }
160 
161 KTranslatable Entry::payload() const
162 {
163  return d->mPayload;
164 }
165 
166 void Entry::setPreview(const KTranslatable& url)
167 {
168  d->mPreview = url;
169 }
170 
171 KTranslatable Entry::preview() const
172 {
173  return d->mPreview;
174 }
175 
176 void Entry::setRating(int rating)
177 {
178  d->mRating = rating;
179 }
180 
181 int Entry::rating() const
182 {
183  return d->mRating;
184 }
185 
186 void Entry::setDownloads(int downloads)
187 {
188  d->mDownloads = downloads;
189 }
190 
191 int Entry::downloads() const
192 {
193  return d->mDownloads;
194 }
195 
196 void Entry::setChecksum(const QString& checksum)
197 {
198  d->mChecksum = checksum;
199 }
200 
201 QString Entry::checksum() const
202 {
203  return d->mChecksum;
204 }
205 
206 void Entry::setSignature(const QString& signature)
207 {
208  d->mSignature = signature;
209 }
210 
211 QString Entry::signature() const
212 {
213  return d->mSignature;
214 }
215 
216 Entry::Status Entry::status()
217 {
218  return d->mStatus;
219 }
220 
221 void Entry::setStatus(Status status)
222 {
223  d->mStatus = status;
224 }
225 
226 Entry::Source Entry::source()
227 {
228  return d->mSource;
229 }
230 
231 void Entry::setSource(Source source)
232 {
233  d->mSource = source;
234 }
235 
236 void KNS::Entry::setInstalledFiles(const QStringList & files)
237 {
238  d->mInstalledFiles = files;
239 }
240 
241 QStringList KNS::Entry::installedFiles() const
242 {
243  return d->mInstalledFiles;
244 }
245 
246 void Entry::setIdNumber(int number)
247 {
248  d->mIdNumber = number;
249 }
250 
251 int Entry::idNumber() const
252 {
253  return d->mIdNumber;
254 }
255 
256 void KNS::Entry::setUnInstalledFiles(const QStringList & files)
257 {
258  d->mUnInstalledFiles = files;
259 }
260 
261 QStringList KNS::Entry::uninstalledFiles() const
262 {
263  return d->mUnInstalledFiles;
264 }
265 
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Wed Jun 5 2013 18:40:05 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KNewStuff

Skip menu "KNewStuff"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.10.4 API Reference

Skip menu "kdelibs-4.10.4 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal