StatusEventItem Class Reference

#include <StatusEventItem.h>

List of all members.

Public Types

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

Public Member Functions

 StatusEventItem (QTreeWidget *parent=0)
void setTimestamp (const QTime &timestamp)
QTime 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 26 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 33 of file StatusEventItem.h.


Constructor & Destructor Documentation

StatusEventItem::StatusEventItem ( QTreeWidget *  parent = 0  ) 

Default constructor.

Definition at line 23 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 71 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 83 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 47 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 103 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 65 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 77 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 41 of file StatusEventItem.cpp.

References IconRole.

Referenced by StatusEventWidget::addNotification().

void StatusEventItem::setTimestamp ( const QTime &  timestamp  ) 

Sets the timestamp at which this status event occurred.

See also:
timestamp()

Definition at line 29 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 53 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 89 of file StatusEventItem.cpp.

Referenced by StatusEventWidget::addNotification().

QTime StatusEventItem::timestamp (  )  const

Returns the timestamp at which this status event occurred.

See also:
setTimestamp()

Definition at line 35 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 59 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 95 of file StatusEventItem.cpp.

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


The documentation for this class was generated from the following files:
Generated on Mon Aug 30 23:09:55 2010 for Vidalia by  doxygen 1.6.3