RouterListItem Class Reference

#include <routerlistitem.h>

List of all members.

Public Member Functions

 RouterListItem (RouterListWidget *list, RouterDescriptor rd)
 ~RouterListItem ()
void update (const RouterDescriptor &rd)
QString id () const
QString name () const
RouterDescriptor descriptor () const
void setLocation (const GeoIp &geoip)
virtual bool operator< (const QTreeWidgetItem &other) const

Private Attributes

RouterDescriptor_rd
RouterListWidget_list
qint64 _statusValue
QString _country


Detailed Description

Definition at line 31 of file routerlistitem.h.


Constructor & Destructor Documentation

RouterListItem::RouterListItem ( RouterListWidget list,
RouterDescriptor  rd 
)

Default constructor.

Definition at line 36 of file routerlistitem.cpp.

References _country, _list, _rd, COUNTRY_COLUMN, IMG_FLAG_UNKNOWN, and update().

RouterListItem::~RouterListItem (  ) 

Destructor.

Definition at line 47 of file routerlistitem.cpp.

References _rd.


Member Function Documentation

void RouterListItem::update ( const RouterDescriptor rd  ) 

QString RouterListItem::id (  )  const [inline]

Returns the router's ID.

Definition at line 44 of file routerlistitem.h.

References _rd, and RouterDescriptor::id().

Referenced by RouterListWidget::customContextMenuRequested(), and NetViewer::resolved().

QString RouterListItem::name (  )  const [inline]

Returns the router's name.

Definition at line 46 of file routerlistitem.h.

References _rd, and RouterDescriptor::name().

Referenced by operator<().

RouterDescriptor RouterListItem::descriptor (  )  const [inline]

Returns the descriptor for this router.

Definition at line 48 of file routerlistitem.h.

References _rd.

Referenced by NetViewer::circuitSelected().

void RouterListItem::setLocation ( const GeoIp geoip  ) 

Sets the location information for this router item.

Sets the location information for this item's router descriptor.

Definition at line 94 of file routerlistitem.cpp.

References _country, _rd, GeoIp::country(), COUNTRY_COLUMN, RouterDescriptor::setLocation(), and GeoIp::toLocation().

Referenced by NetViewer::resolved().

bool RouterListItem::operator< ( const QTreeWidgetItem &  other  )  const [virtual]

Overload the comparison operator.

Definition at line 109 of file routerlistitem.cpp.

References _country, _list, _statusValue, b(), RouterListWidget::CountryColumn, name(), RouterListWidget::NameColumn, and RouterListWidget::StatusColumn.


Member Data Documentation

Descriptor for this router item.

Definition at line 56 of file routerlistitem.h.

Referenced by descriptor(), id(), name(), RouterListItem(), setLocation(), update(), and ~RouterListItem().

The list for this list item.

Definition at line 57 of file routerlistitem.h.

Referenced by operator<(), and RouterListItem().

qint64 RouterListItem::_statusValue [private]

Value used to sort items by status.

Definition at line 58 of file routerlistitem.h.

Referenced by operator<(), and update().

QString RouterListItem::_country [private]

Country in which this router is likely located.

Definition at line 59 of file routerlistitem.h.

Referenced by operator<(), RouterListItem(), and setLocation().


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

Generated on Sat Aug 16 17:31:50 2008 for Vidalia by  doxygen 1.5.6