summaryrefslogtreecommitdiffstats
path: root/examples/statemachine/tankgame/gameovertransition.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-05-14 11:12:12 (GMT)
committerEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-05-14 11:12:12 (GMT)
commitededfad305258f9f450b314d9e2d53a6905bc6d0 (patch)
tree6a3b6e4d7ec09e596c0ba2b9f81b816614089962 /examples/statemachine/tankgame/gameovertransition.h
parentfa99a2ab12f646d73498b69fae0020da1abf9685 (diff)
downloadQt-ededfad305258f9f450b314d9e2d53a6905bc6d0.zip
Qt-ededfad305258f9f450b314d9e2d53a6905bc6d0.tar.gz
Qt-ededfad305258f9f450b314d9e2d53a6905bc6d0.tar.bz2
Pop up message when a tank wins the game
Also fixed: Added some docs and moved the tanks a little so they don't start partly outside the scene rect.
Diffstat (limited to 'examples/statemachine/tankgame/gameovertransition.h')
-rw-r--r--examples/statemachine/tankgame/gameovertransition.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/statemachine/tankgame/gameovertransition.h b/examples/statemachine/tankgame/gameovertransition.h
new file mode 100644
index 0000000..53c9b86
--- /dev/null
+++ b/examples/statemachine/tankgame/gameovertransition.h
@@ -0,0 +1,22 @@
+#ifndef GAMEOVERTRANSITION_H
+#define GAMEOVERTRANSITION_H
+
+#include <QSignalTransition>
+
+class TankItem;
+class GameOverTransition: public QSignalTransition
+{
+ Q_OBJECT
+public:
+ GameOverTransition(QAbstractState *targetState);
+
+ void addTankItem(TankItem *tankItem);
+
+protected:
+ bool eventTest(QEvent *event) const;
+
+private:
+ mutable QList<TankItem *> m_tankItems;
+};
+
+#endif