#include <routerlistitem.h>
Public Member Functions | |
| RouterListItem (RouterListWidget *list, RouterDescriptor rd) | |
| ~RouterListItem () | |
| void | update (RouterDescriptor rd) |
| QString | id () const |
| QString | name () const |
| RouterDescriptor | descriptor () const |
| void | setLocation (QString location) |
| virtual bool | operator< (const QTreeWidgetItem &other) const |
Private Attributes | |
| RouterDescriptor * | _rd |
| RouterListWidget * | _list |
| qint64 | _statusValue |
Definition at line 41 of file routerlistitem.h.
| RouterListItem::RouterListItem | ( | RouterListWidget * | list, | |
| RouterDescriptor | rd | |||
| ) |
Default constructor.
Definition at line 43 of file routerlistitem.cpp.
| RouterListItem::~RouterListItem | ( | ) |
| void RouterListItem::update | ( | RouterDescriptor | rd | ) |
Updates this router item using a new descriptor.
Definition at line 59 of file routerlistitem.cpp.
References _rd, _statusValue, RouterDescriptor::hibernating(), IMG_NODE_HIGH_BW, IMG_NODE_LOW_BW, IMG_NODE_MED_BW, IMG_NODE_NO_BW, IMG_NODE_OFFLINE, IMG_NODE_SLEEPING, RouterDescriptor::name(), NAME_COLUMN, RouterDescriptor::observedBandwidth(), RouterDescriptor::offline(), RouterDescriptor::platform(), and STATUS_COLUMN.
Referenced by RouterListItem().
| QString RouterListItem::id | ( | ) | const [inline] |
Returns the router's ID.
Definition at line 54 of file routerlistitem.h.
References _rd, and RouterDescriptor::id().
Referenced by NetViewer::resolved().
| QString RouterListItem::name | ( | ) | const [inline] |
Returns the router's name.
Definition at line 56 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 58 of file routerlistitem.h.
References _rd.
Referenced by NetViewer::circuitPathIDs().
| void RouterListItem::setLocation | ( | QString | location | ) |
Sets the location information for this router item.
Definition at line 98 of file routerlistitem.cpp.
References _rd, and RouterDescriptor::setLocation().
Referenced by NetViewer::resolved().
| bool RouterListItem::operator< | ( | const QTreeWidgetItem & | other | ) | const [virtual] |
Overload the comparison operator.
Definition at line 105 of file routerlistitem.cpp.
References _list, _statusValue, b(), name(), RouterListWidget::NameColumn, and RouterListWidget::StatusColumn.
RouterDescriptor* RouterListItem::_rd [private] |
Descriptor for this router item.
Definition at line 66 of file routerlistitem.h.
Referenced by descriptor(), id(), name(), RouterListItem(), setLocation(), update(), and ~RouterListItem().
RouterListWidget* RouterListItem::_list [private] |
The list for this list item.
Definition at line 67 of file routerlistitem.h.
Referenced by operator<(), and RouterListItem().
qint64 RouterListItem::_statusValue [private] |
Value used to sort items by status.
Definition at line 68 of file routerlistitem.h.
Referenced by operator<(), and update().
1.5.1