kopete/libkopete
#include <kopetestatusmessage.h>
Public Member Functions | |
StatusMessage () | |
StatusMessage (const QString &statusMessage) | |
StatusMessage (const QString &statusTitle, const QString &statusMessage) | |
StatusMessage (const StatusMessage ©) | |
~StatusMessage () | |
void | addMetaData (const QString &key, const QVariant &value) |
void | addMetaData (const QHash< QString, QVariant > &otherHash) |
bool | hasMetaData (const QString &key) const |
bool | isEmpty () const |
QString | message () const |
QVariant | metaData (const QString &key) const |
StatusMessage & | operator= (const StatusMessage &other) |
void | setMessage (const QString &message) |
void | setTitle (const QString &title) |
QString | title () const |
Detailed Description
This class encapsulate a status message.
A status message to today(as 2006) standards is more than a simple text. It can be used to show the current listening song, current playing game, show our mood etc.. So this class allows to add metadata to the status message where protocols will be able to use properly.
This class is implicit shared.
Definition at line 48 of file kopetestatusmessage.h.
Constructor & Destructor Documentation
Kopete::StatusMessage::StatusMessage | ( | ) |
Create a empty status message.
Definition at line 35 of file kopetestatusmessage.cpp.
Kopete::StatusMessage::StatusMessage | ( | const QString & | statusMessage | ) |
Create a new status message with the specified status message.
This constructor is not explicit so it's allow implicit QString conversation to this class.
- Parameters
-
statusMessage the status message.
Definition at line 39 of file kopetestatusmessage.cpp.
Kopete::StatusMessage::StatusMessage | ( | const QString & | statusTitle, |
const QString & | statusMessage | ||
) |
Create a new status message with the specified status message and title.
- Parameters
-
statusTitle the status title. statusMessage the status message.
Definition at line 45 of file kopetestatusmessage.cpp.
Kopete::StatusMessage::StatusMessage | ( | const StatusMessage & | copy | ) |
StatusMessage copy constructor.
Very cheap because the class is implicit shared.
Definition at line 55 of file kopetestatusmessage.cpp.
Kopete::StatusMessage::~StatusMessage | ( | ) |
StatusMessage destructor.
Definition at line 52 of file kopetestatusmessage.cpp.
Member Function Documentation
void Kopete::StatusMessage::addMetaData | ( | const QString & | key, |
const QVariant & | value | ||
) |
Add a metadata to the status message.
- Parameters
-
key Key to identity the metadata. value Value for the metadata.
Definition at line 80 of file kopetestatusmessage.cpp.
void Kopete::StatusMessage::addMetaData | ( | const QHash< QString, QVariant > & | otherHash | ) |
Add a hash of metadata to the status message.
If a key already exists, it gets replaced (it doesn't use QHash::unite).;
- Parameters
-
otherHash The hash to add.
Definition at line 85 of file kopetestatusmessage.cpp.
bool Kopete::StatusMessage::hasMetaData | ( | const QString & | key | ) | const |
Check if the status message has the specified metadata.
- Parameters
-
key Key of the metadata.
- Returns
- true if the metadata is present.
Definition at line 94 of file kopetestatusmessage.cpp.
bool Kopete::StatusMessage::isEmpty | ( | ) | const |
Verify if the status message is empty.
- Returns
- true if the status message is empty.
Definition at line 65 of file kopetestatusmessage.cpp.
QString Kopete::StatusMessage::message | ( | ) | const |
Return the current status message.
- Returns
- The current status message.
Definition at line 75 of file kopetestatusmessage.cpp.
QVariant Kopete::StatusMessage::metaData | ( | const QString & | key | ) | const |
Retrieve the specified metadata.
- Parameters
-
key Key of the metadata
- Returns
- The medata value
Definition at line 99 of file kopetestatusmessage.cpp.
StatusMessage & Kopete::StatusMessage::operator= | ( | const StatusMessage & | other | ) |
StatusMessage copy-assignment operator.
Very cheap because the class is implicit shared.
Definition at line 59 of file kopetestatusmessage.cpp.
void Kopete::StatusMessage::setMessage | ( | const QString & | message | ) |
Set a new status message.
- Parameters
-
message New status message.
Definition at line 70 of file kopetestatusmessage.cpp.
void Kopete::StatusMessage::setTitle | ( | const QString & | title | ) |
Set a new status title.
- Parameters
-
title New status title.
Definition at line 104 of file kopetestatusmessage.cpp.
QString Kopete::StatusMessage::title | ( | ) | const |
Return the current status title.
- Returns
- The current status title.
Definition at line 109 of file kopetestatusmessage.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.