Definition at line 921 of file mainTrecSearch.cpp. References DoTwoMinutesTimeAlert(), Impala::Core::Trec::SearchTopic::GetElapsedTime(), Impala::MakeString(), mDidTimeAlert, mSearchTopic, mTimeLeft, mTimeLeftText, mTopicRunning, SetBg(), Impala::Visualization::AppControlGUI::SetInterval(), OglGui::ProgressBar::SetProgress(), and OglGui::StaticText::SetText(). Referenced by HandleCycleGUI(). 00922 { 00923 // For Cees' active learning un-comment line below 00924 //return; 00925 if (!mSearchTopic) 00926 return; 00927 00928 if (!mTimeLeft) return; 00929 00930 double elapsed = mSearchTopic->GetElapsedTime(); 00931 00932 if ((elapsed > 8) && (!mDidTimeAlert)) 00933 DoTwoMinutesTimeAlert(); 00934 00935 // bg now: 0xff555566 00936 if (mTopicRunning) 00937 { 00938 if (elapsed > 7 && elapsed < 8) 00939 { 00940 double d = (elapsed - 7); 00941 SetBg(oglSys.RGB2Color(0x55+0x20*d, 0x55-0x10*d, 0x66)); 00942 } 00943 else if (elapsed > 8 && elapsed < 9.8) 00944 { 00945 double d = 1.0 - ((elapsed - 8) / 1.8); 00946 SetBg(oglSys.RGB2Color(0x75+0x10*d, 0x45, 0x66-0x10*d)); 00947 SetInterval(0.2); 00948 } 00949 else if (elapsed > 9.8 && elapsed < 10.0) 00950 { 00951 double d = ((elapsed - 9.8) / 0.2); 00952 SetBg(oglSys.RGB2Color(0x85+0x7A*d, 0x45+0xBA*d, 0x55+0xAA*d)); 00953 SetInterval(0.1); 00954 } 00955 else if (elapsed > 10) 00956 { 00957 SetBg(0xffffffff); 00958 SetInterval(0.5); 00959 elapsed = 15; 00960 } 00961 } 00962 elapsed = 10.0 - elapsed; 00963 int minutes = (int) elapsed; 00964 int seconds = (int) ((elapsed - minutes) * 60); 00965 String timeleft = MakeString(minutes) + ":" + MakeString(seconds); 00966 00967 if (mTimeLeft) { 00968 mTimeLeftText->SetText(timeleft); 00969 mTimeLeft->SetProgress(elapsed * 100.0 / 10.0); 00970 } 00971 }
Here is the call graph for this function:
|