Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/util/network_stats_widget.h @ 9330

Last change on this file since 9330 was 9330, checked in by bensch, 18 years ago

orxonox/proxy added network_stats_widget to display the network statistics on the fly

File size: 1.1 KB
Line 
1/*!
2 * @file network_stats_widget.h
3 * @brief Definition of an EnergyWidget, that displays a bar and a Text
4*/
5
6#ifndef _NETWORK_STATS_WIDGET_H
7#define _NETWORK_STATS_WIDGET_H
8
9#include "glgui_box.h"
10#include "glgui_bar.h"
11#include "glgui_text.h"
12
13#include "network/ip.h"
14
15
16namespace OrxGui
17{
18
19  //! A class to display network Statistics.
20  class NetworkStatsWidget : public GLGuiBox
21  {
22
23  public:
24    NetworkStatsWidget();
25    virtual ~NetworkStatsWidget();
26
27    void setUpstream(unsigned int upstream);
28    void setDownstream(unsigned int upstream);
29
30    void setMaximum(float max);
31    void setValue(float value);
32
33
34    //void rebuildConnectedHosts(std::vector<hosts> hosts);
35
36  protected:
37    virtual void resize();
38    virtual void showing();
39    virtual void hiding();
40
41  private:
42    IP                     _ip;
43    GLGuiText              _ipText;
44
45    GLGuiText              _upstreamText;
46    GLGuiText              _downstreamText;
47
48    std::vector<GLGuiText> _connectedHosts;
49
50    GLGuiText              _serverIP;
51
52
53    GLGuiText              _valueText;
54    GLGuiBar               _bar;
55  };
56}
57#endif /* _NETWORK_STATS_WIDGET_H */
Note: See TracBrowser for help on using the repository browser.