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

KNewStuff

  • knewstuff
  • knewstuff3
  • core
entryinternal.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 Copyright (C) 2009 Frederik Gladhorn <gladhorn@kde.org>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#include "entryinternal.h"
22
23#include <QtCore/QStringList>
24#include <QtGui/QImage>
25#include <kdebug.h>
26
27#include "core/xmlloader.h"
28
29#include <knewstuff3/entry_p.h>
30
31
32using namespace KNS3;
33
34class EntryInternal::Private : public QSharedData
35{
36 public:
37 Private()
38 : mReleaseDate(QDate::currentDate())
39 , mRating(0)
40 , mDownloadCount(0)
41 , mNumberFans(0)
42 , mNumberKnowledgebaseEntries(0)
43 , mStatus(Entry::Invalid)
44 , mSource(EntryInternal::Online)
45 {}
46
47 bool operator==(const Private& other) const
48 {
49 return mUniqueId == other.mUniqueId && mProviderId == other.mProviderId;
50 }
51
52 QString mUniqueId;
53 QString mName;
54 KUrl mHomepage;
55 QString mCategory;
56 QString mLicense;
57 QString mVersion;
58 QDate mReleaseDate;
59
60 // Version and date if a newer version is found (updateable)
61 QString mUpdateVersion;
62 QDate mUpdateReleaseDate;
63
64 Author mAuthor;
65 int mRating;
66 int mDownloadCount;
67 int mNumberFans;
68 int mNumberKnowledgebaseEntries;
69 QString mKnowledgebaseLink;
70 QString mSummary;
71 QString mChangelog;
72 QString mPayload;
73 QStringList mInstalledFiles;
74 QString mProviderId;
75 QStringList mUnInstalledFiles;
76 QString mDonationLink;
77
78 QString mChecksum;
79 QString mSignature;
80 Entry::Status mStatus;
81 EntryInternal::Source mSource;
82
83 QString mPreviewUrl[6];
84 QImage mPreviewImage[6];
85
86 QList<EntryInternal::DownloadLinkInformation> mDownloadLinkInformationList;
87};
88
89EntryInternal::EntryInternal()
90 : d(new Private)
91{
92}
93
94EntryInternal::EntryInternal(const EntryInternal& other)
95 : d(other.d)
96{
97}
98
99EntryInternal& EntryInternal::operator=(const EntryInternal& other)
100{
101 d = other.d;
102 return *this;
103}
104
105bool EntryInternal::operator<(const KNS3::EntryInternal& other) const
106{
107 return d->mUniqueId < other.d->mUniqueId;
108}
109
110bool EntryInternal::operator==(const KNS3::EntryInternal& other) const
111{
112 return d->mUniqueId == other.d->mUniqueId && d->mProviderId == other.d->mProviderId;
113}
114
115EntryInternal::~EntryInternal()
116{
117}
118
119bool EntryInternal::isValid() const
120{
121 return !d->mUniqueId.isEmpty();
122}
123
124QString EntryInternal::name() const
125{
126 return d->mName;
127}
128
129void EntryInternal::setName(const QString& name)
130{
131 d->mName = name;
132}
133
134QString EntryInternal::uniqueId() const
135{
136 return d->mUniqueId;
137}
138
139void EntryInternal::setUniqueId(const QString& id)
140{
141 d->mUniqueId = id;
142}
143
144QString EntryInternal::providerId() const
145{
146 return d->mProviderId;
147}
148
149void EntryInternal::setProviderId(const QString& id)
150{
151 d->mProviderId = id;
152}
153
154QString EntryInternal::category() const
155{
156 return d->mCategory;
157}
158
159void EntryInternal::setCategory(const QString& category)
160{
161 d->mCategory = category;
162}
163
164KUrl EntryInternal::homepage() const
165{
166 return d->mHomepage;
167}
168
169void EntryInternal::setHomepage(const KUrl& page)
170{
171 d->mHomepage = page;
172}
173
174Author EntryInternal::author() const
175{
176 return d->mAuthor;
177}
178
179void EntryInternal::setAuthor(const KNS3::Author& author)
180{
181 d->mAuthor = author;
182}
183
184QString EntryInternal::license() const
185{
186 return d->mLicense;
187}
188
189void EntryInternal::setLicense(const QString& license)
190{
191 d->mLicense = license;
192}
193
194QString EntryInternal::summary() const
195{
196 return d->mSummary;
197}
198
199void EntryInternal::setSummary(const QString& summary)
200{
201 d->mSummary = summary;
202}
203
204void EntryInternal::setChangelog(const QString& changelog)
205{
206 d->mChangelog = changelog;
207}
208
209QString EntryInternal::changelog() const
210{
211 return d->mChangelog;
212}
213
214QString EntryInternal::version() const
215{
216 return d->mVersion;
217}
218
219void EntryInternal::setVersion(const QString& version)
220{
221 d->mVersion = version;
222}
223
224QDate EntryInternal::releaseDate() const
225{
226 return d->mReleaseDate;
227}
228
229void EntryInternal::setReleaseDate(const QDate& releasedate)
230{
231 d->mReleaseDate = releasedate;
232}
233
234QString EntryInternal::payload() const
235{
236 return d->mPayload;
237}
238
239void EntryInternal::setPayload(const QString& url)
240{
241 d->mPayload = url;
242}
243
244QDate EntryInternal::updateReleaseDate() const
245{
246 return d->mUpdateReleaseDate;
247}
248
249void EntryInternal::setUpdateReleaseDate(const QDate& releasedate)
250{
251 d->mUpdateReleaseDate = releasedate;
252}
253
254QString EntryInternal::updateVersion() const
255{
256 return d->mUpdateVersion;
257}
258
259void EntryInternal::setUpdateVersion(const QString& version)
260{
261 d->mUpdateVersion = version;
262}
263
264QString EntryInternal::previewUrl(PreviewType type) const
265{
266 return d->mPreviewUrl[type];
267}
268
269void EntryInternal::setPreviewUrl(const QString& url, PreviewType type)
270{
271 d->mPreviewUrl[type] = url;
272}
273
274QImage EntryInternal::previewImage(PreviewType type) const
275{
276 return d->mPreviewImage[type];
277}
278
279void EntryInternal::setPreviewImage(const QImage& image, PreviewType type)
280{
281 d->mPreviewImage[type] = image;
282}
283
284int EntryInternal::rating() const
285{
286 return d->mRating;
287}
288
289void EntryInternal::setRating(int rating)
290{
291 d->mRating = rating;
292}
293
294int EntryInternal::downloadCount() const
295{
296 return d->mDownloadCount;
297}
298
299void EntryInternal::setDownloadCount(int downloads)
300{
301 d->mDownloadCount = downloads;
302}
303
304int EntryInternal::numberFans() const
305{
306 return d->mNumberFans;
307}
308
309void EntryInternal::setNumberFans(int fans)
310{
311 d->mNumberFans = fans;
312}
313
314QString EntryInternal::donationLink() const
315{
316 return d->mDonationLink;
317}
318
319void EntryInternal::setDonationLink(const QString& link)
320{
321 d->mDonationLink = link;
322}
323
324int EntryInternal::numberKnowledgebaseEntries() const
325{
326 return d->mNumberKnowledgebaseEntries;
327}
328void EntryInternal::setNumberKnowledgebaseEntries(int num)
329{
330 d->mNumberKnowledgebaseEntries = num;
331}
332
333QString EntryInternal::knowledgebaseLink() const
334{
335 return d->mKnowledgebaseLink;
336}
337void EntryInternal::setKnowledgebaseLink(const QString& link)
338{
339 d->mKnowledgebaseLink = link;
340}
341
342
343/*
344QString EntryInternal::checksum() const
345{
346
347 return d->mChecksum;
348}
349
350QString EntryInternal::signature() const
351{
352
353 return d->mSignature;
354}
355*/
356
357EntryInternal::Source EntryInternal::source() const
358{
359 return d->mSource;
360}
361
362void EntryInternal::setSource(Source source)
363{
364 d->mSource = source;
365}
366
367Entry::Status EntryInternal::status() const
368{
369 return d->mStatus;
370}
371
372void EntryInternal::setStatus(Entry::Status status)
373{
374 d->mStatus = status;
375}
376
377void KNS3::EntryInternal::setInstalledFiles(const QStringList & files)
378{
379 d->mInstalledFiles = files;
380}
381
382QStringList KNS3::EntryInternal::installedFiles() const
383{
384 return d->mInstalledFiles;
385}
386
387void KNS3::EntryInternal::setUnInstalledFiles(const QStringList & files)
388{
389 d->mUnInstalledFiles = files;
390}
391
392QStringList KNS3::EntryInternal::uninstalledFiles() const
393{
394 return d->mUnInstalledFiles;
395}
396
397int KNS3::EntryInternal::downloadLinkCount() const
398{
399 return d->mDownloadLinkInformationList.size();
400}
401
402QList<KNS3::EntryInternal::DownloadLinkInformation> KNS3::EntryInternal::downloadLinkInformationList() const
403{
404 return d->mDownloadLinkInformationList;
405}
406
407void KNS3::EntryInternal::appendDownloadLinkInformation(const KNS3::EntryInternal::DownloadLinkInformation& info)
408{
409 d->mDownloadLinkInformationList.append(info);
410}
411
412void EntryInternal::clearDownloadLinkInformation()
413{
414 d->mDownloadLinkInformationList.clear();
415}
416
417bool KNS3::EntryInternal::setEntryXML(const QDomElement & xmldata)
418{
419 if (xmldata.tagName() != "stuff") {
420 kWarning() << "Parsing Entry from invalid XML";
421 return false;
422 }
423
424 d->mCategory = xmldata.attribute("category");
425
426 QDomNode n;
427 for (n = xmldata.firstChild(); !n.isNull(); n = n.nextSibling()) {
428 QDomElement e = n.toElement();
429 if (e.tagName() == "name") {
430 // TODO maybe do something with the language attribute? QString lang = e.attribute("lang");
431 d->mName = e.text().trimmed();
432 } else if (e.tagName() == "author") {
433 QString email = e.attribute("email");
434 QString jabber = e.attribute("im");
435 QString homepage = e.attribute("homepage");
436 d->mAuthor.setName(e.text().trimmed());
437 d->mAuthor.setEmail(email);
438 d->mAuthor.setJabber(jabber);
439 d->mAuthor.setHomepage(homepage);
440 } else if (e.tagName() == "providerid") {
441 d->mProviderId = e.text();
442 } else if (e.tagName() == "homepage") {
443 d->mHomepage = e.text();
444 } else if (e.tagName() == "licence") { // krazy:exclude=spelling
445 d->mLicense = e.text().trimmed();
446 } else if (e.tagName() == "summary") {
447 d->mSummary = e.text();
448 } else if (e.tagName() == "changelog") {
449 d->mChangelog = e.text();
450 } else if (e.tagName() == "version") {
451 d->mVersion = e.text().trimmed();
452 } else if (e.tagName() == "releasedate") {
453 d->mReleaseDate = QDate::fromString(e.text().trimmed(), Qt::ISODate);
454 } else if (e.tagName() == "preview") {
455 // TODO support for all 6 image links
456 d->mPreviewUrl[PreviewSmall1] = e.text().trimmed();
457 } else if (e.tagName() == "previewBig") {
458 d->mPreviewUrl[PreviewBig1] = e.text().trimmed();
459 } else if (e.tagName() == "payload") {
460 d->mPayload = e.text().trimmed();
461 } else if (e.tagName() == "rating") {
462 d->mRating = e.text().toInt();
463 } else if (e.tagName() == "downloads") {
464 d->mDownloadCount = e.text().toInt();
465 } else if (e.tagName() == "category") {
466 d->mCategory = e.text();
467 } else if (e.tagName() == "signature") {
468 d->mSignature = e.text();
469 } else if (e.tagName() == "checksum") {
470 d->mChecksum = e.text();
471 } else if (e.tagName() == "installedfile") {
472 d->mInstalledFiles.append(e.text());
473 } else if (e.tagName() == "id") {
474 d->mUniqueId = e.text();
475 } else if (e.tagName() == "status") {
476 QString statusText = e.text();
477 if (statusText == "installed") {
478 kDebug() << "Found an installed entry in registry";
479 d->mStatus = Entry::Installed;
480 } else if (statusText == "updateable") {
481 d->mStatus = Entry::Updateable;
482 }
483 }
484 }
485
486 // Validation
487 if (d->mName.isEmpty()) {
488 kWarning(550) << "Entry: no name given";
489 return false;
490 }
491
492 if (d->mUniqueId.isEmpty()) {
493 if (!d->mPayload.isEmpty()) {
494 d->mUniqueId = d->mPayload;
495 } else {
496 d->mUniqueId = d->mName;
497 }
498 }
499
500 if (d->mPayload.isEmpty()) {
501 kWarning(550) << "Entry: no payload URL given for: " << d->mName << " - " << d->mUniqueId;
502 return false;
503 }
504 return true;
505}
506
510QDomElement KNS3::EntryInternal::entryXML() const
511{
512 Q_ASSERT(!d->mUniqueId.isEmpty());
513 Q_ASSERT(!d->mProviderId.isEmpty());
514
515 QDomDocument doc;
516
517 QDomElement el = doc.createElement("stuff");
518 el.setAttribute("category", d->mCategory);
519
520 QString name = d->mName;
521
522 QDomElement e;
523 e = addElement(doc, el, "name", name);
524 // todo: add language attribute
525 (void)addElement(doc, el, "providerid", d->mProviderId);
526
527 QDomElement author = addElement(doc, el, "author", d->mAuthor.name());
528 if (!d->mAuthor.email().isEmpty())
529 author.setAttribute("email", d->mAuthor.email());
530 if (!d->mAuthor.homepage().isEmpty())
531 author.setAttribute("homepage", d->mAuthor.homepage());
532 if (!d->mAuthor.jabber().isEmpty())
533 author.setAttribute("im", d->mAuthor.jabber());
534 // FIXME: 'jabber' or 'im'? consult with kopete guys...
535 addElement(doc, el, "homepage", d->mHomepage.url());
536 (void)addElement(doc, el, "licence", d->mLicense); // krazy:exclude=spelling
537 (void)addElement(doc, el, "version", d->mVersion);
538 if ((d->mRating > 0) || (d->mDownloadCount > 0)) {
539 (void)addElement(doc, el, "rating", QString::number(d->mRating));
540 (void)addElement(doc, el, "downloads", QString::number(d->mDownloadCount));
541 }
542 if (!d->mSignature.isEmpty()) {
543 (void)addElement(doc, el, "signature", d->mSignature);
544 }
545 if (!d->mChecksum.isEmpty()) {
546 (void)addElement(doc, el, "checksum", d->mChecksum);
547 }
548 foreach(const QString &file, d->mInstalledFiles) {
549 (void)addElement(doc, el, "installedfile", file);
550 }
551 if (!d->mUniqueId.isEmpty()) {
552 addElement(doc, el, "id", d->mUniqueId);
553 }
554
555 (void)addElement(doc, el, "releasedate",
556 d->mReleaseDate.toString(Qt::ISODate));
557
558 e = addElement(doc, el, "summary", d->mSummary);
559 e = addElement(doc, el, "changelog", d->mChangelog);
560 e = addElement(doc, el, "preview", d->mPreviewUrl[PreviewSmall1]);
561 e = addElement(doc, el, "previewBig", d->mPreviewUrl[PreviewBig1]);
562 e = addElement(doc, el, "payload", d->mPayload);
563
564 if (d->mStatus == Entry::Installed) {
565 (void)addElement(doc, el, "status", "installed");
566 }
567 if (d->mStatus == Entry::Updateable) {
568 (void)addElement(doc, el, "status", "updateable");
569 }
570
571 return el;
572}
573
574Entry EntryInternal::toEntry() const
575{
576 Entry e;
577 e.d->e = *this;
578 return e;
579}
580
581KNS3::EntryInternal EntryInternal::fromEntry(const KNS3::Entry& entry)
582{
583 return entry.d->e;
584}
585
586QString KNS3::replaceBBCode(const QString& unformattedText)
587{
588 QString text(unformattedText);
589 text.replace("[b]", "<b>");
590 text.replace("[/b]", "</b>");
591 text.replace("[i]", "<i>");
592 text.replace("[/i]", "</i>");
593 text.replace("[u]", "<i>");
594 text.replace("[/u]", "</i>");
595 text.replace("\\\"", "\"");
596 text.replace("\\\'", "\'");
597 text.replace("[li]", "* "); // TODO: better replacement for list elements?
598 text.remove("[/li]");
599 text.remove("[url]");
600 text.remove("[/url]");
601 return text;
602}
KNS3::Author
KNewStuff author information.
Definition: knewstuff3/core/author.h:38
KNS3::EntryInternal
KNewStuff data entry container.
Definition: entryinternal.h:55
KNS3::EntryInternal::appendDownloadLinkInformation
void appendDownloadLinkInformation(const DownloadLinkInformation &info)
Definition: entryinternal.cpp:407
KNS3::EntryInternal::setVersion
void setVersion(const QString &version)
Sets the version number.
Definition: entryinternal.cpp:219
KNS3::EntryInternal::setUpdateReleaseDate
void setUpdateReleaseDate(const QDate &releasedate)
Sets the release date that is available as update.
Definition: entryinternal.cpp:249
KNS3::EntryInternal::setSource
void setSource(Source source)
The source of this entry can be Cache, Registry or Online -.
Definition: entryinternal.cpp:362
KNS3::EntryInternal::EntryInternal
EntryInternal()
Constructor.
Definition: entryinternal.cpp:89
KNS3::EntryInternal::setReleaseDate
void setReleaseDate(const QDate &releasedate)
Sets the release date.
Definition: entryinternal.cpp:229
KNS3::EntryInternal::fromEntry
static KNS3::EntryInternal fromEntry(const KNS3::Entry &entry)
Definition: entryinternal.cpp:581
KNS3::EntryInternal::version
QString version() const
Retrieve the version string of the object.
Definition: entryinternal.cpp:214
KNS3::EntryInternal::source
Source source() const
Definition: entryinternal.cpp:357
KNS3::EntryInternal::setUnInstalledFiles
void setUnInstalledFiles(const QStringList &files)
Set the files that have been uninstalled by the uninstall command.
Definition: entryinternal.cpp:387
KNS3::EntryInternal::donationLink
QString donationLink() const
Definition: entryinternal.cpp:314
KNS3::EntryInternal::homepage
KUrl homepage() const
Definition: entryinternal.cpp:164
KNS3::EntryInternal::operator==
bool operator==(const EntryInternal &other) const
Definition: entryinternal.cpp:110
KNS3::EntryInternal::license
QString license() const
Retrieve the license name of the object.
Definition: entryinternal.cpp:184
KNS3::EntryInternal::setUpdateVersion
void setUpdateVersion(const QString &version)
Sets the version number that is available as update.
Definition: entryinternal.cpp:259
KNS3::EntryInternal::knowledgebaseLink
QString knowledgebaseLink() const
Definition: entryinternal.cpp:333
KNS3::EntryInternal::~EntryInternal
~EntryInternal()
Destructor.
Definition: entryinternal.cpp:115
KNS3::EntryInternal::setEntryXML
bool setEntryXML(const QDomElement &xmldata)
set the xml for the entry parses the xml and sets the private members accordingly used to deserialize...
Definition: entryinternal.cpp:417
KNS3::EntryInternal::downloadLinkCount
int downloadLinkCount() const
Definition: entryinternal.cpp:397
KNS3::EntryInternal::name
QString name() const
Retrieve the name of the data object.
Definition: entryinternal.cpp:124
KNS3::EntryInternal::updateVersion
QString updateVersion() const
Retrieve the version string of the object that is available as update.
Definition: entryinternal.cpp:254
KNS3::EntryInternal::setSummary
void setSummary(const QString &summary)
Sets a short description on what the object is all about.
Definition: entryinternal.cpp:199
KNS3::EntryInternal::operator<
bool operator<(const EntryInternal &other) const
Definition: entryinternal.cpp:105
KNS3::EntryInternal::payload
QString payload() const
Retrieve the file name of the object.
Definition: entryinternal.cpp:234
KNS3::EntryInternal::setProviderId
void setProviderId(const QString &id)
Definition: entryinternal.cpp:149
KNS3::EntryInternal::downloadCount
int downloadCount() const
Retrieve the download count for the object, which has been determined by its hosting sites and thus m...
Definition: entryinternal.cpp:294
KNS3::EntryInternal::Source
Source
Source of the entry, A entry's data is coming from either cache, or an online provider this helps the...
Definition: entryinternal.h:64
KNS3::EntryInternal::Online
@ Online
Definition: entryinternal.h:66
KNS3::EntryInternal::setUniqueId
void setUniqueId(const QString &id)
Definition: entryinternal.cpp:139
KNS3::EntryInternal::setPreviewImage
void setPreviewImage(const QImage &image, PreviewType type=PreviewSmall1)
Definition: entryinternal.cpp:279
KNS3::EntryInternal::setPayload
void setPayload(const QString &url)
Sets the object's file.
Definition: entryinternal.cpp:239
KNS3::EntryInternal::entryXML
QDomElement entryXML() const
get the xml string for the entry
Definition: entryinternal.cpp:510
KNS3::EntryInternal::setDonationLink
void setDonationLink(const QString &link)
Definition: entryinternal.cpp:319
KNS3::EntryInternal::clearDownloadLinkInformation
void clearDownloadLinkInformation()
Definition: entryinternal.cpp:412
KNS3::EntryInternal::setPreviewUrl
void setPreviewUrl(const QString &url, PreviewType type=PreviewSmall1)
Sets the object's preview file, if available.
Definition: entryinternal.cpp:269
KNS3::EntryInternal::installedFiles
QStringList installedFiles() const
Retrieve the locally installed files.
Definition: entryinternal.cpp:382
KNS3::EntryInternal::previewUrl
QString previewUrl(PreviewType type=PreviewSmall1) const
Retrieve the file name of an image containing a preview of the object.
Definition: entryinternal.cpp:264
KNS3::EntryInternal::setNumberKnowledgebaseEntries
void setNumberKnowledgebaseEntries(int num)
Definition: entryinternal.cpp:328
KNS3::EntryInternal::setDownloadCount
void setDownloadCount(int downloads)
Sets the number of downloads.
Definition: entryinternal.cpp:299
KNS3::EntryInternal::setNumberFans
void setNumberFans(int fans)
Definition: entryinternal.cpp:309
KNS3::EntryInternal::setName
void setName(const QString &name)
Sets the name for this data object.
Definition: entryinternal.cpp:129
KNS3::EntryInternal::setStatus
void setStatus(Entry::Status status)
Returns the checksum for the entry.
Definition: entryinternal.cpp:372
KNS3::EntryInternal::setRating
void setRating(int rating)
Sets the rating between 0 (worst) and 100 (best).
Definition: entryinternal.cpp:289
KNS3::EntryInternal::author
Author author() const
Retrieve the author of the object.
Definition: entryinternal.cpp:174
KNS3::EntryInternal::PreviewType
PreviewType
Definition: entryinternal.h:70
KNS3::EntryInternal::status
Entry::Status status() const
Retrieves the entry's status.
Definition: entryinternal.cpp:367
KNS3::EntryInternal::releaseDate
QDate releaseDate() const
Retrieve the date of the object's publication.
Definition: entryinternal.cpp:224
KNS3::EntryInternal::providerId
QString providerId() const
The id of the provider this entry belongs to.
Definition: entryinternal.cpp:144
KNS3::EntryInternal::setAuthor
void setAuthor(const Author &author)
Sets the author of the object.
Definition: entryinternal.cpp:179
KNS3::EntryInternal::rating
int rating() const
Retrieve the rating for the object, which has been determined by its users and thus might change over...
Definition: entryinternal.cpp:284
KNS3::EntryInternal::summary
QString summary() const
Retrieve a short description about the object.
Definition: entryinternal.cpp:194
KNS3::EntryInternal::numberFans
int numberFans() const
Definition: entryinternal.cpp:304
KNS3::EntryInternal::setHomepage
void setHomepage(const KUrl &page)
Definition: entryinternal.cpp:169
KNS3::EntryInternal::previewImage
QImage previewImage(PreviewType type=PreviewSmall1) const
This will not be loaded automatically, instead use Engine to load the actual images.
Definition: entryinternal.cpp:274
KNS3::EntryInternal::numberKnowledgebaseEntries
int numberKnowledgebaseEntries() const
Definition: entryinternal.cpp:324
KNS3::EntryInternal::setKnowledgebaseLink
void setKnowledgebaseLink(const QString &link)
Definition: entryinternal.cpp:337
KNS3::EntryInternal::setInstalledFiles
void setInstalledFiles(const QStringList &files)
Set the files that have been installed by the install command.
Definition: entryinternal.cpp:377
KNS3::EntryInternal::setLicense
void setLicense(const QString &license)
Sets the license (abbreviation) applicable to the object.
Definition: entryinternal.cpp:189
KNS3::EntryInternal::uninstalledFiles
QStringList uninstalledFiles() const
Retrieve the locally uninstalled files.
Definition: entryinternal.cpp:392
KNS3::EntryInternal::setChangelog
void setChangelog(const QString &changelog)
The user written changelog.
Definition: entryinternal.cpp:204
KNS3::EntryInternal::downloadLinkInformationList
QList< DownloadLinkInformation > downloadLinkInformationList() const
Definition: entryinternal.cpp:402
KNS3::EntryInternal::uniqueId
QString uniqueId() const
Definition: entryinternal.cpp:134
KNS3::EntryInternal::category
QString category() const
Retrieve the category of the data object.
Definition: entryinternal.cpp:154
KNS3::EntryInternal::setCategory
void setCategory(const QString &category)
Sets the data category, e.g.
Definition: entryinternal.cpp:159
KNS3::EntryInternal::updateReleaseDate
QDate updateReleaseDate() const
Retrieve the date of the newer version that is available as update.
Definition: entryinternal.cpp:244
KNS3::EntryInternal::isValid
bool isValid() const
Definition: entryinternal.cpp:119
KNS3::EntryInternal::changelog
QString changelog() const
Definition: entryinternal.cpp:209
KNS3::EntryInternal::toEntry
Entry toEntry() const
Definition: entryinternal.cpp:574
KNS3::EntryInternal::operator=
EntryInternal & operator=(const EntryInternal &other)
Definition: entryinternal.cpp:99
KNS3::Entry
KNewStuff information about changed entries.
Definition: knewstuff3/entry.h:45
KNS3::Entry::Status
Status
Status of the entry.
Definition: knewstuff3/entry.h:58
KNS3::Entry::Installed
@ Installed
Definition: knewstuff3/entry.h:61
KNS3::Entry::Updateable
@ Updateable
Definition: knewstuff3/entry.h:62
KUrl
QList
entry_p.h
entryinternal.h
kDebug
#define kDebug
kWarning
#define kWarning
operator==
bool operator==(const KEntry &k1, const KEntry &k2)
kdebug.h
link
CopyJob * link(const KUrl &src, const KUrl &destDir, JobFlags flags=DefaultFlags)
KNS3
Definition: atticaprovider.cpp:36
KNS3::replaceBBCode
QString replaceBBCode(const QString &unformattedText)
function to remove bb code formatting that opendesktop sends
Definition: entryinternal.cpp:586
KNS3::addElement
QDomElement addElement(QDomDocument &doc, QDomElement &parent, const QString &tag, const QString &value)
Definition: xmlloader.cpp:80
name
const char * name(StandardAction id)
KNS3::EntryInternal::DownloadLinkInformation
Definition: entryinternal.h:79
xmlloader.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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.14.38 API Reference

Skip menu "kdelibs-4.14.38 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