Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9618 in orxonox.OLD


Ignore:
Timestamp:
Jul 30, 2006, 2:51:51 PM (18 years ago)
Author:
bensch
Message:

more gui functionality… but there will be more

Location:
branches/proxy/src/lib/network/monitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/monitor/network_stats_widget.cc

    r9607 r9618  
    5555
    5656
    57 ProxyWidget::ProxyWidget(const std::string& proxyName, const IP& ip)
     57NodeWidget::NodeWidget(const std::string& proxyName, const IP& ip)
    5858    : _proxyWidget(proxyName, ip)
    5959{
     
    6262}
    6363
    64 void ProxyWidget::addClient(const std::string& name, const IP& ip)
     64NodeWidget::NodeWidget(const NetworkNode* node)
     65  : _proxyWidget("node", node->getPeerInfo()->ip)
     66{
     67  this->_clientNameWidth = 100.0f;
     68  this->pack(&_proxyWidget);
     69}
     70
     71
     72void NodeWidget::addClient(const std::string& name, const IP& ip)
    6573{
    6674  HostWidget* newClient = new HostWidget(name, ip);
     
    7381}
    7482
    75 bool ProxyWidget::removeClient(const IP& ip)
     83bool NodeWidget::removeClient(const IP& ip)
    7684{
    7785  std::vector<HostWidget*>::iterator rmIt;
     
    8896}
    8997
    90 bool ProxyWidget::removeClient(const std::string& name)
     98bool NodeWidget::removeClient(const std::string& name)
    9199{
    92100  std::vector<HostWidget*>::iterator rmIt;
     
    104112}
    105113
    106 bool ProxyWidget::removeClient(const std::string& name, const IP& ip)
     114bool NodeWidget::removeClient(const std::string& name, const IP& ip)
    107115{
    108116  std::vector<HostWidget*>::iterator rmIt;
     
    120128
    121129
    122 void ProxyWidget::setClientNameWidths(float width)
     130void NodeWidget::setClientNameWidths(float width)
    123131{
    124132  this->_clientNameWidth = width;
     
    127135}
    128136
    129 void ProxyWidget::hiding()
     137void NodeWidget::hiding()
    130138{
    131139  this->_proxyWidget.hide();
     
    134142}
    135143
    136 void ProxyWidget::showing()
     144void NodeWidget::showing()
    137145{
    138146  this->_proxyWidget.show();
     
    186194  this->_refreshButton.released.connect(this, &NetworkStatsWidget::rebuild);
    187195  this->pack(&this->_refreshButton);
     196
     197  this->rebuild();
    188198}
    189199
     
    195205{}
    196206
     207
     208void NetworkStatsWidget::addNode(const NetworkNode* node)
     209{
     210  this->_proxies.push_back(new NodeWidget(node));
     211  this->pack(this->_proxies.back());
     212  this->_proxies.back()->show();
     213}
     214
     215
     216
     217
    197218NetworkStatsWidget* NetworkStatsWidget::_statsWidget = NULL;
    198219
     
    255276
    256277
     278  std::list<NetworkNode*>::const_iterator it = this->_monitor->getNodeList().begin();
     279  for(; it != this->_monitor->getNodeList().end(); it++)
     280  {
     281    this->addNode(*it);
     282  }
     283
     284
    257285
    258286}
  • branches/proxy/src/lib/network/monitor/network_stats_widget.h

    r9607 r9618  
    4242
    4343
    44 class ProxyWidget : public OrxGui::GLGuiBox
     44class NodeWidget : public OrxGui::GLGuiBox
    4545{
    4646  public:
    47     ProxyWidget(const std::string& proxyName, const IP& ip);
     47    NodeWidget(const std::string& proxyName, const IP& ip);
     48    NodeWidget(const NetworkNode* node);
    4849
    4950    void addClient(const NetworkNode* node);
     
    8889
    8990    void addProxy(const std::string& name, const IP& proxy);
     91    void addNode(const NetworkNode* node);
     92
    9093    void clearProxies();
    9194
     
    115118    OrxGui::GLGuiWidget    _serverBox;
    116119
    117     std::vector<HostWidget*> _proxies;
     120    std::vector<NodeWidget*> _proxies;
    118121
    119122
Note: See TracChangeset for help on using the changeset viewer.