Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 18, 2006, 8:02:10 PM (19 years ago)
Author:
bensch
Message:

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

File:
1 copied

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/util/network_stats_widget.cc

    r9329 r9330  
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
    1717
    18 #include "glgui_energywidget.h"
     18#include "network_stats_widget.h"
    1919
    2020namespace OrxGui
     
    2323   * @brief standard constructor
    2424   */
    25   GLGuiEnergyWidget::GLGuiEnergyWidget ()
     25  NetworkStatsWidget::NetworkStatsWidget ()
    2626  {
    27     //   this->setClassID(CL_PROTO_ID, "GLGuiEnergyWidget");
     27    //   this->setClassID(CL_PROTO_ID, "NetworkStatsWidget");
    2828
    2929    this->_bar.setSize2D(100, 30);
    30     this->pack(&this->_name);
    3130    this->pack(&this->_valueText);
    3231    this->_bar.setParent2D(&this->_valueText);
    3332
    34     this->_name.setForegroundColor(Color(1,1,1,.8));
    3533    this->_valueText.setChangedTextColor(Color::white);
    3634
     
    5149   * @brief standard deconstructor
    5250   */
    53   GLGuiEnergyWidget::~GLGuiEnergyWidget ()
     51  NetworkStatsWidget::~NetworkStatsWidget ()
    5452  {
    5553  }
    5654
    5755
    58   void GLGuiEnergyWidget::setDisplayedName(const std::string& name)
    59   {
    60     this->_name.setText(name);
    61     this->_bar.setWidgetSize(this->_name.getSize2D());
    62   }
    63 
    64   void GLGuiEnergyWidget::setMaximum(float max)
     56  void NetworkStatsWidget::setMaximum(float max)
    6557  {
    6658    this->_bar.setMaximum(max);
    6759  }
    6860
    69   void GLGuiEnergyWidget::setValue(float value)
     61  void NetworkStatsWidget::setValue(float value)
    7062  {
    7163    MultiType val(value);
     
    7971  }
    8072
    81   void GLGuiEnergyWidget::resize()
     73  void NetworkStatsWidget::resize()
    8274  {
    8375    GLGuiBox::resize();
     
    8577
    8678
    87   void GLGuiEnergyWidget::showing()
     79  void NetworkStatsWidget::showing()
    8880  {
    89     this->_name.show();
    9081    this->_valueText.show();
    9182    this->_bar.show();
    9283  }
    9384
    94   void GLGuiEnergyWidget::hiding()
     85  void NetworkStatsWidget::hiding()
    9586  {
    96     this->_name.hide();
    9787    this->_valueText.hide();
    9888    this->_bar.hide();
Note: See TracChangeset for help on using the changeset viewer.