Definition at line 126 of file AlertTimeLine.h. References AlertButton(), ComputeX(), OglGui::OglWindow::GetOGLWND(), mAlertButtons, mAlertH, mAlertW, mLineY, mNrAlerts, OglGui::Button::SetButtonListener(), OglGui::OglWindow::X(), and OglGui::OglWindow::Y(). Referenced by AddAlert(), OglGui::AlertTimeLine::GenerateAlertListener::ButtonSelectionEvent(), and Impala::Application::SDash::SurveillanceApp::ShowEvent(). 00127 { 00128 char buf[40]; 00129 sprintf(buf, "%d", alertId); 00130 00131 int h = mLineY;// - mAlertH/2; 00132 int base = h; 00133 int nX = ComputeX(seconds); 00134 int nBtns = mAlertButtons.size(); 00135 00136 Button* lastBtn = nBtns ? mAlertButtons[nBtns-1] : 0; 00137 if (lastBtn && nX-lastBtn->X() < mAlertW) 00138 { 00139 int i = nBtns-1; 00140 while (i>=0 && mAlertButtons[i]->Y() > base) 00141 i--; 00142 while (i<nBtns && mAlertButtons[i]->X() > nX-mAlertW) 00143 { 00144 h = mAlertButtons[i]->Y() + mAlertH; 00145 i++; 00146 } 00147 } 00148 Button* btn = AlertButton(nX, h, mAlertW, mAlertH, col, buf); 00149 oglSys.SetUserData(btn->GetOGLWND(), 1, (void*) seconds); 00150 oglSys.SetUserData(btn->GetOGLWND(), 2, (void*) userData); 00151 btn->SetButtonListener(this, userData); 00152 mAlertButtons.push_back(btn); 00153 mNrAlerts++; 00154 }
Here is the call graph for this function:
|