00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KBLOG_BLOGCOMMENT_H
00024 #define KBLOG_BLOGCOMMENT_H
00025
00026 #include <kblog/kblog_export.h>
00027
00028 #include <QtCore/QString>
00029 #include <QtCore/QtAlgorithms>
00030
00031 class KDateTime;
00032 class KUrl;
00033
00034 namespace KBlog {
00035
00036 class BlogCommentPrivate;
00050 class KBLOG_EXPORT BlogComment
00051 {
00052 public:
00057 BlogComment( const BlogComment &comment );
00058
00063 explicit BlogComment( const QString &commentId = QString() );
00064
00068 virtual ~BlogComment();
00069
00076 QString title() const;
00077
00084 void setTitle( const QString &title );
00085
00092 QString content() const;
00093
00100 void setContent( const QString &content );
00101
00108 QString commentId() const;
00109
00116 void setCommentId( const QString &id );
00117
00124 QString email() const;
00125
00132 void setEmail( const QString &email );
00133
00140 QString name() const;
00141
00148 void setName( const QString &name );
00149
00156 KUrl url() const;
00157
00164 void setUrl( const KUrl &url );
00165
00172 KDateTime modificationDateTime() const;
00173
00180 void setModificationDateTime( const KDateTime &datetime );
00181
00188 KDateTime creationDateTime() const;
00189
00196 void setCreationDateTime( const KDateTime &datetime );
00197
00202 enum Status {
00204 New,
00206 Fetched,
00209 Created,
00212 Removed,
00215 Error
00216 };
00217
00224 Status status() const;
00225
00232 void setStatus( Status status );
00233
00240 QString error() const;
00241
00248 void setError( const QString &error );
00249
00253 BlogComment &operator=( const BlogComment &comment );
00254
00258 void swap( BlogComment &other ) { qSwap( this->d_ptr, other.d_ptr ); }
00259
00260 private:
00261 BlogCommentPrivate *d_ptr;
00262 };
00263
00264 }
00265
00266 #endif