QTfrontend/hwform.cpp
changeset 8384 a6e7a95f3b2e
parent 8383 b557c73a7593
child 8385 9e8924ff9813
equal deleted inserted replaced
8383:b557c73a7593 8384:a6e7a95f3b2e
   350             widgets.at(i)->installEventFilter(filter);
   350             widgets.at(i)->installEventFilter(filter);
   351         }
   351         }
   352     }
   352     }
   353 
   353 
   354     PagesStack.push(ID_PAGE_MAIN);
   354     PagesStack.push(ID_PAGE_MAIN);
       
   355     ((AbstractPage*)ui.Pages->widget(ID_PAGE_MAIN))->triggerPageEnter();
   355     GoBack();
   356     GoBack();
   356 }
   357 }
   357 
   358 
   358 #ifdef USE_XFIRE
   359 #ifdef USE_XFIRE
   359 void HWForm::updateXfire(void)
   360 void HWForm::updateXfire(void)
   595     updateXfire();
   596     updateXfire();
   596 #endif
   597 #endif
   597     
   598     
   598     qDebug("Leaving %s, entering %s", qPrintable(stringifyPageId(lastid)), qPrintable(stringifyPageId(id)));
   599     qDebug("Leaving %s, entering %s", qPrintable(stringifyPageId(lastid)), qPrintable(stringifyPageId(id)));
   599 
   600 
       
   601     // pageEnter and pageLeave events
       
   602     ((AbstractPage*)ui.Pages->widget(lastid))->triggerPageLeave();    
       
   603     ((AbstractPage*)ui.Pages->widget(id))->triggerPageEnter();
       
   604 
   600     if (id == ID_PAGE_DATADOWNLOAD)
   605     if (id == ID_PAGE_DATADOWNLOAD)
   601     {
   606     {
   602         ui.pageDataDownload->fetchList();
   607         ui.pageDataDownload->fetchList();
   603     }
   608     }
   604     if (id == ID_PAGE_DRAWMAP)
   609     if (id == ID_PAGE_DRAWMAP)
   666                  && lastid != ID_PAGE_SELECTWEAPON)
   671                  && lastid != ID_PAGE_SELECTWEAPON)
   667         {
   672         {
   668             curTeamSelWidget->resetPlayingTeams(teamsList);
   673             curTeamSelWidget->resetPlayingTeams(teamsList);
   669         }
   674         }
   670     }
   675     }
   671     else if (id == ID_PAGE_GAMESTATS)
       
   672     {
       
   673         ui.pageGameStats->renderStats();
       
   674     }
       
   675 
   676 
   676     if (id == ID_PAGE_MAIN)
   677     if (id == ID_PAGE_MAIN)
   677     {
   678     {
   678         ui.pageOptions->setTeamOptionsEnabled(true);
   679         ui.pageOptions->setTeamOptionsEnabled(true);
   679     }
   680     }
   698    /* if (id == ID_PAGE_DRAWMAP || id == ID_PAGE_GAMESTATS)
   699    /* if (id == ID_PAGE_DRAWMAP || id == ID_PAGE_GAMESTATS)
   699         stopAnim = true;
   700         stopAnim = true;
   700     This were disabled due to broken flake animations.  I believe the more general problems w/ opacity that forced its disable makes blocking these
   701     This were disabled due to broken flake animations.  I believe the more general problems w/ opacity that forced its disable makes blocking these
   701     unnecessary.
   702     unnecessary.
   702    */
   703    */
       
   704 
   703 
   705 
   704 #if (QT_VERSION >= 0x040600)
   706 #if (QT_VERSION >= 0x040600)
   705     if (!stopAnim)
   707     if (!stopAnim)
   706     {
   708     {
   707         /**Start animation :**/
   709         /**Start animation :**/
   766 {
   768 {
   767     bool stopAnim = false;
   769     bool stopAnim = false;
   768     int curid = ui.Pages->currentIndex();
   770     int curid = ui.Pages->currentIndex();
   769     if (curid == ID_PAGE_MAIN)
   771     if (curid == ID_PAGE_MAIN)
   770     {
   772     {
       
   773         ((AbstractPage*)ui.Pages->widget(ID_PAGE_MAIN))->triggerPageLeave();
   771         if (!ui.pageVideos->tryQuit(this))
   774         if (!ui.pageVideos->tryQuit(this))
   772             return;
   775             return;
   773         stopAnim = true;
   776         stopAnim = true;
   774         exit();
   777         exit();
   775     }
   778     }