summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/sub-attaq/boat_p.h
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-09-04 14:33:40 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-04 14:33:40 +0200
commitf255b1e8e297e7e1363921580007145cff574e0d (patch)
tree9a799be282e6c0d6544d9f8c872073f83e6c0475 /examples/widgets/animation/sub-attaq/boat_p.h
parent7e8705f6632428a8d9a937ab5fe087999347b3dd (diff)
parentbf8fcab8bb92ff534c5cec048d6dbebb3b73a348 (diff)
Merge remote-tracking branch 'origin/dev' into wip/qt6
Diffstat (limited to 'examples/widgets/animation/sub-attaq/boat_p.h')
-rw-r--r--examples/widgets/animation/sub-attaq/boat_p.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/examples/widgets/animation/sub-attaq/boat_p.h b/examples/widgets/animation/sub-attaq/boat_p.h
index 8ebfeb27f5..bb1a783392 100644
--- a/examples/widgets/animation/sub-attaq/boat_p.h
+++ b/examples/widgets/animation/sub-attaq/boat_p.h
@@ -67,7 +67,9 @@
#include "graphicsscene.h"
// Qt
-#include <QtWidgets/QKeyEventTransition>
+#include <QGraphicsRotation>
+#include <QKeyEventTransition>
+#include <QState>
static const int MAX_BOMB = 5;
@@ -88,7 +90,7 @@ protected:
return (boat->currentSpeed() == 1);
}
private:
- Boat * boat;
+ Boat *boat;
};
//These transtion test if we have to move the boat (i.e current speed was 0 or another value)
@@ -118,7 +120,7 @@ protected:
boat->updateBoatMovement();
}
private:
- Boat * boat;
+ Boat *boat;
int key;
};
@@ -139,7 +141,7 @@ protected:
return (boat->bombsLaunched() < MAX_BOMB);
}
private:
- Boat * boat;
+ Boat *boat;
};
//This state is describing when the boat is moving right
@@ -157,7 +159,7 @@ protected:
boat->updateBoatMovement();
}
private:
- Boat * boat;
+ Boat *boat;
};
//This state is describing when the boat is moving left
@@ -175,7 +177,7 @@ protected:
boat->updateBoatMovement();
}
private:
- Boat * boat;
+ Boat *boat;
};
//This state is describing when the boat is in a stand by position
@@ -194,7 +196,7 @@ protected:
boat->updateBoatMovement();
}
private:
- Boat * boat;
+ Boat *boat;
};
//This state is describing the launch of the torpedo on the right
@@ -216,7 +218,7 @@ protected:
boat->setBombsLaunched(boat->bombsLaunched() + 1);
}
private:
- Boat * boat;
+ Boat *boat;
};
//This state is describing the launch of the torpedo on the left
@@ -238,7 +240,7 @@ protected:
boat->setBombsLaunched(boat->bombsLaunched() + 1);
}
private:
- Boat * boat;
+ Boat *boat;
};
#endif // BOAT_P_H