4 #include <QGraphicsScene>
5 #include "screenlitkeeper.h"
7 class SeaScene : public QGraphicsScene
11 explicit SeaScene(QObject *parent = 0);
15 void allGhostsPicked();
18 void vibrationActivated(bool on);
22 /*! Places all needed items for a level to (re)start.
23 Relies on the scene size to be explicitly set to a a value that will persist troughout play.
24 @param ghosts the number of ghosts to be placed on the map
25 @param rocks the number of rocks to be placed on the map
26 @param octopuses number of octopuses to be placed on the map
28 void setupMap(int ghosts, int rocks, int octopuses);
30 void spreadGhosts(int ghosts);
32 void removeGhost(QGraphicsItem * pGhost);
34 void ghostsDropped(int ghosts);
36 void pause (bool paused);
38 void vibrationActivate(bool);
42 /*! Gives a pointer to a random position if a free one is found. Otherwise returns NULL.
43 The position is the upper left corner of a free 40x40 pixels slot.
46 QPointF* findRandomFreeSlot();
48 const QString ghostImageFilename_;
49 const QString rockImageFilename_;
50 const QString octopusImageFilename_;
51 const QStringList shipImageFilenames_;
53 QList<QPointF> freeTiles_;
57 QList<QGraphicsItem*> movingItems_;
61 ScreenLitKeeper screenLitKeeper_;