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 00033 class Entry 00034 { 00035 public: 00036 Entry(); 00037 Entry( const QDomElement & ); 00038 ~Entry(); 00039 00040 void setName( const QString & ); 00041 QString name() const; 00042 00043 void setType( const QString & ); 00044 QString type() const; 00045 00046 void setAuthor( const QString & ); 00047 QString author() const; 00048 00049 void setLicence( const QString & ); 00050 QString license() const; 00051 00052 void setSummary( const QString &, const QString &lang = QString::null ); 00053 QString summary( const QString &lang = QString::null ) const; 00054 00055 void setVersion( const QString & ); 00056 QString version() const; 00057 00058 void setRelease( int ); 00059 int release() const; 00060 00061 void setReleaseDate( const QDate & ); 00062 QDate releaseDate() const; 00063 00064 void setPayload( const KURL &, const QString &lan = QString::null ); 00065 KURL payload( const QString &lang = QString::null ) const; 00066 00067 void setPreview( const KURL &, const QString &lan = QString::null ); 00068 KURL preview( const QString &lang = QString::null ) const; 00069 00070 void setRating( int ); 00071 int rating(); 00072 00073 void setDownloads( int ); 00074 int downloads(); 00075 00080 QString fullName(); 00081 00082 QStringList langs(); 00083 00084 void parseDomElement( const QDomElement & ); 00085 00086 QDomElement createDomElement( QDomDocument &, QDomElement &parent ); 00087 00088 protected: 00089 QDomElement addElement( QDomDocument &doc, QDomElement &parent, 00090 const QString &tag, const QString &value ); 00091 00092 private: 00093 QString mName; 00094 QString mType; 00095 QString mAuthor; 00096 QString mLicence; 00097 QMap<QString,QString> mSummaryMap; 00098 QString mVersion; 00099 int mRelease; 00100 QDate mReleaseDate; 00101 QMap<QString,KURL> mPayloadMap; 00102 QMap<QString,KURL> mPreviewMap; 00103 int mRating; 00104 int mDownloads; 00105 00106 QStringList mLangs; 00107 }; 00108 00109 } 00110 00111 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:12 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003