Changeset 9577 in orxonox.OLD for branches/proxy/src/lib/network/monitor
- Timestamp:
- Jul 28, 2006, 5:40:30 PM (18 years ago)
- Location:
- branches/proxy/src/lib/network/monitor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/monitor/network_stats_widget.cc
r9569 r9577 23 23 #include "shell_command.h" 24 24 25 // SHELL_COMMAND(gui, NetworkMonitor, toggleGUI)26 //->setAlias("ProxyGui");25 SHELL_COMMAND(gui, NetworkStatsWidget, toggleGUI) 26 ->setAlias("ProxyGui"); 27 27 28 28 … … 147 147 */ 148 148 NetworkStatsWidget::NetworkStatsWidget(const NetworkMonitor* monitor) 149 : OrxGui::GLGuiFixedpositionBox(OrxGui::Center, OrxGui::Vertical), _thisHost("myName", IP(127, 0, 0 , 1))149 : OrxGui::GLGuiFixedpositionBox(OrxGui::Center, OrxGui::Vertical), _thisHost("myName", IP(127, 0, 0 , 1)) 150 150 { 151 151 this->_monitor = monitor; … … 173 173 this->pack(&this->_thisHostIs); 174 174 175 this->pack(&this->_thisHost);175 this->pack(&this->_thisHost); 176 176 177 177 this->pack(&this->_upstreamText); … … 193 193 NetworkStatsWidget::~NetworkStatsWidget () 194 194 {} 195 196 NetworkStatsWidget* NetworkStatsWidget::_statsWidget = NULL; 197 198 #include "class_list.h" 199 200 void NetworkStatsWidget::toggleGUI() 201 { 202 BaseObject* bo = NULL; 203 const std::list<BaseObject*>* ls = ClassList::getList(CL_NETWORK_MONITOR); 204 if (ls != NULL && !ls->empty()) 205 bo = ls->front(); 206 207 printf("==== %p\n", bo); 208 209 if (bo != NULL && NetworkStatsWidget::_statsWidget == NULL) 210 { 211 NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(dynamic_cast<NetworkMonitor*> (bo)); 212 NetworkStatsWidget::_statsWidget->showAll(); 213 } 214 else 215 { 216 delete NetworkStatsWidget::_statsWidget; 217 NetworkStatsWidget::_statsWidget = NULL; 218 } 219 } 195 220 196 221 … … 215 240 216 241 void NetworkStatsWidget::addProxy(const std::string& name, const IP& proxy) 217 { 218 } 242 {} 219 243 220 244 void clearProxies(); -
branches/proxy/src/lib/network/monitor/network_stats_widget.h
r9569 r9577 74 74 { 75 75 public: 76 static void toggleGUI(); 77 76 78 NetworkStatsWidget(const NetworkMonitor* monitor); 77 79 virtual ~NetworkStatsWidget(); … … 116 118 OrxGui::GLGuiPushButton _refreshButton; 117 119 120 static NetworkStatsWidget* _statsWidget; 121 118 122 //OrxGui::GLGuiText _valueText; 119 123 //OrxGui::GLGuiBar _bar;
Note: See TracChangeset
for help on using the changeset viewer.