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

Microblog Library

  • Microblog
  • StatusItem
Public Member Functions
Microblog::StatusItem Class Reference

#include <statusitem.h>

List of all members.

Public Member Functions

 StatusItem ()
 StatusItem (const QByteArray &)
 StatusItem (const 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

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
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 04:45:43 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Microblog Library

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

kdepimlibs-4.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 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