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

KBlog Client Library

  • KBlog
  • BlogPost
Public Types | Public Member Functions
KBlog::BlogPost Class Reference

#include <blogpost.h>

List of all members.

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.

  KBlog::BlogPost *post = new BlogPost();
  post->setTitle( "This is the title." );
  post->setContent( "Here is some the content..." );
  post->setPrivate( true ); // false on default
  connect( backend, createdPost( KBlog::BlogPost* ),
                 this, createdPost( KBlog::BlogPost* );
  backend->createPost( post );
  ...
  void createdPost( KBlog::BlogPost* post )
  {
    setMyFancyGUIPostId( post->postId() );
    setMyFancyGUIPermaLink( post->permaLink() );
  }
Author:
Christian Weilbach <christian_weilbach@web.de>

Member Enumeration Documentation

enum KBlog::BlogPost::Status

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.

See also:
Blog::fetchPost( KBlog::BlogPost* )
Created 

Status of a successfully created post.

See also:
Blog::createPost( KBlog::BlogPost* )
Modified 

Status of a successfully modified post.

See also:
Blog::modifyPost( KBlog::BlogPost* )
Removed 

Status of a successfully removed post.

See also:
Blog::removePost( KBlog::BlogPost* )
Error 

Status when an error on the server side occurred.

See also:
error()

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.

KBlog::BlogPost::BlogPost ( const QString &  postId = QString()) [explicit]

Constructor.

Parameters:
postIdThe ID of the post on the server.

Definition at line 62 of file blogpost.cpp.

KBlog::BlogPost::BlogPost ( const KCal::Journal &  journal) [explicit]

Constructor to create a blog post from a KCal Journal.

Parameters:
journalThe journal to use to create the post

Definition at line 71 of file blogpost.cpp.

KBlog::BlogPost::~BlogPost ( ) [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:
blogThe 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

Returns the link path.

Returns:
link
See also:
setLink()

Definition at line 206 of file blogpost.cpp.

KDateTime KBlog::BlogPost::modificationDateTime ( ) const

Returns the modification date time.

Returns:
modificationdatetime
See also:
setModificationDateTime(), creationDateTime()

Definition at line 318 of file blogpost.cpp.

QString KBlog::BlogPost::mood ( ) const

Returns the mood.

Returns:
mood
See also:
setMood()

Definition at line 278 of file blogpost.cpp.

QString KBlog::BlogPost::music ( ) const

Returns the music.

Returns:
music
See also:
setMusic()

Definition at line 288 of file blogpost.cpp.

BlogPost & KBlog::BlogPost::operator= ( const BlogPost &  post)

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:
additionalContentset 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:
categoriesset 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:
contentset 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:
datetimeset 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)

Sets the error.

Parameters:
errorThe error string.
See also:
error(), Error

Definition at line 343 of file blogpost.cpp.

void KBlog::BlogPost::setLink ( const KUrl &  link) const

Set the link path.

Parameters:
linkThe 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:
datetimeset 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:
moodThe mood.
See also:
mood()

Definition at line 283 of file blogpost.cpp.

void KBlog::BlogPost::setMusic ( const QString &  music)

Set the music.

Parameters:
musicThe 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:
permalinkThe 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:
postIdset 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:
privatePostset 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:
slugwordpress slug
See also:
slug()

Definition at line 201 of file blogpost.cpp.

void KBlog::BlogPost::setStatus ( BlogPost::Status  status)

Sets the status.

Parameters:
statusThe status on the server.
See also:
status(), Status

Definition at line 333 of file blogpost.cpp.

void KBlog::BlogPost::setSummary ( const QString &  summary)

Set the summary.

Parameters:
summary
See also:
summary()

Definition at line 251 of file blogpost.cpp.

void KBlog::BlogPost::setTags ( const QStringList &  tags)

Set the tags list.

Parameters:
tagsThe tags list.
See also:
tags()

Definition at line 261 of file blogpost.cpp.

void KBlog::BlogPost::setTitle ( const QString &  title)

Sets the title.

Parameters:
titleset 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.

void KBlog::BlogPost::swap ( BlogPost &  other) [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

Returns the title.

Returns:
title
See also:
setTitle()

Definition at line 154 of file blogpost.cpp.


The documentation for this class was generated from the following files:
  • blogpost.h
  • blogpost.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:07:43 by doxygen 1.7.5 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-4.8.5 API Reference

Skip menu "kdepimlibs-4.8.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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