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