• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KNewStuff

entry.cpp

Go to the documentation of this file.
00001 /*
00002     This file is part of KNewStuff2.
00003     Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
00004     Copyright (c) 2003 - 2007 Josef Spillner <spillner@kde.org>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Lesser General Public
00008     License as published by the Free Software Foundation; either
00009     version 2.1 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Lesser General Public License for more details.
00015 
00016     You should have received a copy of the GNU Lesser General Public
00017     License along with this library.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 
00020 #include "entry.h"
00021 
00022 using namespace KNS;
00023 
00024 struct KNS::EntryPrivate {
00025     EntryPrivate() : mReleaseDate(QDate::currentDate())
00026             , mRelease(0)
00027             , mRating(0)
00028             , mDownloads(0)
00029             , mIdNumber(0)
00030             , mStatus(Entry::Invalid)
00031             , mSource(Entry::Online) {}
00032 
00033     QString mCategory;
00034     QString mLicense;
00035     QString mVersion;
00036     QDate mReleaseDate;
00037     Author mAuthor;
00038     int mRelease;
00039     int mRating;
00040     int mDownloads;
00041     KTranslatable mName;
00042     KTranslatable mSummary;
00043     KTranslatable mPayload;
00044     KTranslatable mPreview;
00045     QStringList mInstalledFiles;
00046     int mIdNumber;
00047     QStringList mUnInstalledFiles;
00048 
00049     QString mChecksum;
00050     QString mSignature;
00051     Entry::Status mStatus;
00052     Entry::Source mSource;
00053 };
00054 
00055 Entry::Entry()
00056         : d(new EntryPrivate)
00057 {
00058 }
00059 
00060 Entry::Entry(const Entry& other)
00061         : d(new EntryPrivate(*other.d))
00062 {
00063 }
00064 
00065 Entry& Entry::operator=(const Entry & other)
00066 {
00067     *d = *other.d;
00068     return *this;
00069 }
00070 
00071 Entry::~Entry()
00072 {
00073     delete d;
00074 }
00075 
00076 void Entry::setName(const KTranslatable& name)
00077 {
00078     d->mName = name;
00079 }
00080 
00081 KTranslatable Entry::name() const
00082 {
00083     return d->mName;
00084 }
00085 
00086 void Entry::setCategory(const QString& category)
00087 {
00088     d->mCategory = category;
00089 }
00090 
00091 QString Entry::category() const
00092 {
00093     return d->mCategory;
00094 }
00095 
00096 void Entry::setAuthor(const Author &author)
00097 {
00098     d->mAuthor = author;
00099 }
00100 
00101 Author Entry::author() const
00102 {
00103     return d->mAuthor;
00104 }
00105 
00106 void Entry::setLicense(const QString &license)
00107 {
00108     d->mLicense = license;
00109 }
00110 
00111 QString Entry::license() const
00112 {
00113     return d->mLicense;
00114 }
00115 
00116 void Entry::setSummary(const KTranslatable &text)
00117 {
00118     d->mSummary = text;
00119 }
00120 
00121 KTranslatable Entry::summary() const
00122 {
00123     return d->mSummary;
00124 }
00125 
00126 void Entry::setVersion(const QString& version)
00127 {
00128     d->mVersion = version;
00129 }
00130 
00131 QString Entry::version() const
00132 {
00133     return d->mVersion;
00134 }
00135 
00136 void Entry::setRelease(int release)
00137 {
00138     d->mRelease = release;
00139 }
00140 
00141 int Entry::release() const
00142 {
00143     return d->mRelease;
00144 }
00145 
00146 void Entry::setReleaseDate(const QDate& date)
00147 {
00148     d->mReleaseDate = date;
00149 }
00150 
00151 QDate Entry::releaseDate() const
00152 {
00153     return d->mReleaseDate;
00154 }
00155 
00156 void Entry::setPayload(const KTranslatable& url)
00157 {
00158     d->mPayload = url;
00159 }
00160 
00161 KTranslatable Entry::payload() const
00162 {
00163     return d->mPayload;
00164 }
00165 
00166 void Entry::setPreview(const KTranslatable& url)
00167 {
00168     d->mPreview = url;
00169 }
00170 
00171 KTranslatable Entry::preview() const
00172 {
00173     return d->mPreview;
00174 }
00175 
00176 void Entry::setRating(int rating)
00177 {
00178     d->mRating = rating;
00179 }
00180 
00181 int Entry::rating() const
00182 {
00183     return d->mRating;
00184 }
00185 
00186 void Entry::setDownloads(int downloads)
00187 {
00188     d->mDownloads = downloads;
00189 }
00190 
00191 int Entry::downloads() const
00192 {
00193     return d->mDownloads;
00194 }
00195 
00196 void Entry::setChecksum(const QString& checksum)
00197 {
00198     d->mChecksum = checksum;
00199 }
00200 
00201 QString Entry::checksum() const
00202 {
00203     return d->mChecksum;
00204 }
00205 
00206 void Entry::setSignature(const QString& signature)
00207 {
00208     d->mSignature = signature;
00209 }
00210 
00211 QString Entry::signature() const
00212 {
00213     return d->mSignature;
00214 }
00215 
00216 Entry::Status Entry::status()
00217 {
00218     return d->mStatus;
00219 }
00220 
00221 void Entry::setStatus(Status status)
00222 {
00223     d->mStatus = status;
00224 }
00225 
00226 Entry::Source Entry::source()
00227 {
00228     return d->mSource;
00229 }
00230 
00231 void Entry::setSource(Source source)
00232 {
00233     d->mSource = source;
00234 }
00235 
00236 void KNS::Entry::setInstalledFiles(const QStringList & files)
00237 {
00238     d->mInstalledFiles = files;
00239 }
00240 
00241 QStringList KNS::Entry::installedFiles() const
00242 {
00243     return d->mInstalledFiles;
00244 }
00245 
00246 void Entry::setIdNumber(int number)
00247 {
00248     d->mIdNumber = number;
00249 }
00250 
00251 int Entry::idNumber() const
00252 {
00253     return d->mIdNumber;
00254 }
00255 
00256 void KNS::Entry::setUnInstalledFiles(const QStringList & files)
00257 {
00258     d->mUnInstalledFiles = files;
00259 }
00260 
00261 QStringList KNS::Entry::uninstalledFiles() const
00262 {
00263     return d->mUnInstalledFiles;
00264 }
00265 

KNewStuff

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal