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

Microblog Library

  • Microblog
  • StatusItem
Public Member Functions | List of all members
Microblog::StatusItem Class Reference

#include <statusitem.h>

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

Definition at line 51 of file statusitem.h.

Constructor & Destructor Documentation

StatusItem::StatusItem ( )

Constructor.

Definition at line 84 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 88 of file statusitem.cpp.

StatusItem::StatusItem ( const StatusItem &  other)

Copy constructor.

Definition at line 94 of file statusitem.cpp.

StatusItem::~StatusItem ( )

Destructor.

Definition at line 98 of file statusitem.cpp.

Member Function Documentation

QByteArray StatusItem::data ( ) const

Gives the raw xml data of the tweet or dent.

Definition at line 123 of file statusitem.cpp.

QDateTime StatusItem::date ( ) const

Returns the date of the dent or tweet.

Definition at line 145 of file statusitem.cpp.

qlonglong StatusItem::id ( ) const

Returns the unique id as given by the service.

Definition at line 118 of file statusitem.cpp.

QStringList StatusItem::keys ( ) const

Returns all the keys available.

Definition at line 133 of file statusitem.cpp.

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

Coparisation operator.

Definition at line 102 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 111 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 138 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 128 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-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Microblog Library

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



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