#include <routerdescriptorview.h>
Public Slots | |
void | display (RouterDescriptor rd) |
void | display (QList< RouterDescriptor > rdlist) |
Public Member Functions | |
RouterDescriptorView (QWidget *parent=0) | |
Private Member Functions | |
quint64 | adjustUptime (quint64 uptime, QDateTime published) |
QString | formatPublished (QDateTime date) |
QString | formatUptime (quint64 seconds) |
QString | formatBandwidth (quint64 bandwidth) |
Definition at line 27 of file routerdescriptorview.h.
RouterDescriptorView::RouterDescriptorView | ( | QWidget * | parent = 0 |
) |
Default constructor.
Definition at line 24 of file routerdescriptorview.cpp.
void RouterDescriptorView::display | ( | RouterDescriptor | rd | ) | [slot] |
Shows the given router descriptor.
Displays the given router descriptor.
Definition at line 133 of file routerdescriptorview.cpp.
void RouterDescriptorView::display | ( | QList< RouterDescriptor > | rdlist | ) | [slot] |
Shows all router descriptors in the given list.
Displays all router descriptors in the given list.
Definition at line 83 of file routerdescriptorview.cpp.
References adjustUptime(), b(), formatBandwidth(), formatPublished(), formatUptime(), i(), RouterDescriptor::ip(), RouterDescriptor::location(), RouterDescriptor::name(), RouterDescriptor::observedBandwidth(), RouterDescriptor::offline(), p(), RouterDescriptor::platform(), RouterDescriptor::published(), RouterDescriptor::status(), tcol(), trow(), and RouterDescriptor::uptime().
quint64 RouterDescriptorView::adjustUptime | ( | quint64 | uptime, | |
QDateTime | published | |||
) | [private] |
Adjusts the displayed uptime to include time since the router's descriptor was last published.
Adjusts the displayed uptime to include time since the router's descriptor was last published.
Definition at line 39 of file routerdescriptorview.cpp.
Referenced by display().
QString RouterDescriptorView::formatPublished | ( | QDateTime | date | ) | [private] |
Formats the descriptor's published date.
Format the date the descriptor was published.
Definition at line 31 of file routerdescriptorview.cpp.
References DATE_FORMAT.
Referenced by display().
QString RouterDescriptorView::formatUptime | ( | quint64 | seconds | ) | [private] |
Formats the router's uptime.
Format the uptime for this router in a readable format.
Definition at line 51 of file routerdescriptorview.cpp.
Referenced by display().
QString RouterDescriptorView::formatBandwidth | ( | quint64 | bandwidth | ) | [private] |
Formats the observed bandwidth into KB/s.
Format the bandwidth into KB/s.
Definition at line 76 of file routerdescriptorview.cpp.
Referenced by display().