Changeset 9869 in orxonox.OLD for trunk/src/lib/network/monitor
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- Location:
- trunk/src/lib/network/monitor
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/network/monitor/connection_monitor.cc
r9494 r9869 23 23 /* using namespace std is default, this needs to be here */ 24 24 25 25 ObjectListDefinition(ConnectionMonitor); 26 26 /** 27 27 * constructor … … 31 31 { 32 32 /* set the class id for the base object and add ist to class list*/ 33 this-> setClassID(CL_CONNECTION_MONITOR, "ConnectionMonitor");33 this->registerObject(this, ConnectionMonitor::_objectList); 34 34 35 35 this->userId = userId; -
trunk/src/lib/network/monitor/connection_monitor.h
r9494 r9869 19 19 class ConnectionMonitor : virtual public BaseObject 20 20 { 21 ObjectListDeclaration(ConnectionMonitor); 21 22 public: 22 23 ConnectionMonitor( int userId ); -
trunk/src/lib/network/monitor/network_monitor.cc
r9656 r9869 37 37 SHELL_COMMAND(debug, NetworkMonitor, debug); 38 38 39 ObjectListDefinition(NetworkMonitor); 39 40 40 41 … … 45 46 : Synchronizeable() 46 47 { 47 this-> setClassID(CL_NETWORK_MONITOR, "NetworkMonitor");48 this->registerObject(this, NetworkMonitor::_objectList); 48 49 49 50 this->networkStream = networkStream; -
trunk/src/lib/network/monitor/network_monitor.h
r9656 r9869 27 27 class NetworkMonitor : public Synchronizeable 28 28 { 29 29 ObjectListDeclaration(NetworkMonitor); 30 30 public: 31 31 NetworkMonitor(NetworkStream* networkStream); -
trunk/src/lib/network/monitor/network_stats_widget.cc
r9656 r9869 20 20 #include "peer_info.h" 21 21 22 #include "loading/resource_manager.h" 23 22 24 #include "multi_type.h" 23 25 24 26 #include "shell_command.h" 25 26 #include "loading/resource_manager.h"27 27 28 28 // this fcuk does not work! … … 30 30 // ->setAlias("ProxyGui"); 31 31 32 33 32 HostWidget::HostWidget(const std::string& name, const IP& ip) 34 33 : GLGuiBox(OrxGui::Horizontal) … … 57 56 { 58 57 if(_font == NULL) 59 _font = new Font(Resource Manager::getInstance()->getDataDir() + "/fonts/arial.ttf", 20);58 _font = new Font(Resources::ResourceManager::getInstance()->mainGlobalPath().name() + "/fonts/arial.ttf", 20); 60 59 61 60 //this->_name.setFont(*_font); … … 211 210 //======================================================// 212 211 212 213 ObjectListDefinition(NetworkStatsWidget); 213 214 /** 214 215 * @brief standard constructor … … 273 274 NetworkStatsWidget* NetworkStatsWidget::_statsWidget = NULL; 274 275 275 #include "class_list.h"276 277 276 void NetworkStatsWidget::toggleGUI() 278 277 { 279 BaseObject* bo = NULL; 280 const std::list<BaseObject*>* ls = ClassList::getList(CL_NETWORK_MONITOR); 281 if (ls != NULL && !ls->empty()) 282 bo = ls->front(); 283 284 if (bo != NULL && NetworkStatsWidget::_statsWidget == NULL) 285 { 286 NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(dynamic_cast<NetworkMonitor*> (bo)); 278 NetworkMonitor* monitor; 279 if (!NetworkMonitor::objectList().empty()) 280 monitor = NetworkMonitor::objectList().front(); 281 282 if (monitor != NULL && NetworkStatsWidget::_statsWidget == NULL) 283 { 284 NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(monitor); 287 285 NetworkStatsWidget::_statsWidget->showAll(); 288 286 } -
trunk/src/lib/network/monitor/network_stats_widget.h
r9656 r9869 81 81 class NetworkStatsWidget : public OrxGui::GLGuiFixedpositionBox 82 82 { 83 ObjectListDeclaration(NetworkStatsWidget); 83 84 public: 84 85 static void toggleGUI();
Note: See TracChangeset
for help on using the changeset viewer.