added icon for GxsTransport

This commit is contained in:
csoler 2017-05-27 14:48:08 +02:00
parent 4fef4d63bc
commit e06bd9b6ec
4 changed files with 3 additions and 101 deletions

View File

@ -13,6 +13,7 @@
<file>icons/anonymous_blue_128.png</file> <file>icons/anonymous_blue_128.png</file>
<file>icons/anonymous_green_128.png</file> <file>icons/anonymous_green_128.png</file>
<file>icons/aol.png</file> <file>icons/aol.png</file>
<file>icons/transport128.png</file>
<file>icons/avatar_128.png</file> <file>icons/avatar_128.png</file>
<file>icons/avatar_grey_128.png</file> <file>icons/avatar_grey_128.png</file>
<file>icons/biohazard_red.png</file> <file>icons/biohazard_red.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -264,106 +264,6 @@ void GxsTransportStatistics::personDetails()
dialog->show(); 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) void GxsTransportStatistics::loadRequest(const TokenQueue *queue, const TokenRequest &req)
{ {
std::cerr << "GxsTransportStatistics::loadRequest() UserType: " << req.mUserType << std::endl; std::cerr << "GxsTransportStatistics::loadRequest() UserType: " << req.mUserType << std::endl;

View File

@ -53,6 +53,7 @@
#define IMAGE_TURTLE ":images/turtle.png" #define IMAGE_TURTLE ":images/turtle.png"
#define IMAGE_BWGRAPH ":/images/ksysguard.png" #define IMAGE_BWGRAPH ":/images/ksysguard.png"
#define IMAGE_GLOBALROUTER ":/images/network32.png" #define IMAGE_GLOBALROUTER ":/images/network32.png"
#define IMAGE_GXSTRANSPORT ":/icons/transport128.png"
#define IMAGE_BANDWIDTH ":images/office-chart-area-stacked.png" #define IMAGE_BANDWIDTH ":images/office-chart-area-stacked.png"
#define IMAGE_RTT ":images/office-chart-line.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)); action = createPageAction(QIcon(IMAGE_GLOBALROUTER), tr("Global Router"), grp));
ui->stackPages->add(gxsdlg = new GxsTransportStatistics(ui->stackPages), 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), ui->stackPages->add(rttdlg = new RttStatistics(ui->stackPages),
action = createPageAction(QIcon(IMAGE_RTT), tr("RTT Statistics"), grp)); action = createPageAction(QIcon(IMAGE_RTT), tr("RTT Statistics"), grp));