KBlog

blogcomment.h
1 /*
2  This file is part of the kblog library.
3 
4  Copyright (c) 2006-2007 Christian Weilbach <[email protected]>
5  Copyright (c) 2007 Mike McQuaid <[email protected]>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 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  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef KBLOG_BLOGCOMMENT_H
24 #define KBLOG_BLOGCOMMENT_H
25 
26 #include <kblog_export.h>
27 
28 #include <QString>
29 #include <QtAlgorithms>
30 
31 class QDateTime;
32 class QUrl;
33 
34 namespace KBlog
35 {
36 
37 class BlogCommentPrivate;
51 class KBLOG_EXPORT BlogComment
52 {
53 public:
58  BlogComment(const BlogComment &comment);
59 
64  explicit BlogComment(const QString &commentId = QString());
65 
69  virtual ~BlogComment();
70 
77  QString title() const;
78 
85  void setTitle(const QString &title);
86 
93  QString content() const;
94 
101  void setContent(const QString &content);
102 
109  QString commentId() const;
110 
117  void setCommentId(const QString &id);
118 
125  QString email() const;
126 
133  void setEmail(const QString &email);
134 
141  QString name() const;
142 
149  void setName(const QString &name);
150 
157  QUrl url() const;
158 
165  void setUrl(const QUrl &url);
166 
173  QDateTime modificationDateTime() const;
174 
181  void setModificationDateTime(const QDateTime &datetime);
182 
189  QDateTime creationDateTime() const;
190 
197  void setCreationDateTime(const QDateTime &datetime);
198 
203  enum Status {
216  Error
217  };
218 
225  Status status() const;
226 
233  void setStatus(Status status);
234 
241  QString error() const;
242 
249  void setError(const QString &error);
250 
254  BlogComment &operator=(const BlogComment &comment);
255 
259  void swap(BlogComment &other)
260  {
261  qSwap(this->d_ptr, other.d_ptr);
262  }
263 
264 private:
265  BlogCommentPrivate *d_ptr; //krazy:exclude=dpointer can't constify due to bic and swap being declared inline
266 };
267 
268 } //namespace KBlog
269 
270 #endif
void swap(BlogComment &other)
The swap operator.
Definition: blogcomment.h:259
A class that represents a blog comment on the blog post.
Definition: blogcomment.h:51
Status of a successfully fetched comment.
Definition: blogcomment.h:207
Namespace for blog related classes.
Definition: blog.h:53
Status
The enumartion of the different post status, reflecting the status changes on the server...
Definition: blogcomment.h:203
Status of a successfully created comment.
Definition: blogcomment.h:210
Status of a successfully removed comment.
Definition: blogcomment.h:213
Status of a freshly constructed comment on the client.
Definition: blogcomment.h:205
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jun 4 2020 23:07:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.