- Timestamp:
- May 29, 2011, 11:24:31 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/modules/notifications/NotificationQueue.cc
r8651 r8656 136 136 { 137 137 this->tickTime_ += dt; // Add the time interval that has passed to the time counter. 138 if(this->displayTime_ != INF && this->tickTime_ >= 1.0) // If the time counter is greater than 1 s all Notifications that have expired are removed, if it is smaller we wait to the next tick.138 if(this->displayTime_ != INF && this->tickTime_ >= 1.0) // If the time counter is greater than 1 s all Notifications that have expired are removed, if it is smaller we wait to the next tick. 139 139 { 140 140 this->timeLimit_.time = std::time(0)-this->displayTime_; // Container containing the current time. … … 171 171 void NotificationQueue::registerVariables() 172 172 { 173 registerVariable( this->maxSize_, VariableDirection::ToClient 174 registerVariable( this->targets_, VariableDirection::ToClient 175 registerVariable( this->displayTime_, VariableDirection::ToClient 173 registerVariable( this->maxSize_, VariableDirection::ToClient, new NetworkCallback<NotificationQueue>(this, &NotificationQueue::maxSizeChanged)); 174 registerVariable( this->targets_, VariableDirection::ToClient, new NetworkCallback<NotificationQueue>(this, &NotificationQueue::targetsChanged)); 175 registerVariable( this->displayTime_, VariableDirection::ToClient, new NetworkCallback<NotificationQueue>(this, &NotificationQueue::displayTimeChanged)); 176 176 } 177 177 … … 229 229 @brief 230 230 Adds (pushes) a Notification to the NotificationQueue. 231 It inserts it into the storage containers, creates a corresponding container and pushes the Notification message to the GUI.231 It inserts it into the storage containers, creates a corresponding container and pushes the notification message to the GUI. 232 232 @param notification 233 233 The Notification to be pushed. … … 363 363 364 364 this->maxSize_ = size; 365 365 this->maxSizeChanged(); 366 } 367 368 /** 369 @brief 370 Is called when the maximum number of displayed Notifications has changed. 371 */ 372 void NotificationQueue::maxSizeChanged(void) 373 { 366 374 if(this->isRegistered()) 367 375 this->update(); … … 385 393 386 394 this->displayTime_ = time; 387 395 this->displayTimeChanged(); 396 } 397 398 /** 399 @brief 400 Is called when the maximum number of seconds a Notification is displayed has changed. 401 */ 402 void NotificationQueue::displayTimeChanged(void) 403 { 388 404 if(this->isRegistered()) 389 405 this->update(); … … 428 444 this->targets_.insert(string[i]); 429 445 446 this->targetsChanged(); 447 } 448 449 /** 450 @brief 451 Is called when the NotificationQueue's targets have changed. 452 */ 453 void NotificationQueue::targetsChanged(void) 454 { 430 455 // TODO: Why? 431 456 if(this->isRegistered())
Note: See TracChangeset
for help on using the changeset viewer.