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