Vidalia  0.3.1
Public Types | Public Member Functions | List of all members
StatusEventItem Class Reference

#include <StatusEventItem.h>

Inheritance diagram for StatusEventItem:

Public Types

enum  DataRole {
  IconRole = Qt::UserRole, TimestampRole, TitleRole, DescriptionRole,
  HelpUrlRole
}
 

Public Member Functions

 StatusEventItem (QTreeWidget *parent=0)
 
void setTimestamp (const QDateTime &timestamp)
 
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
 

Detailed Description

Definition at line 25 of file StatusEventItem.h.

Member Enumeration Documentation

QModelIndex data roles used to store information with this status event item, allowing it to be retrieved by StatusEventItemDelegate for painting.

Enumerator
IconRole 
TimestampRole 
TitleRole 
DescriptionRole 
HelpUrlRole 

Definition at line 32 of file StatusEventItem.h.

Constructor & Destructor Documentation

StatusEventItem::StatusEventItem ( QTreeWidget *  parent = 0)

Default constructor.

Definition at line 22 of file StatusEventItem.cpp.

Member Function Documentation

QString StatusEventItem::description ( ) const

Returns the detailed description text for this status event.

See also
setDescription()

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.

See also
setHelpUrl

Definition at line 82 of file StatusEventItem.cpp.

References HelpUrlRole.

QPixmap StatusEventItem::icon ( ) const

Returns the icon draw along with this status event.

See also
setIcon()

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.

See also
description()

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.

See also
helpUrl

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.

See also
icon()

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.

See also
timestamp()

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.

See also
title()

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.

See also
setTimestamp()

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.

See also
setTitle()

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.

See also
timestamp()
title()
description()

Definition at line 94 of file StatusEventItem.cpp.

References description(), timestamp(), and title().


The documentation for this class was generated from the following files: