mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 15:30:31 -04:00
improved RSGraph class. Used it for Turtle statistics and bandwidth statistics as well
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7612 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bd96859704
commit
8c1bf3cf8d
16 changed files with 267 additions and 145 deletions
|
@ -242,7 +242,6 @@ void TurtleRouterStatistics::updateDisplay()
|
|||
//updateTunnelRequests(hashes_info,tunnels_info,search_reqs_info,tunnel_reqs_info) ;
|
||||
_tst_CW->updateTunnelStatistics(hashes_info,tunnels_info,search_reqs_info,tunnel_reqs_info) ;
|
||||
_tst_CW->update();
|
||||
updateTunnelGraph();
|
||||
}
|
||||
|
||||
QString TurtleRouterStatistics::getPeerName(const RsPeerId &peer_id)
|
||||
|
@ -355,17 +354,3 @@ void TurtleRouterStatisticsWidget::resizeEvent(QResizeEvent *event)
|
|||
QWidget::resizeEvent(event);
|
||||
update();
|
||||
}
|
||||
|
||||
void TurtleRouterStatistics::updateTunnelGraph()
|
||||
{
|
||||
TurtleTrafficStatisticsInfo info ;
|
||||
rsTurtle->getTrafficStatistics(info) ;
|
||||
|
||||
updateGraph(info.tr_up_Bps,info.tr_dn_Bps,info.data_dn_Bps,info.data_up_Bps,info.unknown_updn_Bps);
|
||||
}
|
||||
|
||||
void TurtleRouterStatistics::updateGraph(qreal bytesTrup, qreal bytesTrdown, qreal bytesDatadown, qreal bytesDataup, qreal bytesunknownupdn)
|
||||
{
|
||||
/* Graph only cares about kilobytes */
|
||||
frmGraph->addPoints(bytesTrup/1024.0, bytesTrdown/1024.0, bytesDatadown/1024.0, bytesDataup/1024.0, bytesunknownupdn/1024.0 );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue