bug fixes to NS gui

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7254 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-04-07 21:35:51 +00:00
parent e2cf4feaa5
commit 74bc8ad999
5 changed files with 10 additions and 4 deletions

View File

@ -48,6 +48,7 @@ GlobalRouterStatistics::GlobalRouterStatistics(QWidget *parent)
setupUi(this) ;
_router_F->setWidget( _tst_CW = new GlobalRouterStatisticsWidget() ) ;
_grouter = NULL ;
}
GlobalRouterStatistics::~GlobalRouterStatistics()
@ -61,6 +62,7 @@ void GlobalRouterStatistics::setGlobalRouter(const RsGRouter *grouter)
}
void GlobalRouterStatistics::updateDisplay()
{
if(_grouter != NULL)
_tst_CW->updateContent(_grouter) ;
}

View File

@ -33,6 +33,8 @@ void NetworkSimulatorGUI::updateSelectedNode(int node_id)
_turtle_router_statistics->updateDisplay() ;
_global_router_statistics->updateDisplay() ;
std::cerr << "Selected objects: turtle=" << std::hex << _viewer->network().node(node_id).turtle_service() << ", grouter=" << _viewer->network().node(node_id).global_router_service() << std::dec << std::endl;
}
void NetworkSimulatorGUI::toggleNetworkTraffic(bool b)
@ -57,7 +59,7 @@ void NetworkSimulatorGUI::timerEvent(QTimerEvent *event)
{
Q_UNUSED(event) ;
std::cerr << "timer event!" << std::endl;
//std::cerr << "timer event!" << std::endl;
_viewer->network().tick() ;

View File

@ -0,0 +1,2 @@
TEMPLATE = subdirs
SUBDIRS = nscore gui

View File

@ -66,7 +66,7 @@ bool Network::initRandom(uint32_t nb_nodes,float connexion_probability)
void Network::tick()
{
std::cerr<< "network loop: tick()" << std::endl;
//std::cerr<< "network loop: tick()" << std::endl;
// Tick all nodes.

View File

@ -48,7 +48,7 @@ PeerNode::~PeerNode()
void PeerNode::tick()
{
std::cerr << " ticking peer node " << _id << std::endl;
//std::cerr << " ticking peer node " << _id << std::endl;
_service_server->tick() ;
}