4 #include <QGraphicsScene>
6 class SeaScene : public QGraphicsScene
10 explicit SeaScene(QObject *parent = 0);
14 void allGhostsPicked();
20 /*! Places all needed items for a level to (re)start.
21 Relies on the scene size to be explicitly set to a a value that will persist troughout play.
22 @param ghosts the number of ghosts to be placed on the map
23 @param rocks the number of rocks to be placed on the map
24 @param octopuses number of octopuses to be placed on the map
26 void setupMap(int ghosts, int rocks, int octopuses);
28 void spreadGhosts(int ghosts);
30 void removeGhost(QGraphicsItem * pGhost);
32 void ghostsDropped(int ghosts);
34 void pause (bool paused);
38 /*! Gives a pointer to a random position if a free one is found. Otherwise returns NULL.
39 The position is the upper left corner of a free 40x40 pixels slot.
42 QPointF* findRandomFreeSlot();
44 const QString ghostImageFilename_;
45 const QString rockImageFilename_;
46 const QString octopusImageFilename_;
47 const QStringList shipImageFilenames_;
49 QList<QPointF> freeTiles_;
53 QList<QGraphicsItem*> movingItems_;