diff --git a/retroshare-gui/src/gui/icons.qrc b/retroshare-gui/src/gui/icons.qrc index 737b12ae3..819fe83c4 100644 --- a/retroshare-gui/src/gui/icons.qrc +++ b/retroshare-gui/src/gui/icons.qrc @@ -13,6 +13,7 @@ icons/anonymous_blue_128.png icons/anonymous_green_128.png icons/aol.png + icons/transport128.png icons/avatar_128.png icons/avatar_grey_128.png icons/biohazard_red.png diff --git a/retroshare-gui/src/gui/icons/transport128.png b/retroshare-gui/src/gui/icons/transport128.png new file mode 100644 index 000000000..ba54ddbb2 Binary files /dev/null and b/retroshare-gui/src/gui/icons/transport128.png differ diff --git a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp index 9640697fa..19d2a8120 100644 --- a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp +++ b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp @@ -264,106 +264,6 @@ void GxsTransportStatistics::personDetails() dialog->show(); } -// GxsTransportStatisticsWidget::GxsTransportStatisticsWidget(QWidget *parent) -// : QWidget(parent) -// { -// float size = QFontMetricsF(font()).height() ; -// float fact = size/14.0 ; -// -// maxWidth = 400*fact ; -// maxHeight = 0 ; -// mCurrentN = PARTIAL_VIEW_SIZE/2+1 ; -// } -// -// void GxsTransportStatisticsWidget::updateContent() -// { -// RsGxsTrans::GxsTransStatistics transinfo ; -// -// rsGxsTrans->getStatistics(transinfo) ; -// -// float size = QFontMetricsF(font()).height() ; -// float fact = size/14.0 ; -// -// // What do we need to draw? -// // -// // Statistics about GxsTransport -// // - prefered group ID -// // -// // Own key ids -// // key service id description -// // -// // Data items -// // Msg id Local origin Destination Time Status -// // -// QPixmap tmppixmap(maxWidth, maxHeight); -// -// tmppixmap.fill(Qt::transparent); -// setFixedHeight(maxHeight); -// -// QPainter painter(&tmppixmap); -// painter.initFrom(this); -// painter.setPen(QColor::fromRgb(0,0,0)) ; -// -// QFont times_f(font());//"Times") ; -// QFont monospace_f("Monospace") ; -// -// monospace_f.setStyleHint(QFont::TypeWriter) ; -// monospace_f.setPointSize(font().pointSize()) ; -// -// QFontMetricsF fm_monospace(monospace_f) ; -// QFontMetricsF fm_times(times_f) ; -// -// static const int cellx = fm_monospace.width(QString(" ")) ; -// static const int celly = fm_monospace.height() ; -// -// maxHeight = 500*fact ; -// -// // std::cerr << "Drawing into pixmap of size " << maxWidth << "x" << maxHeight << std::endl; -// // draw... -// int ox=5*fact,oy=5*fact ; -// -// painter.setFont(times_f) ; -// -// painter.drawText(ox,oy+celly,tr("Preferred group Id")+":" + QString::fromStdString(transinfo.prefered_group_id.toStdString())) ; oy += celly*2 ; -// -// oy += celly ; -// oy += celly ; -// -// // update the pixmap -// // -// pixmap = tmppixmap; -// maxHeight = oy ; -// } -// -// void GxsTransportStatisticsWidget::wheelEvent(QWheelEvent *e) -// { -// } -// -// QString GxsTransportStatisticsWidget::speedString(float f) -// { -// if(f < 1.0f) -// return QString("0 B/s") ; -// if(f < 1024.0f) -// return QString::number((int)f)+" B/s" ; -// -// return QString::number(f/1024.0,'f',2) + " KB/s"; -// } -// -// void GxsTransportStatisticsWidget::paintEvent(QPaintEvent */*event*/) -// { -// QStylePainter(this).drawPixmap(0, 0, pixmap); -// } -// -// void GxsTransportStatisticsWidget::resizeEvent(QResizeEvent *event) -// { -// QRect TaskGraphRect = geometry(); -// maxWidth = TaskGraphRect.width(); -// maxHeight = TaskGraphRect.height() ; -// -// QWidget::resizeEvent(event); -// updateContent(); -// } - void GxsTransportStatistics::loadRequest(const TokenQueue *queue, const TokenRequest &req) { std::cerr << "GxsTransportStatistics::loadRequest() UserType: " << req.mUserType << std::endl; diff --git a/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp b/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp index 8c9a7f675..53494ff0d 100644 --- a/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp +++ b/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp @@ -53,6 +53,7 @@ #define IMAGE_TURTLE ":images/turtle.png" #define IMAGE_BWGRAPH ":/images/ksysguard.png" #define IMAGE_GLOBALROUTER ":/images/network32.png" +#define IMAGE_GXSTRANSPORT ":/icons/transport128.png" #define IMAGE_BANDWIDTH ":images/office-chart-area-stacked.png" #define IMAGE_RTT ":images/office-chart-line.png" @@ -135,7 +136,7 @@ void StatisticsWindow::initStackedPage() action = createPageAction(QIcon(IMAGE_GLOBALROUTER), tr("Global Router"), grp)); ui->stackPages->add(gxsdlg = new GxsTransportStatistics(ui->stackPages), - action = createPageAction(QIcon(IMAGE_GLOBALROUTER), tr("Gxs Transport"), grp)); + action = createPageAction(QIcon(IMAGE_GXSTRANSPORT), tr("Gxs Transport"), grp)); ui->stackPages->add(rttdlg = new RttStatistics(ui->stackPages), action = createPageAction(QIcon(IMAGE_RTT), tr("RTT Statistics"), grp));