summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/sub-attaq/boat_p.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-04-16 16:32:08 +0200
committerTobias Hunger <tobias.hunger@qt.io>2019-04-16 16:32:08 +0200
commit6630937e63ae5797487b86743a7733c8ae5cc42c (patch)
tree3d53dacf6430f9099e1fb20835881205de674961 /examples/widgets/animation/sub-attaq/boat_p.h
parent37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff)
parentc7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff)
Merge commit 'dev' into 'wip/cmake-merge'
Diffstat (limited to 'examples/widgets/animation/sub-attaq/boat_p.h')
-rw-r--r--examples/widgets/animation/sub-attaq/boat_p.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/examples/widgets/animation/sub-attaq/boat_p.h b/examples/widgets/animation/sub-attaq/boat_p.h
index de11ff9555..8ebfeb27f5 100644
--- a/examples/widgets/animation/sub-attaq/boat_p.h
+++ b/examples/widgets/animation/sub-attaq/boat_p.h
@@ -146,7 +146,8 @@ private:
class MoveStateRight : public QState
{
public:
- explicit MoveStateRight(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ explicit MoveStateRight(Boat *boat, QState *parent = nullptr)
+ : QState(parent), boat(boat)
{
}
protected:
@@ -163,7 +164,8 @@ private:
class MoveStateLeft : public QState
{
public:
- explicit MoveStateLeft(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ explicit MoveStateLeft(Boat *boat, QState *parent = nullptr)
+ : QState(parent), boat(boat)
{
}
protected:
@@ -180,7 +182,8 @@ private:
class StopState : public QState
{
public:
- explicit StopState(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ explicit StopState(Boat *boat, QState *parent = nullptr)
+ : QState(parent), boat(boat)
{
}
protected:
@@ -198,13 +201,14 @@ private:
class LaunchStateRight : public QState
{
public:
- explicit LaunchStateRight(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ explicit LaunchStateRight(Boat *boat, QState *parent = nullptr)
+ : QState(parent), boat(boat)
{
}
protected:
void onEntry(QEvent *) override
{
- Bomb *b = new Bomb();
+ Bomb *b = new Bomb;
b->setPos(boat->x()+boat->size().width(),boat->y());
GraphicsScene *scene = static_cast<GraphicsScene *>(boat->scene());
scene->addItem(b);
@@ -219,13 +223,14 @@ private:
class LaunchStateLeft : public QState
{
public:
- explicit LaunchStateLeft(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ explicit LaunchStateLeft(Boat *boat, QState *parent = nullptr)
+ : QState(parent), boat(boat)
{
}
protected:
void onEntry(QEvent *) override
{
- Bomb *b = new Bomb();
+ Bomb *b = new Bomb;
b->setPos(boat->x() - b->size().width(), boat->y());
GraphicsScene *scene = static_cast<GraphicsScene *>(boat->scene());
scene->addItem(b);