X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=seascene.h;h=5fce73fa1cefbd47e68095b220a8c9427c00c679;hb=5ffd6d89882854d2d4f15107f817f4dc3a83eedb;hp=af923dbffc23d0eb00cd1e00b7f52d2e5485aea6;hpb=25eb8258fa1ce55991bc96819ba83847592a0d74;p=ghostsoverboard diff --git a/seascene.h b/seascene.h index af923db..5fce73f 100644 --- a/seascene.h +++ b/seascene.h @@ -1,8 +1,34 @@ +/************************************************************************** + Ghosts Overboard - a game for Maemo 5 + + Copyright (C) 2011 Heli Hyvättinen + + This file is part of Ghosts Overboard + + Ghosts Overboard is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +**************************************************************************/ + + #ifndef SEASCENE_H #define SEASCENE_H #include +#include #include "screenlitkeeper.h" +#include "level.h" +#include class SeaScene : public QGraphicsScene { @@ -25,7 +51,9 @@ public slots: @param rocks the number of rocks to be placed on the map @param octopuses number of octopuses to be placed on the map */ - void setupMap(int ghosts, int rocks, int octopuses); + void setupMap(int ghosts, int rocks, int octopuses, int octopusSpeed); + + void setupMap(Level level); void spreadGhosts(int ghosts); @@ -37,6 +65,22 @@ public slots: void vibrationActivate(bool); + void handleScreenTapped(); + + void about(); + + void restartLevel(); + + void nextLevel(); + + void restartGame(); + + void forcePause(); + + void softContinue(); + + + protected: /*! Gives a pointer to a random position if a free one is found. Otherwise returns NULL. @@ -45,6 +89,9 @@ protected: QPointF* findRandomFreeSlot(); + void createMenuItems(); + void prepareForMenu(QGraphicsItem * pItem); + const QString ghostImageFilename_; const QString rockImageFilename_; const QString octopusImageFilename_; @@ -61,6 +108,26 @@ protected: ScreenLitKeeper screenLitKeeper_; + int menuItemCount_; + + QGraphicsTextItem * pPausetextItem_; + + QGraphicsTextItem * pRestartLevelItem_; + QGraphicsTextItem * pRestartGameItem_; + QGraphicsTextItem * pSettingsItem_; + QGraphicsTextItem * pAboutItem_; + QGraphicsTextItem * pQuitItem_; + + QList levelList_; + + int currentLevel_; + + + QAction* pVibrateAction_; + + QAction* pPauseAction_; + + bool pauseForced_; };