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

Microblog Library

Microblog::StatusItem

Microblog::StatusItem Class Reference

This class is a representation of one Dent or Tweet. More...

#include <statusitem.h>

List of all members.

Public Member Functions

 StatusItem (const StatusItem &)
 StatusItem (const QByteArray &)
 StatusItem ()
 ~StatusItem ()
QByteArray data () const
QDateTime date () const
qlonglong id () const
QStringList keys () const
StatusItem operator= (const StatusItem &)
void setData (const QByteArray &)
QString text () const
QString value (const QString &) const

Detailed Description

This class is a representation of one Dent or Tweet.

It is filled with xml which the REST API from ident.ca or Teitter and parses it and gives back the values. Also include ares some convenience functions.

For example to get from an Akonadi::Item to the date of a tweet:

 Akonadi::Item item = itemForIndex( index );
 if ( item.hasPayload<Akonadi::StatusItem>() ) {
    Microblog::StatusItem msg = item.payload<Akonadi::StatusItem>();
    return msg.date();
 }
Since:
4.3

Definition at line 50 of file statusitem.h.


Constructor & Destructor Documentation

StatusItem::StatusItem (  ) 

Constructor.

Definition at line 83 of file statusitem.cpp.

StatusItem::StatusItem ( const QByteArray &  data  )  [explicit]

Constructor which takes the XML as argument.

The data is parsed instantly, so the other methods of the class are instantly usable.

Definition at line 87 of file statusitem.cpp.

StatusItem::StatusItem ( const StatusItem &  other  ) 

Copy constructor.

Definition at line 93 of file statusitem.cpp.

StatusItem::~StatusItem (  ) 

Destructor.

Definition at line 97 of file statusitem.cpp.


Member Function Documentation

QByteArray StatusItem::data (  )  const

Gives the raw xml data of the tweet or dent.

Definition at line 121 of file statusitem.cpp.

QDateTime StatusItem::date (  )  const

Returns the date of the dent or tweet.

Definition at line 143 of file statusitem.cpp.

qlonglong StatusItem::id (  )  const

Returns the unique id as given by the service.

Definition at line 116 of file statusitem.cpp.

QStringList StatusItem::keys (  )  const

Returns all the keys available.

Definition at line 131 of file statusitem.cpp.

StatusItem StatusItem::operator= ( const StatusItem &  other  ) 

Coparisation operator.

Definition at line 101 of file statusitem.cpp.

void StatusItem::setData ( const QByteArray &  data  ) 

The call to set the XML data.

After this, the data is parsed instantly, so the other methods of the class are instantly usable.

Definition at line 109 of file statusitem.cpp.

QString StatusItem::text (  )  const

Gives the text of the tweet or dent.

The result is HTML where links are hrefs and smileys are images.

Definition at line 136 of file statusitem.cpp.

QString StatusItem::value ( const QString &  value  )  const

Returns the value of a certain key.

The keys can be obtained via keys().

Definition at line 126 of file statusitem.cpp.


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

Microblog Library

Skip menu "Microblog Library"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.2-20100208
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