• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KBlog Client Library

KBlog::BlogPost

KBlog::BlogPost Class Reference

A class that represents a blog post on the server. More...

#include <blogpost.h>

List of all members.


Public Types


Public Member Functions

 BlogPost (const KCal::Journal &journal)
 BlogPost (const QString &postId=QString())
 BlogPost (const KBlog::BlogPost &post)
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 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 setStatus (Status status)
void setSummary (const QString &summary)
void setTags (const QStringList &tags)
void setTitle (const QString &title)
void setTrackBackAllowed (bool allowTrackBacks)
Status status () const
QString summary () const
void swap (BlogPost &other)
QStringList tags () const
QString title () const
virtual ~BlogPost ()

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>

Definition at line 68 of file blogpost.h.


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 359 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:
postId The ID of the post on the server.

Definition at line 60 of file blogpost.cpp.

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

Constructor to create a blog post from a KCal Journal.

Parameters:
journal The journal to use to create the post

Definition at line 69 of file blogpost.cpp.

KBlog::BlogPost::~BlogPost (  )  [virtual]

Virtual default destructor.

Definition at line 101 of file blogpost.cpp.


Member Function Documentation

QStringList KBlog::BlogPost::categories (  )  const

Returns the categories.

Returns:
categories
See also:
setCategories()

Definition at line 276 of file blogpost.cpp.

QString KBlog::BlogPost::content (  )  const

Returns the content.

Returns:
content
See also:
setContent()

Definition at line 162 of file blogpost.cpp.

KDateTime KBlog::BlogPost::creationDateTime (  )  const

Returns the creation date time.

Returns:
creationdatetime
See also:
setCreationDateTime()

Definition at line 286 of file blogpost.cpp.

QString KBlog::BlogPost::error (  )  const

Returns the last error.

Returns:
error
See also:
setError(), Error

Definition at line 316 of file blogpost.cpp.

bool KBlog::BlogPost::isCommentAllowed (  )  const

Returns whether comments should be allowed.

Returns:
commentAllowed
See also:
setCommentAllowed()

Definition at line 204 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 132 of file blogpost.cpp.

bool KBlog::BlogPost::isTrackBackAllowed (  )  const

Returns whether track back should be allowed.

Returns:
trackBackAllowed
See also:
setTrackBackAllowed()

Definition at line 214 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 106 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 127 of file blogpost.cpp.

KUrl KBlog::BlogPost::link (  )  const

Returns the link path.

Returns:
link
See also:
setLink()

Definition at line 184 of file blogpost.cpp.

KDateTime KBlog::BlogPost::modificationDateTime (  )  const

Returns the modification date time.

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

Definition at line 296 of file blogpost.cpp.

QString KBlog::BlogPost::mood (  )  const

Returns the mood.

Returns:
mood
See also:
setMood()

Definition at line 256 of file blogpost.cpp.

QString KBlog::BlogPost::music (  )  const

Returns the music.

Returns:
music
See also:
setMusic()

Definition at line 266 of file blogpost.cpp.

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

The overloaed = operator.

Definition at line 326 of file blogpost.cpp.

KUrl KBlog::BlogPost::permaLink (  )  const

Returns the perma link path.

Returns:
permaLink
See also:
setPermaLink()

Definition at line 194 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 142 of file blogpost.cpp.

void KBlog::BlogPost::setCategories ( const QStringList &  categories  ) 

Sets the categories.

Parameters:
categories set the categories.
See also:
categories()

Definition at line 281 of file blogpost.cpp.

void KBlog::BlogPost::setCommentAllowed ( bool  commentAllowed  ) 

Set whether comments should be allowed.

Parameters:
commentAllowed 
See also:
isCommentAllowed()

Definition at line 209 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 167 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 291 of file blogpost.cpp.

void KBlog::BlogPost::setError ( const QString &  error  ) 

Sets the error.

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

Definition at line 321 of file blogpost.cpp.

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

Set the link path.

Parameters:
link The path to set.
See also:
link()

Definition at line 189 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 301 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 261 of file blogpost.cpp.

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

Set the music.

Parameters:
music The music.
See also:
music()

Definition at line 271 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 199 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 147 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 137 of file blogpost.cpp.

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

Sets the status.

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

Definition at line 311 of file blogpost.cpp.

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

Set the summary.

Parameters:
summary 
See also:
summary()

Definition at line 229 of file blogpost.cpp.

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

Set the tags list.

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

Definition at line 239 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 157 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 219 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 306 of file blogpost.cpp.

QString KBlog::BlogPost::summary (  )  const

Returns the summary.

Returns:
summary
See also:
setSummary()

Definition at line 224 of file blogpost.cpp.

void KBlog::BlogPost::swap ( BlogPost &  other  )  [inline]

The swap operator.

Definition at line 419 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 234 of file blogpost.cpp.

QString KBlog::BlogPost::title (  )  const

Returns the title.

Returns:
title
See also:
setTitle()

Definition at line 152 of file blogpost.cpp.


The documentation for this class was generated from the following files:
  • blogpost.h
  • blogpost.cpp

KBlog Client Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.8
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal