Vidalia
0.2.15
|
#include <StatusEventItem.h>
Public Types | |
enum | DataRole { IconRole = Qt::UserRole, TimestampRole, TitleRole, DescriptionRole, HelpUrlRole } |
Public Member Functions | |
StatusEventItem (QTreeWidget *parent=0) | |
void | setTimestamp (const QDateTime ×tamp) |
QDateTime | timestamp () const |
void | setIcon (const QPixmap &pixmap) |
QPixmap | icon () const |
void | setTitle (const QString &title) |
QString | title () const |
void | setDescription (const QString &description) |
QString | description () const |
void | setHelpUrl (const QString &url) |
QString | helpUrl () const |
void | setToolTip (const QString &toolTip) |
QString | toString () const |
virtual bool | operator< (const QTreeWidgetItem &other) const |
Definition at line 25 of file StatusEventItem.h.
QModelIndex data roles used to store information with this status event item, allowing it to be retrieved by StatusEventItemDelegate for painting.
Definition at line 32 of file StatusEventItem.h.
StatusEventItem::StatusEventItem | ( | QTreeWidget * | parent = 0 | ) |
Default constructor.
Definition at line 22 of file StatusEventItem.cpp.
QString StatusEventItem::description | ( | ) | const |
Returns the detailed description text for this status event.
Definition at line 70 of file StatusEventItem.cpp.
References DescriptionRole.
Referenced by StatusEventWidget::find(), and toString().
QString StatusEventItem::helpUrl | ( | ) | const |
Returns the help topic URL associated with this event item.
Definition at line 82 of file StatusEventItem.cpp.
References HelpUrlRole.
QPixmap StatusEventItem::icon | ( | ) | const |
Returns the icon draw along with this status event.
Definition at line 46 of file StatusEventItem.cpp.
References IconRole.
bool StatusEventItem::operator< | ( | const QTreeWidgetItem & | other | ) | const [virtual] |
Overloaded comparison operator that allows sorting StatusEventItem objects based on timestamp. Returns true if this StatusEventItem occurred before other.
Definition at line 102 of file StatusEventItem.cpp.
References b(), and TimestampRole.
void StatusEventItem::setDescription | ( | const QString & | description | ) |
Sets the detailed description text for this status event. The text should explain what the event means to the user, and any corrective action they might need to take.
Definition at line 64 of file StatusEventItem.cpp.
References DescriptionRole.
Referenced by StatusEventWidget::addNotification().
void StatusEventItem::setHelpUrl | ( | const QString & | url | ) |
Sets the help topic URL that contains more information about this particular status event.
Definition at line 76 of file StatusEventItem.cpp.
References HelpUrlRole.
Referenced by StatusEventWidget::addNotification().
void StatusEventItem::setIcon | ( | const QPixmap & | pixmap | ) |
Sets the icon to be drawn along with this status event to pixmap.
Definition at line 40 of file StatusEventItem.cpp.
References IconRole.
Referenced by StatusEventWidget::addNotification().
void StatusEventItem::setTimestamp | ( | const QDateTime & | timestamp | ) |
Sets the timestamp at which this status event occurred.
Definition at line 28 of file StatusEventItem.cpp.
References TimestampRole.
Referenced by StatusEventWidget::addNotification().
void StatusEventItem::setTitle | ( | const QString & | title | ) |
Sets the title text for this status event. The title is a short (fewer than 10 words or so) summary of the event.
Definition at line 52 of file StatusEventItem.cpp.
References TitleRole.
Referenced by StatusEventWidget::addNotification().
void StatusEventItem::setToolTip | ( | const QString & | toolTip | ) |
Sets toolTip as the text displayed when the user hovers the mouse over a StatusEventItem. It is more useful for particularly long item descriptions.
Definition at line 88 of file StatusEventItem.cpp.
Referenced by StatusEventWidget::addNotification().
QDateTime StatusEventItem::timestamp | ( | ) | const |
Returns the timestamp at which this status event occurred.
Definition at line 34 of file StatusEventItem.cpp.
References TimestampRole.
Referenced by toString().
QString StatusEventItem::title | ( | ) | const |
Returns the title text for this status event.
Definition at line 58 of file StatusEventItem.cpp.
References TitleRole.
Referenced by StatusEventWidget::find(), and toString().
QString StatusEventItem::toString | ( | ) | const |
Returns a formatted QString containing this item's timestamp, title and description text.
Definition at line 94 of file StatusEventItem.cpp.
References description(), timestamp(), and title().