korganizer Library API Documentation

entry.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018     Boston, MA 02111-1307, USA.
00019 */
00020 #ifndef KNEWSTUFF_ENTRY_H
00021 #define KNEWSTUFF_ENTRY_H
00022 
00023 #include <qdatetime.h>
00024 #include <qdom.h>
00025 #include <qmap.h>
00026 #include <qstring.h>
00027 #include <qstringlist.h>
00028 
00029 #include <kurl.h>
00030 
00031 namespace KNS {
00032 
00044 class Entry
00045 {
00046   public:
00047     Entry();
00051     Entry( const QDomElement & );
00052 
00056     ~Entry();
00057 
00061     void setName( const QString & );
00062 
00068     QString name() const;
00069 
00073     void setType( const QString & );
00074 
00080     QString type() const;
00081 
00085     void setAuthor( const QString & );
00086 
00092     QString author() const;
00093 
00097     void setLicence( const QString & );
00098 
00104     QString license() const;
00105 
00109     void setSummary( const QString &, const QString &lang = QString::null );
00110 
00117     QString summary( const QString &lang = QString::null ) const;
00118 
00122     void setVersion( const QString & );
00123 
00129     QString version() const;
00130 
00135     void setRelease( int );
00136 
00142     int release() const;
00143 
00147     void setReleaseDate( const QDate & );
00148 
00154     QDate releaseDate() const;
00155 
00159     void setPayload( const KURL &, const QString &lang = QString::null );
00160 
00167     KURL payload( const QString &lang = QString::null ) const;
00168 
00173     void setPreview( const KURL &, const QString &lang = QString::null );
00174 
00181     KURL preview( const QString &lang = QString::null ) const;
00182 
00188     void setRating( int );
00189 
00196     int rating();
00197 
00203     void setDownloads( int );
00204 
00211     int downloads();
00212 
00217     QString fullName();
00218 
00222     QStringList langs();
00223 
00227     void parseDomElement( const QDomElement & );
00228 
00232     QDomElement createDomElement( QDomDocument &, QDomElement &parent );
00233 
00234   protected:
00235     QDomElement addElement( QDomDocument &doc, QDomElement &parent,
00236                             const QString &tag, const QString &value );
00237 
00238   private:
00239     QString mName;
00240     QString mType;
00241     QString mAuthor;
00242     QString mLicence;
00243     QMap<QString,QString> mSummaryMap;
00244     QString mVersion;
00245     int mRelease;
00246     QDate mReleaseDate;
00247     QMap<QString,KURL> mPayloadMap;
00248     QMap<QString,KURL> mPreviewMap;
00249     int mRating;
00250     int mDownloads;
00251 
00252     QStringList mLangs;
00253 };
00254 
00255 }
00256 
00257 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Dec 21 14:25:42 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003