mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-29 02:51:45 -04:00
created a generic class for graphs, and used it for DHT. The plan is to use the same class to draw all graphs.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7601 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fbb177dd66
commit
edd7bf7c31
6 changed files with 158 additions and 453 deletions
|
@ -73,7 +73,6 @@ void DhtWindow::updateDisplay()
|
|||
updateNetPeers();
|
||||
updateDhtPeers();
|
||||
updateRelays();
|
||||
getDHTStatus();
|
||||
|
||||
RsAutoUpdatePage::unlockAllEvents() ;
|
||||
}
|
||||
|
@ -667,39 +666,39 @@ void DhtWindow::updateDhtPeers()
|
|||
void DhtWindow::getDHTStatus()
|
||||
{
|
||||
|
||||
RsConfigNetStatus config;
|
||||
rsConfig->getConfigNetStatus(config);
|
||||
|
||||
if (!(config.DHTActive))
|
||||
{
|
||||
// GRAY.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (config.netDhtOk)
|
||||
{
|
||||
#define MIN_RS_NET_SIZE 10
|
||||
// YELLOW or GREEN.
|
||||
if (config.netDhtRsNetSize < MIN_RS_NET_SIZE)
|
||||
{
|
||||
updateGraph(config.netDhtRsNetSize,config.netDhtNetSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateGraph(config.netDhtRsNetSize,config.netDhtNetSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// RED - some issue.
|
||||
|
||||
}
|
||||
}
|
||||
// RsConfigNetStatus config;
|
||||
// rsConfig->getConfigNetStatus(config);
|
||||
//
|
||||
// if (!(config.DHTActive))
|
||||
// {
|
||||
// // GRAY.
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (config.netDhtOk)
|
||||
// {
|
||||
// #define MIN_RS_NET_SIZE 10
|
||||
// // YELLOW or GREEN.
|
||||
// if (config.netDhtRsNetSize < MIN_RS_NET_SIZE)
|
||||
// {
|
||||
// updateGraph(config.netDhtRsNetSize,config.netDhtNetSize);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// updateGraph(config.netDhtRsNetSize,config.netDhtNetSize);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // RED - some issue.
|
||||
//
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/** Adds new data to the graph. */
|
||||
void DhtWindow::updateGraph(qreal rsDHT, qreal allDHT)
|
||||
{
|
||||
ui.frmGraph->addPoints(rsDHT, allDHT);
|
||||
// ui.frmGraph->addPoints(rsDHT, allDHT);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue