summaryrefslogtreecommitdiffstats
path: root/examples/animation/sub-attaq
diff options
context:
space:
mode:
Diffstat (limited to 'examples/animation/sub-attaq')
-rw-r--r--examples/animation/sub-attaq/boat.h3
-rw-r--r--examples/animation/sub-attaq/bomb.h3
-rw-r--r--examples/animation/sub-attaq/graphicsscene.cpp2
-rw-r--r--examples/animation/sub-attaq/graphicsscene.h2
-rw-r--r--examples/animation/sub-attaq/mainwindow.cpp9
-rw-r--r--examples/animation/sub-attaq/qanimationstate.h2
-rw-r--r--examples/animation/sub-attaq/subattaq.qrc1
-rw-r--r--examples/animation/sub-attaq/submarine.h2
-rw-r--r--examples/animation/sub-attaq/torpedo.h3
9 files changed, 14 insertions, 13 deletions
diff --git a/examples/animation/sub-attaq/boat.h b/examples/animation/sub-attaq/boat.h
index 08a9fa2..b412739 100644
--- a/examples/animation/sub-attaq/boat.h
+++ b/examples/animation/sub-attaq/boat.h
@@ -59,7 +59,6 @@ QT_END_NAMESPACE
class Boat : public QGraphicsWidget
{
Q_OBJECT
-Q_PROPERTY(QPointF pos READ pos WRITE setPos)
public:
enum Movement {
None = 0,
@@ -85,7 +84,7 @@ public:
virtual int type() const;
-Q_SIGNALS:
+signals:
void boatDestroyed();
void boatExecutionFinished();
diff --git a/examples/animation/sub-attaq/bomb.h b/examples/animation/sub-attaq/bomb.h
index 226d056..cfd42e5 100644
--- a/examples/animation/sub-attaq/bomb.h
+++ b/examples/animation/sub-attaq/bomb.h
@@ -51,7 +51,6 @@ class PixmapItem;
class Bomb : public QGraphicsWidget
{
Q_OBJECT
-Q_PROPERTY(QPointF pos READ pos WRITE setPos)
public:
enum Direction {
Left = 0,
@@ -61,7 +60,7 @@ public:
void launch(Direction direction);
void destroy();
-Q_SIGNALS:
+signals:
void bombExplosed();
void bombExecutionFinished();
diff --git a/examples/animation/sub-attaq/graphicsscene.cpp b/examples/animation/sub-attaq/graphicsscene.cpp
index f2d41bc..e773dae 100644
--- a/examples/animation/sub-attaq/graphicsscene.cpp
+++ b/examples/animation/sub-attaq/graphicsscene.cpp
@@ -120,7 +120,7 @@ GraphicsScene::GraphicsScene(int x, int y, int width, int height, Mode mode)
//parse the xml that contain all data of the game
QXmlStreamReader reader;
- QFile file(QDir::currentPath() + "/data.xml");
+ QFile file(":data.xml");
file.open(QIODevice::ReadOnly);
reader.setDevice(&file);
LevelDescription currentLevel;
diff --git a/examples/animation/sub-attaq/graphicsscene.h b/examples/animation/sub-attaq/graphicsscene.h
index 8b0ea96..1e6618a 100644
--- a/examples/animation/sub-attaq/graphicsscene.h
+++ b/examples/animation/sub-attaq/graphicsscene.h
@@ -90,7 +90,7 @@ public:
void clearScene();
QGraphicsPixmapItem *addWelcomeItem(const QPixmap &pm);
-Q_SIGNALS:
+signals:
void subMarineDestroyed(int);
void allSubMarineDestroyed(int);
diff --git a/examples/animation/sub-attaq/mainwindow.cpp b/examples/animation/sub-attaq/mainwindow.cpp
index a166241..5e8e259 100644
--- a/examples/animation/sub-attaq/mainwindow.cpp
+++ b/examples/animation/sub-attaq/mainwindow.cpp
@@ -43,11 +43,14 @@
#include "mainwindow.h"
#include "graphicsscene.h"
-#ifndef QT_NO_OPENGL
+//Qt
+#ifdef QT_NO_OPENGL
+ #include <QtGui/QMenuBar>
+ #include <QtGui/QLayout>
+ #include <QtGui/QApplication>
+#else
#include <QtOpenGL/QtOpenGL>
#endif
-//Qt
-#include <QtGui/QGraphicsView>
MainWindow::MainWindow() : QMainWindow(0)
{
diff --git a/examples/animation/sub-attaq/qanimationstate.h b/examples/animation/sub-attaq/qanimationstate.h
index e5322ad..72bb2d9 100644
--- a/examples/animation/sub-attaq/qanimationstate.h
+++ b/examples/animation/sub-attaq/qanimationstate.h
@@ -70,7 +70,7 @@ public:
void setAnimation(QAbstractAnimation *animation);
QAbstractAnimation* animation() const;
-Q_SIGNALS:
+signals:
void animationFinished();
protected:
diff --git a/examples/animation/sub-attaq/subattaq.qrc b/examples/animation/sub-attaq/subattaq.qrc
index c76f8ef..80a3af1 100644
--- a/examples/animation/sub-attaq/subattaq.qrc
+++ b/examples/animation/sub-attaq/subattaq.qrc
@@ -34,5 +34,6 @@
<file alias="big/explosion/submarine/step2" >pics/big/explosion/submarine/step2.png</file>
<file alias="big/explosion/submarine/step3" >pics/big/explosion/submarine/step3.png</file>
<file alias="big/explosion/submarine/step4" >pics/big/explosion/submarine/step4.png</file>
+ <file>data.xml</file>
</qresource>
</RCC>
diff --git a/examples/animation/sub-attaq/submarine.h b/examples/animation/sub-attaq/submarine.h
index 4001603..b8dd2da 100644
--- a/examples/animation/sub-attaq/submarine.h
+++ b/examples/animation/sub-attaq/submarine.h
@@ -75,7 +75,7 @@ public:
virtual int type() const;
-Q_SIGNALS:
+signals:
void subMarineDestroyed();
void subMarineExecutionFinished();
void subMarineStateChanged();
diff --git a/examples/animation/sub-attaq/torpedo.h b/examples/animation/sub-attaq/torpedo.h
index 4a0f457..f5ab614 100644
--- a/examples/animation/sub-attaq/torpedo.h
+++ b/examples/animation/sub-attaq/torpedo.h
@@ -53,14 +53,13 @@ class PixmapItem;
class Torpedo : public QGraphicsWidget
{
Q_OBJECT
-Q_PROPERTY(QPointF pos READ pos WRITE setPos)
public:
Torpedo(QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0);
void launch();
void setCurrentSpeed(int speed);
void destroy();
-Q_SIGNALS:
+signals:
void torpedoExplosed();
void torpedoExecutionFinished();