Added a graphframe to Bandwidth Control Window and Turtle Router Statistics Dialog

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7500 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2014-08-29 14:18:50 +00:00
parent 6085ccd43f
commit 29a11b021e
10 changed files with 751 additions and 117 deletions

View file

@ -283,6 +283,9 @@ void BwCtrlWindow::updateBandwidth()
/* insert */
QTreeWidgetItem *item = new QTreeWidgetItem();
peerTreeWidget->addTopLevelItem(item);
peerTreeWidget->setSelectionMode(QAbstractItemView::SingleSelection);
updateGraph(totalRates.mRateIn,totalRates.mRateOut);
/* do Totals */
item -> setData(COLUMN_PEERID, Qt::DisplayRole, tr("TOTALS"));
@ -420,5 +423,10 @@ void BwCtrlWindow::updateBandwidth()
}
}
/** Adds new data to the graph. */
void BwCtrlWindow::updateGraph(qreal bytesRead, qreal bytesWritten)
{
/* Graph only cares about kilobytes */
ui->frmGraph->addPoints(bytesRead/*/1024.0*/, bytesWritten/*/1024.0*/);
}