Vidalia  0.3.1
Public Member Functions | Private Attributes | List of all members
RouterListItem Class Reference

#include <RouterListItem.h>

Inheritance diagram for RouterListItem:

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 GeoIpRecord &geoip)
 
GeoIpRecord location () const
 
virtual bool operator< (const QTreeWidgetItem &other) const
 

Private Attributes

RouterDescriptor_rd
 
RouterListWidget_list
 
qint64 _statusValue
 
GeoIpRecord _location
 
QString _countryCode
 

Detailed Description

Definition at line 30 of file RouterListItem.h.

Constructor & Destructor Documentation

RouterListItem::RouterListItem ( RouterListWidget list,
RouterDescriptor  rd 
)

Default constructor.

Definition at line 35 of file RouterListItem.cpp.

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

RouterListItem::~RouterListItem ( )

Destructor.

Definition at line 46 of file RouterListItem.cpp.

References _rd.

Member Function Documentation

RouterDescriptor RouterListItem::descriptor ( ) const
inline

Returns the descriptor for this router.

Definition at line 47 of file RouterListItem.h.

References _rd.

Referenced by NetViewer::circuitSelected(), RouterListWidget::onSelectionChanged(), and NetViewer::retranslateUi().

QString RouterListItem::id ( ) const
inline

Returns the router's ID.

Definition at line 43 of file RouterListItem.h.

References _rd, and RouterDescriptor::id().

Referenced by RouterListWidget::copySelectedFingerprints(), and RouterListWidget::zoomToSelectedRelay().

GeoIpRecord RouterListItem::location ( ) const
inline

Returns the location information set for this router item.

Definition at line 51 of file RouterListItem.h.

References _location.

Referenced by NetViewer::addRouter(), and NetViewer::displayRouterInfo().

QString RouterListItem::name ( ) const
inline

Returns the router's name.

Definition at line 45 of file RouterListItem.h.

References _rd, and RouterDescriptor::name().

Referenced by RouterListWidget::copySelectedNicknames(), and operator<().

bool RouterListItem::operator< ( const QTreeWidgetItem &  other) const
virtual
void RouterListItem::setLocation ( const GeoIpRecord geoip)

Sets the location information for this router item.

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

Definition at line 95 of file RouterListItem.cpp.

References _countryCode, _rd, COUNTRY_COLUMN, GeoIpRecord::countryCode(), RouterDescriptor::setLocation(), and GeoIpRecord::toString().

Referenced by NetViewer::addRouter().

void RouterListItem::update ( const RouterDescriptor rd)

Member Data Documentation

QString RouterListItem::_countryCode
private

Definition at line 61 of file RouterListItem.h.

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

RouterListWidget* RouterListItem::_list
private

The list for this list item.

Definition at line 58 of file RouterListItem.h.

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

GeoIpRecord RouterListItem::_location
private

Location information for this router.

Definition at line 60 of file RouterListItem.h.

Referenced by location().

RouterDescriptor* RouterListItem::_rd
private

Descriptor for this router item.

Definition at line 57 of file RouterListItem.h.

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

qint64 RouterListItem::_statusValue
private

Value used to sort items by status.

Definition at line 59 of file RouterListItem.h.

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


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