• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KBlog Client Library

  • sources
  • kde-4.12
  • kdepimlibs
  • kblog
blogcomment.cpp
1 /*
2  This file is part of the kblog library.
3 
4  Copyright (c) 2006-2007 Christian Weilbach <christian_weilbach@web.de>
5  Copyright (c) 2007 Mike McQuaid <mike@mikemcquaid.com>
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 #include "blogcomment.h"
24 #include "blogcomment_p.h"
25 
26 #include <KDateTime>
27 #include <KUrl>
28 
29 #include <QStringList>
30 
31 namespace KBlog {
32 
33 BlogComment::BlogComment( const BlogComment &c )
34  : d_ptr( new BlogCommentPrivate )
35 {
36  d_ptr->q_ptr = this;
37  d_ptr->mTitle = c.title();
38  d_ptr->mContent = c.content();
39  d_ptr->mEmail = c.email();
40  d_ptr->mName = c.name();
41  d_ptr->mCommentId = c.commentId();
42  d_ptr->mUrl = c.url();
43  d_ptr->mError = c.error();
44  d_ptr->mStatus = c.status();
45  d_ptr->mModificationDateTime = c.modificationDateTime();
46  d_ptr->mCreationDateTime = c.creationDateTime();
47 }
48 
49 BlogComment::BlogComment( const QString &commentId )
50  : d_ptr( new BlogCommentPrivate )
51 {
52  d_ptr->q_ptr = this;
53  d_ptr->mStatus = New;
54  d_ptr->mCommentId = commentId;
55 }
56 
57 BlogComment::~BlogComment()
58 {
59  delete d_ptr;
60 }
61 
62 QString BlogComment::title() const
63 {
64  return d_ptr->mTitle;
65 }
66 
67 void BlogComment::setTitle( const QString &title )
68 {
69  d_ptr->mTitle = title;
70 }
71 
72 QString BlogComment::content() const
73 {
74  return d_ptr->mContent;
75 }
76 
77 void BlogComment::setContent( const QString &content )
78 {
79  d_ptr->mContent = content;
80 }
81 
82 QString BlogComment::commentId() const
83 {
84  return d_ptr->mCommentId;
85 }
86 
87 void BlogComment::setCommentId( const QString &commentId )
88 {
89  d_ptr->mCommentId = commentId;
90 }
91 
92 QString BlogComment::email() const
93 {
94  return d_ptr->mEmail;
95 }
96 
97 void BlogComment::setEmail( const QString &email )
98 {
99  d_ptr->mEmail = email;
100 }
101 
102 QString BlogComment::name() const
103 {
104  return d_ptr->mName;
105 }
106 
107 void BlogComment::setName( const QString &name )
108 {
109  d_ptr->mName = name;
110 }
111 KUrl BlogComment::url() const
112 {
113  return d_ptr->mUrl;
114 }
115 
116 void BlogComment::setUrl( const KUrl &url )
117 {
118  d_ptr->mUrl = url;
119 }
120 
121 KDateTime BlogComment::modificationDateTime() const
122 {
123  return d_ptr->mModificationDateTime;
124 }
125 
126 void BlogComment::setModificationDateTime( const KDateTime &datetime )
127 {
128  d_ptr->mModificationDateTime=datetime;
129 }
130 
131 KDateTime BlogComment::creationDateTime() const
132 {
133  return d_ptr->mCreationDateTime;
134 }
135 
136 void BlogComment::setCreationDateTime( const KDateTime &datetime )
137 {
138  d_ptr->mCreationDateTime= datetime;
139 }
140 
141 BlogComment::Status BlogComment::status() const
142 {
143  return d_ptr->mStatus;
144 }
145 
146 void BlogComment::setStatus( BlogComment::Status status )
147 {
148  d_ptr->mStatus = status;
149 }
150 
151 QString BlogComment::error() const
152 {
153  return d_ptr->mError;
154 }
155 
156 void BlogComment::setError( const QString &error )
157 {
158  d_ptr->mError = error;
159 }
160 
161 BlogComment &BlogComment::operator=( const BlogComment &c )
162 {
163  BlogComment copy( c );
164  swap( copy );
165  return *this;
166 }
167 
168 } // namespace KBlog
KBlog::BlogComment::setStatus
void setStatus(Status status)
Sets the status.
Definition: blogcomment.cpp:146
KBlog::BlogComment::operator=
BlogComment & operator=(const BlogComment &comment)
Overloaded for QList handling.
Definition: blogcomment.cpp:161
KBlog::BlogComment::swap
void swap(BlogComment &other)
The swap operator.
Definition: blogcomment.h:258
KBlog::BlogComment::setCommentId
void setCommentId(const QString &id)
Sets the comment's id.
Definition: blogcomment.cpp:87
KBlog::BlogComment::modificationDateTime
KDateTime modificationDateTime() const
Returns the modification date-time.
Definition: blogcomment.cpp:121
KBlog::BlogComment::email
QString email() const
Returns the E-Mail address of the commentator.
Definition: blogcomment.cpp:92
KBlog::BlogComment::commentId
QString commentId() const
Returns the comment's id.
Definition: blogcomment.cpp:82
KBlog::BlogComment::BlogComment
BlogComment(const BlogComment &comment)
Copy Constructor for list handling.
Definition: blogcomment.cpp:33
KBlog::BlogComment
A class that represents a blog comment on the blog post.
Definition: blogcomment.h:50
KBlog::BlogComment::setContent
void setContent(const QString &content)
Sets the content.
Definition: blogcomment.cpp:77
KBlog::BlogComment::title
QString title() const
Returns the title.
Definition: blogcomment.cpp:62
KBlog::BlogComment::~BlogComment
virtual ~BlogComment()
Virtual default destructor.
Definition: blogcomment.cpp:57
KBlog::BlogComment::name
QString name() const
Returns the commentator's name.
Definition: blogcomment.cpp:102
KBlog::BlogComment::setCreationDateTime
void setCreationDateTime(const KDateTime &datetime)
Sets the creation date-time.
Definition: blogcomment.cpp:136
KBlog::BlogComment::setUrl
void setUrl(const KUrl &url)
Sets the commentator's homepage URL.
Definition: blogcomment.cpp:116
KBlog::BlogComment::content
QString content() const
Returns the content.
Definition: blogcomment.cpp:72
KBlog::BlogComment::setModificationDateTime
void setModificationDateTime(const KDateTime &datetime)
Sets the modification date-time.
Definition: blogcomment.cpp:126
KBlog::BlogComment::Status
Status
The enumartion of the different post status, reflecting the status changes on the server...
Definition: blogcomment.h:202
KBlog::BlogComment::setName
void setName(const QString &name)
Sets the name of the commentator.
Definition: blogcomment.cpp:107
KBlog::BlogComment::setError
void setError(const QString &error)
Sets the error.
Definition: blogcomment.cpp:156
KBlog::BlogComment::setTitle
void setTitle(const QString &title)
Sets the title.
Definition: blogcomment.cpp:67
KBlog::BlogComment::setEmail
void setEmail(const QString &email)
Sets the E-Mail.
Definition: blogcomment.cpp:97
KBlog::BlogComment::creationDateTime
KDateTime creationDateTime() const
Returns the creation date-time.
Definition: blogcomment.cpp:131
KBlog::BlogComment::error
QString error() const
Returns the last error.
Definition: blogcomment.cpp:151
KBlog::BlogComment::New
Status of a freshly constructed comment on the client.
Definition: blogcomment.h:204
KBlog::BlogComment::status
Status status() const
Returns the status on the server.
Definition: blogcomment.cpp:141
KBlog::BlogComment::url
KUrl url() const
Returns the commentator's homepage URL.
Definition: blogcomment.cpp:111
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KBlog Client Library

Skip menu "KBlog Client Library"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal