536 void HWForm::OnPageShown(quint8 id, quint8 lastid) |
536 void HWForm::OnPageShown(quint8 id, quint8 lastid) |
537 { |
537 { |
538 #ifdef USE_XFIRE |
538 #ifdef USE_XFIRE |
539 updateXfire(); |
539 updateXfire(); |
540 #endif |
540 #endif |
|
541 |
|
542 QString openPrefix = "Debug: (PAGE_OPENED: "; |
|
543 QString openSuffix = ")"; |
|
544 QString closePrefix = "Debug: (PAGE_LEFT: "; |
|
545 QString closeSuffix = ")"; |
|
546 |
|
547 switch (lastid) { //Print the id of the page we're leaving |
|
548 case ID_PAGE_SETUP_TEAM : qDebug("%sPAGE_SETUP_TEAM%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
549 case ID_PAGE_SETUP : qDebug("%sPAGE_SETUP%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
550 case ID_PAGE_MULTIPLAYER : qDebug("%sPAGE_MULTIPLAYER%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
551 case ID_PAGE_DEMOS : qDebug("%sPAGE_DEMOS%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
552 case ID_PAGE_NET : qDebug("%sPAGE_NET%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
553 case ID_PAGE_NETGAME : qDebug("%sPAGE_NETGAME%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
554 case ID_PAGE_INFO : qDebug("%sPAGE_INFO%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
555 case ID_PAGE_MAIN : qDebug("%sPAGE_MAIN%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
556 case ID_PAGE_GAMESTATS : qDebug("%sPAGE_GAMESTATS%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
557 case ID_PAGE_SINGLEPLAYER : qDebug("%sPAGE_SINGLEPLAYER%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
558 case ID_PAGE_TRAINING : qDebug("%sPAGE_TRAINING%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
559 case ID_PAGE_SELECTWEAPON : qDebug("%sPAGE_SELECTWEAPON%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
560 case ID_PAGE_NETSERVER : qDebug("%sPAGE_NETSERVER%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
561 case ID_PAGE_INGAME : qDebug("%sPAGE_INGAME%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
562 case ID_PAGE_ROOMSLIST : qDebug("%sPAGE_ROOMSLIST%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
563 case ID_PAGE_CONNECTING : qDebug("%sPAGE_CONNECTING%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
564 case ID_PAGE_SCHEME : qDebug("%sPAGE_SCHEME%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
565 case ID_PAGE_ADMIN : qDebug("%sPAGE_ADMIN%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
566 case ID_PAGE_NETTYPE : qDebug("%sPAGE_NETTYPE%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
567 case ID_PAGE_CAMPAIGN : qDebug("%sPAGE_CAMPAIGN%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
568 case ID_PAGE_DRAWMAP : qDebug("%sPAGE_DRAWMAP%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
569 case ID_PAGE_DATADOWNLOAD : qDebug("%sPAGE_DATADOWNLOAD%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
570 case ID_PAGE_FEEDBACK : qDebug("%sPAGE_FEEDBACK%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
571 case ID_PAGE_VIDEOS : qDebug("%sPAGE_VIDEOS%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
572 case MAX_PAGE : qDebug("%sMAX_PAGE%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
573 default : qDebug("%sUNKNOWN PAGE%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
574 } //end switch(lastid) |
|
575 switch (id) { //Print the id of the opened page |
|
576 case ID_PAGE_SETUP_TEAM : qDebug("%sPAGE_SETUP_TEAM%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
577 case ID_PAGE_SETUP : qDebug("%sPAGE_SETUP%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
578 case ID_PAGE_MULTIPLAYER : qDebug("%sPAGE_MULTIPLAYER%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
579 case ID_PAGE_DEMOS : qDebug("%sPAGE_DEMOS%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
580 case ID_PAGE_NET : qDebug("%sPAGE_NET%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
581 case ID_PAGE_NETGAME : qDebug("%sPAGE_NETGAME%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
582 case ID_PAGE_INFO : qDebug("%sPAGE_INFO%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
583 case ID_PAGE_MAIN : qDebug("%sPAGE_MAIN%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
584 case ID_PAGE_GAMESTATS : qDebug("%sPAGE_GAMESTATS%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
585 case ID_PAGE_SINGLEPLAYER : qDebug("%sPAGE_SINGLEPLAYER%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
586 case ID_PAGE_TRAINING : qDebug("%sPAGE_TRAINING%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
587 case ID_PAGE_SELECTWEAPON : qDebug("%sPAGE_SELECTWEAPON%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
588 case ID_PAGE_NETSERVER : qDebug("%sPAGE_NETSERVER%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
589 case ID_PAGE_INGAME : qDebug("%sPAGE_INGAME%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
590 case ID_PAGE_ROOMSLIST : qDebug("%sPAGE_ROOMSLIST%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
591 case ID_PAGE_CONNECTING : qDebug("%sPAGE_CONNECTING%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
592 case ID_PAGE_SCHEME : qDebug("%sPAGE_SCHEME%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
593 case ID_PAGE_ADMIN : qDebug("%sPAGE_ADMIN%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
594 case ID_PAGE_NETTYPE : qDebug("%sPAGE_NETTYPE%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
595 case ID_PAGE_CAMPAIGN : qDebug("%sPAGE_CAMPAIGN%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
596 case ID_PAGE_DRAWMAP : qDebug("%sPAGE_DRAWMAP%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
597 case ID_PAGE_DATADOWNLOAD : qDebug("%sPAGE_DATADOWNLOAD%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
598 case ID_PAGE_FEEDBACK : qDebug("%sPAGE_FEEDBACK%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
599 case ID_PAGE_VIDEOS : qDebug("%sPAGE_VIDEOS%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
600 case MAX_PAGE : qDebug("%sMAX_PAGE%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
601 default : qDebug("%sUNKNOWN PAGE%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
602 } //end switch(id) |
|
603 |
541 if (id == ID_PAGE_DATADOWNLOAD) |
604 if (id == ID_PAGE_DATADOWNLOAD) |
542 { |
605 { |
543 ui.pageDataDownload->fetchList(); |
606 ui.pageDataDownload->fetchList(); |
544 } |
607 } |
545 if (id == ID_PAGE_DRAWMAP) |
608 if (id == ID_PAGE_DRAWMAP) |