diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-05 09:49:54 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-05 09:51:38 (GMT) |
commit | 32a9237c49fd126bee0cbe02c3c5bff5145a6e21 (patch) | |
tree | 6fc313f62e0eafeda35483c9f3630f4275a472ec /demos/sub-attaq/boat.h | |
parent | 429c7c6760c100685e9800b89fca7f0afd2d8abc (diff) | |
download | Qt-32a9237c49fd126bee0cbe02c3c5bff5145a6e21.zip Qt-32a9237c49fd126bee0cbe02c3c5bff5145a6e21.tar.gz Qt-32a9237c49fd126bee0cbe02c3c5bff5145a6e21.tar.bz2 |
Simplification and use of QGraphicsObject in sub-attas demo
Reviewed-by: alexis
Diffstat (limited to 'demos/sub-attaq/boat.h')
-rw-r--r-- | demos/sub-attaq/boat.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/demos/sub-attaq/boat.h b/demos/sub-attaq/boat.h index 0fe8ce4..0b4de1e 100644 --- a/demos/sub-attaq/boat.h +++ b/demos/sub-attaq/boat.h @@ -42,13 +42,8 @@ #ifndef __BOAT__H__ #define __BOAT__H__ -//Qt -#include <QtCore/QObject> -#include <QtGui/QKeyEvent> +#include "pixmapitem.h" -#include <QtGui/QGraphicsWidget> - -class PixmapItem; class Bomb; QT_BEGIN_NAMESPACE class QVariantAnimation; @@ -56,7 +51,7 @@ class QAbstractAnimation; class QStateMachine; QT_END_NAMESPACE -class Boat : public QGraphicsWidget +class Boat : public PixmapItem { Q_OBJECT public: @@ -66,7 +61,7 @@ public: Right }; enum { Type = UserType + 2 }; - Boat(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0); + Boat(); void destroy(); void run(); void stop(); @@ -95,7 +90,6 @@ private: QVariantAnimation *movementAnimation; QAbstractAnimation *destroyAnimation; QStateMachine *machine; - PixmapItem *pixmapItem; }; #endif //__BOAT__H__ |