19 #include <QHeaderView> 21 #define STATUS_COLUMN (RouterListWidget::StatusColumn) 22 #define COUNTRY_COLUMN (RouterListWidget::CountryColumn) 23 #define NAME_COLUMN (RouterListWidget::NameColumn) 25 #define IMG_NODE_OFFLINE ":/images/icons/node-unresponsive.png" 26 #define IMG_NODE_SLEEPING ":/images/icons/node-hibernating.png" 27 #define IMG_NODE_NO_BW ":/images/icons/node-bw-none.png" 28 #define IMG_NODE_LOW_BW ":/images/icons/node-bw-low.png" 29 #define IMG_NODE_MED_BW ":/images/icons/node-bw-med.png" 30 #define IMG_NODE_HIGH_BW ":/images/icons/node-bw-high.png" 31 #define IMG_FLAG_UNKNOWN ":/images/flags/unknown.png" 97 QPixmap flag(
":/images/flags/" + geoip.
countryCode().toLower() +
".png");
116 Qt::SortOrder order =
_list->header()->sortIndicatorOrder();
117 switch (
_list->sortColumn()) {
121 if (order == Qt::AscendingOrder)
122 return (a->
name().toLower() > b->
name().toLower());
124 return (a->
name().toLower() < b->
name().toLower());
130 if (order == Qt::AscendingOrder)
138 if (a->
name().toLower() == b->
name().toLower()) {
139 if (order == Qt::AscendingOrder)
144 return (a->
name().toLower() < b->
name().toLower());
149 return QTreeWidgetItem::operator<(other);
quint64 averageBandwidth() const
QString countryCode() const
void setLocation(QString location)
void update(const RouterDescriptor &rd)
RouterListItem(RouterListWidget *list, RouterDescriptor rd)
#define IMG_NODE_SLEEPING
void setLocation(const GeoIpRecord &geoip)
quint64 burstBandwidth() const
virtual bool operator<(const QTreeWidgetItem &other) const
quint64 observedBandwidth() const