summaryrefslogtreecommitdiffstats
path: root/demos/sub-attaq/torpedo.h
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-10-05 09:49:54 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-10-05 09:51:38 (GMT)
commit32a9237c49fd126bee0cbe02c3c5bff5145a6e21 (patch)
tree6fc313f62e0eafeda35483c9f3630f4275a472ec /demos/sub-attaq/torpedo.h
parent429c7c6760c100685e9800b89fca7f0afd2d8abc (diff)
downloadQt-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/torpedo.h')
-rw-r--r--demos/sub-attaq/torpedo.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/demos/sub-attaq/torpedo.h b/demos/sub-attaq/torpedo.h
index 2e654f4..03f277d 100644
--- a/demos/sub-attaq/torpedo.h
+++ b/demos/sub-attaq/torpedo.h
@@ -42,25 +42,19 @@
#ifndef __TORPEDO__H__
#define __TORPEDO__H__
-//Qt
-#include <QtCore/QObject>
+#include "pixmapitem.h"
-#include <QtCore/QVariantAnimation>
-#include <QtGui/QGraphicsWidget>
-
-class PixmapItem;
-
-class Torpedo : public QGraphicsWidget
+class Torpedo : public PixmapItem
{
Q_OBJECT
public:
- Torpedo(QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0);
+ Torpedo();
void launch();
void setCurrentSpeed(int speed);
void destroy();
signals:
- void torpedoExplosed();
+ void torpedoExploded();
void torpedoExecutionFinished();
private slots:
@@ -68,8 +62,6 @@ private slots:
private:
int currentSpeed;
- PixmapItem *pixmapItem;
- QVariantAnimation *launchAnimation;
};
#endif //__TORPEDO__H__