Microblog Library
#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:
- 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.
|
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.
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:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:30 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.