4 #include <QGraphicsScene>
5 #include "screenlitkeeper.h"
8 class SeaScene : public QGraphicsScene
12 explicit SeaScene(QObject *parent = 0);
16 void allGhostsPicked();
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, int octopusSpeed);
30 void setupMap(Level level);
32 void spreadGhosts(int ghosts);
34 void removeGhost(QGraphicsItem * pGhost);
36 void ghostsDropped(int ghosts);
38 void pause (bool paused);
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_;