equal
deleted
inserted
replaced
39 #include <QSignalMapper> |
39 #include <QSignalMapper> |
40 #include <QShortcut> |
40 #include <QShortcut> |
41 #include <QDesktopServices> |
41 #include <QDesktopServices> |
42 #include <QInputDialog> |
42 #include <QInputDialog> |
43 #include <QPropertyAnimation> |
43 #include <QPropertyAnimation> |
|
44 #include <QSettings> |
|
45 |
|
46 #if (QT_VERSION >= 0x040600) |
44 #include <QGraphicsEffect> |
47 #include <QGraphicsEffect> |
45 #include <QParallelAnimationGroup> |
48 #include <QParallelAnimationGroup> |
46 #include <QSettings> |
49 #endif |
47 |
50 |
48 #include "hwform.h" |
51 #include "hwform.h" |
49 #include "game.h" |
52 #include "game.h" |
50 #include "team.h" |
53 #include "team.h" |
51 #include "teamselect.h" |
54 #include "teamselect.h" |
591 ui.Pages->setCurrentIndex(id); |
594 ui.Pages->setCurrentIndex(id); |
592 |
595 |
593 if (id == ID_PAGE_DRAWMAP) |
596 if (id == ID_PAGE_DRAWMAP) |
594 stopAnim = true; |
597 stopAnim = true; |
595 |
598 |
|
599 #if (QT_VERSION >= 0x040600) |
596 if (!stopAnim) |
600 if (!stopAnim) |
597 { |
601 { |
598 /**Start animation :**/ |
602 /**Start animation :**/ |
599 int coeff = 1; |
603 int coeff = 1; |
600 #ifndef Q_OS_MAC |
604 #ifndef Q_OS_MAC |
649 #endif |
653 #endif |
650 group->start(); |
654 group->start(); |
651 |
655 |
652 connect(animationOldSlide, SIGNAL(finished()), ui.Pages->widget(lastid), SLOT(hide())); |
656 connect(animationOldSlide, SIGNAL(finished()), ui.Pages->widget(lastid), SLOT(hide())); |
653 } |
657 } |
|
658 #endif |
654 } |
659 } |
655 |
660 |
656 void HWForm::GoBack() |
661 void HWForm::GoBack() |
657 { |
662 { |
658 bool stopAnim = false; |
663 bool stopAnim = false; |
698 //if (curid == ID_PAGE_NETGAME && (!game || game->gameState != gsStarted)) hwnet->partRoom(); |
703 //if (curid == ID_PAGE_NETGAME && (!game || game->gameState != gsStarted)) hwnet->partRoom(); |
699 |
704 |
700 if (curid == ID_PAGE_SCHEME) |
705 if (curid == ID_PAGE_SCHEME) |
701 ammoSchemeModel->Save(); |
706 ammoSchemeModel->Save(); |
702 |
707 |
|
708 #if (QT_VERSION >= 0x040600) |
703 /**Start animation :**/ |
709 /**Start animation :**/ |
704 |
|
705 if (curid != 0 && !stopAnim) |
710 if (curid != 0 && !stopAnim) |
706 { |
711 { |
707 int coeff = 1; |
712 int coeff = 1; |
708 #ifndef Q_OS_MAC |
713 #ifndef Q_OS_MAC |
709 coeff = 2; |
714 coeff = 2; |
757 #endif |
762 #endif |
758 group->start(); |
763 group->start(); |
759 |
764 |
760 connect(animationNewSlide, SIGNAL(finished()), ui.Pages->widget(curid), SLOT(hide())); |
765 connect(animationNewSlide, SIGNAL(finished()), ui.Pages->widget(curid), SLOT(hide())); |
761 } |
766 } |
|
767 #endif |
762 } |
768 } |
763 |
769 |
764 void HWForm::OpenSnapshotFolder() |
770 void HWForm::OpenSnapshotFolder() |
765 { |
771 { |
766 QString path = QDir::toNativeSeparators(cfgdir->absolutePath() + "/Screenshots"); |
772 QString path = QDir::toNativeSeparators(cfgdir->absolutePath() + "/Screenshots"); |