KBlog Client Library
#include <blogpost.h>
Public Types | |
enum | Status { New, Fetched, Created, Modified, Removed, Error } |
Public Member Functions | |
BlogPost (const KBlog::BlogPost &post) | |
BlogPost (const QString &postId=QString()) | |
BlogPost (const KCal::Journal &journal) | |
virtual | ~BlogPost () |
QString | additionalContent () const |
QStringList | categories () const |
QString | content () const |
KDateTime | creationDateTime () const |
QString | error () const |
bool | isCommentAllowed () const |
bool | isPrivate () const |
bool | isTrackBackAllowed () const |
KCal::Journal * | journal (const Blog &blog) const |
QString | journalId () const |
KUrl | link () const |
KDateTime | modificationDateTime () const |
QString | mood () const |
QString | music () const |
BlogPost & | operator= (const BlogPost &post) |
KUrl | permaLink () const |
QString | postId () const |
void | setAdditionalContent (const QString &additionalContent) |
void | setCategories (const QStringList &categories) |
void | setCommentAllowed (bool commentAllowed) |
void | setContent (const QString &content) |
void | setCreationDateTime (const KDateTime &datetime) |
void | setError (const QString &error) |
void | setLink (const KUrl &link) const |
void | setModificationDateTime (const KDateTime &datetime) |
void | setMood (const QString &mood) |
void | setMusic (const QString &music) |
void | setPermaLink (const KUrl &permalink) const |
void | setPostId (const QString &postId) |
void | setPrivate (bool privatePost) |
void | setSlug (const QString &slug) |
void | setStatus (Status status) |
void | setSummary (const QString &summary) |
void | setTags (const QStringList &tags) |
void | setTitle (const QString &title) |
void | setTrackBackAllowed (bool allowTrackBacks) |
QString | slug () const |
Status | status () const |
QString | summary () const |
void | swap (BlogPost &other) |
QStringList | tags () const |
QString | title () const |
Detailed Description
A class that represents a blog post on the server.
Definition at line 68 of file blogpost.h.
Member Enumeration Documentation
The enumartion of the different post status, reflecting the status changes on the server.
Enumerator | |
---|---|
New |
Status of a freshly constructed post on the client. |
Fetched |
Status of a successfully fetched post. |
Created |
Status of a successfully created post. |
Modified |
Status of a successfully modified post. |
Removed |
Status of a successfully removed post. |
Error |
Status when an error on the server side occurred.
|
Definition at line 393 of file blogpost.h.
Constructor & Destructor Documentation
KBlog::BlogPost::BlogPost | ( | const KBlog::BlogPost & | post | ) |
Constructor.
Definition at line 36 of file blogpost.cpp.
Constructor.
- Parameters
-
postId The ID of the post on the server.
Definition at line 62 of file blogpost.cpp.
|
explicit |
Constructor to create a blog post from a KCal Journal.
- Parameters
-
journal The journal to use to create the post
Definition at line 71 of file blogpost.cpp.
|
virtual |
Virtual default destructor.
Definition at line 103 of file blogpost.cpp.
Member Function Documentation
QString KBlog::BlogPost::additionalContent | ( | ) | const |
Returns the additional content, (mt_text_more of MovableType API)
- Returns
- additional content
- See also
- setAdditionalContent()
Definition at line 186 of file blogpost.cpp.
QStringList KBlog::BlogPost::categories | ( | ) | const |
Returns the categories.
- Returns
- categories
- See also
- setCategories()
Definition at line 298 of file blogpost.cpp.
QString KBlog::BlogPost::content | ( | ) | const |
Returns the content.
- Returns
- content
- See also
- setContent()
Definition at line 164 of file blogpost.cpp.
KDateTime KBlog::BlogPost::creationDateTime | ( | ) | const |
Returns the creation date time.
- Returns
- creationdatetime
- See also
- setCreationDateTime()
Definition at line 308 of file blogpost.cpp.
QString KBlog::BlogPost::error | ( | ) | const |
Returns the last error.
- Returns
- error
- See also
- setError(), Error
Definition at line 338 of file blogpost.cpp.
bool KBlog::BlogPost::isCommentAllowed | ( | ) | const |
Returns whether comments should be allowed.
- Returns
- commentAllowed
- See also
- setCommentAllowed()
Definition at line 226 of file blogpost.cpp.
bool KBlog::BlogPost::isPrivate | ( | ) | const |
Returns if the post is published or not.
- Returns
- bool
- See also
- setPrivate()
Definition at line 134 of file blogpost.cpp.
bool KBlog::BlogPost::isTrackBackAllowed | ( | ) | const |
Returns whether track back should be allowed.
- Returns
- trackBackAllowed
- See also
- setTrackBackAllowed()
Definition at line 236 of file blogpost.cpp.
KCal::Journal * KBlog::BlogPost::journal | ( | const Blog & | blog | ) | const |
Returns a KCal journal from the blog post owned by the caller.
- Parameters
-
blog The blog object to convert.
- Returns
- journal
Definition at line 108 of file blogpost.cpp.
QString KBlog::BlogPost::journalId | ( | ) | const |
Returns the ID used by the journal in creation, if created from a journal.
- Returns
- journal ID
Definition at line 129 of file blogpost.cpp.
KUrl KBlog::BlogPost::link | ( | ) | const |
KDateTime KBlog::BlogPost::modificationDateTime | ( | ) | const |
Returns the modification date time.
- Returns
- modificationdatetime
Definition at line 318 of file blogpost.cpp.
QString KBlog::BlogPost::mood | ( | ) | const |
QString KBlog::BlogPost::music | ( | ) | const |
The overloaed = operator.
Definition at line 348 of file blogpost.cpp.
KUrl KBlog::BlogPost::permaLink | ( | ) | const |
Returns the perma link path.
- Returns
- permaLink
- See also
- setPermaLink()
Definition at line 216 of file blogpost.cpp.
QString KBlog::BlogPost::postId | ( | ) | const |
Returns the postId.
This is for fetched posts.
- Returns
- postId
- See also
- setPostId()
Definition at line 144 of file blogpost.cpp.
void KBlog::BlogPost::setAdditionalContent | ( | const QString & | additionalContent | ) |
Sets the additional content, (mt_text_more of MovableType API)
- Parameters
-
additionalContent set the additional content
- See also
- additionalContent()
Definition at line 191 of file blogpost.cpp.
void KBlog::BlogPost::setCategories | ( | const QStringList & | categories | ) |
Sets the categories.
The first one is used as the primary category if possible.
- Parameters
-
categories set the categories.
- See also
- categories()
Definition at line 303 of file blogpost.cpp.
void KBlog::BlogPost::setCommentAllowed | ( | bool | commentAllowed | ) |
Set whether comments should be allowed.
- Parameters
-
commentAllowed
- See also
- isCommentAllowed()
Definition at line 231 of file blogpost.cpp.
void KBlog::BlogPost::setContent | ( | const QString & | content | ) |
Sets the content.
- Parameters
-
content set the content.
- See also
- content()
Definition at line 169 of file blogpost.cpp.
void KBlog::BlogPost::setCreationDateTime | ( | const KDateTime & | datetime | ) |
Sets the creation time.
This is used by most Blogs and is generally the shown date. Set it if you want to change the shown date.
- Parameters
-
datetime set the time the post has been created.
- See also
- creationTime()
Definition at line 313 of file blogpost.cpp.
void KBlog::BlogPost::setError | ( | const QString & | error | ) |
void KBlog::BlogPost::setLink | ( | const KUrl & | link | ) | const |
Set the link path.
- Parameters
-
link The path to set.
- See also
- link()
Definition at line 211 of file blogpost.cpp.
void KBlog::BlogPost::setModificationDateTime | ( | const KDateTime & | datetime | ) |
Sets the modification time.
- Parameters
-
datetime set the time the post has been modified.
- See also
- modificationTime(), setCreationDateTime()
Definition at line 323 of file blogpost.cpp.
void KBlog::BlogPost::setMood | ( | const QString & | mood | ) |
Set the mood list.
- Parameters
-
mood The mood.
- See also
- mood()
Definition at line 283 of file blogpost.cpp.
void KBlog::BlogPost::setMusic | ( | const QString & | music | ) |
Set the music.
- Parameters
-
music The music.
- See also
- music()
Definition at line 293 of file blogpost.cpp.
void KBlog::BlogPost::setPermaLink | ( | const KUrl & | permalink | ) | const |
Set the perma link path.
- Parameters
-
permalink The path to set.
- See also
- permaLink()
Definition at line 221 of file blogpost.cpp.
void KBlog::BlogPost::setPostId | ( | const QString & | postId | ) |
Sets the post id value.
This is important for modifying posts.
- Parameters
-
postId set this to the post id on the server.
- See also
- postId()
Definition at line 149 of file blogpost.cpp.
void KBlog::BlogPost::setPrivate | ( | bool | privatePost | ) |
Sets the post to private viewings only.
- Parameters
-
privatePost set this to false, if you don't want to publish the blog post immediately.
- See also
- isPrivate()
Definition at line 139 of file blogpost.cpp.
void KBlog::BlogPost::setSlug | ( | const QString & | slug | ) |
Sets the Wordpress slug property! (will use to set post's permalink) Currently just wordpress supports this!
- Parameters
-
slug wordpress slug
- See also
- slug()
Definition at line 201 of file blogpost.cpp.
void KBlog::BlogPost::setStatus | ( | BlogPost::Status | status | ) |
Sets the status.
- Parameters
-
status The status on the server.
Definition at line 333 of file blogpost.cpp.
void KBlog::BlogPost::setSummary | ( | const QString & | summary | ) |
void KBlog::BlogPost::setTags | ( | const QStringList & | tags | ) |
Set the tags list.
- Parameters
-
tags The tags list.
- See also
- tags()
Definition at line 261 of file blogpost.cpp.
void KBlog::BlogPost::setTitle | ( | const QString & | title | ) |
Sets the title.
- Parameters
-
title set the title.
- See also
- title()
Definition at line 159 of file blogpost.cpp.
void KBlog::BlogPost::setTrackBackAllowed | ( | bool | allowTrackBacks | ) |
Set whether track back should be allowed.
- Parameters
-
allowTrackBacks
- See also
- isTrackBackAllowed()
Definition at line 241 of file blogpost.cpp.
QString KBlog::BlogPost::slug | ( | ) | const |
Returns the Wordpress posts Slug (or permalink will use for post) Currently just wordpress supports this!
- Returns
- wordpress slug
- See also
- setSlug()
Definition at line 196 of file blogpost.cpp.
BlogPost::Status KBlog::BlogPost::status | ( | ) | const |
Returns the status on the server.
- Returns
- status
- See also
- setStatus(), Status
Definition at line 328 of file blogpost.cpp.
QString KBlog::BlogPost::summary | ( | ) | const |
Returns the summary.
- Returns
- summary
- See also
- setSummary()
Definition at line 246 of file blogpost.cpp.
|
inline |
The swap operator.
Definition at line 453 of file blogpost.h.
QStringList KBlog::BlogPost::tags | ( | ) | const |
Returns the tags list as a QStringList.
- Returns
- tags list
- See also
- setTags()
Definition at line 256 of file blogpost.cpp.
QString KBlog::BlogPost::title | ( | ) | const |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:36:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.