X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=seascene.h;h=46739956848366e735edaf817624f3637f279ff5;hb=fc59090da28a9adeb50ddefc25aac843c4dfff99;hp=9fb07342c54b1a05f0d9b6a9a46272417282120e;hpb=1613bf0f9fb8f7422dc6f92bbe43ce318d6bd9e1;p=ghostsoverboard
diff --git a/seascene.h b/seascene.h
index 9fb0734..4673995 100644
--- a/seascene.h
+++ b/seascene.h
@@ -1,9 +1,35 @@
+/**************************************************************************
+ 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
+#include
class SeaScene : public QGraphicsScene
{
@@ -17,6 +43,8 @@ signals:
void pauseOn();
void pauseOff();
void vibrationActivated(bool on);
+ void minimizeRequested();
+ void fullscreenRequested();
public slots:
@@ -40,6 +68,28 @@ public slots:
void vibrationActivate(bool);
+ void handleScreenTapped();
+
+ void about();
+
+ void restartLevel();
+
+ void nextLevel();
+
+ void restartGame();
+
+ void forcePause();
+
+ void softContinue();
+
+ void createAboutBoxItems();
+
+ void createVictoryItems();
+
+ void setItemPointersNull();
+
+
+
protected:
/*! Gives a pointer to a random position if a free one is found. Otherwise returns NULL.
@@ -48,6 +98,9 @@ protected:
QPointF* findRandomFreeSlot();
+ void createMenuItems();
+ void prepareForMenu(QGraphicsItem * pItem);
+
const QString ghostImageFilename_;
const QString rockImageFilename_;
const QString octopusImageFilename_;
@@ -64,7 +117,32 @@ protected:
ScreenLitKeeper screenLitKeeper_;
+ int menuItemCount_;
+
+ QGraphicsTextItem * pPausetextItem_;
+
+ QGraphicsTextItem * pRestartLevelItem_;
+ QGraphicsTextItem * pRestartGameItem_;
+ QGraphicsTextItem * pSettingsItem_;
+ QGraphicsTextItem * pAboutItem_;
+ QGraphicsTextItem * pQuitItem_;
+ QGraphicsTextItem * pMinimizeItem_;
+
+ QGraphicsTextItem * pVictoryCongratulationsItem_;
+ QGraphicsTextItem * pAboutBoxItem_;
+
+ QList levelList_;
+
+ int currentLevel_;
+
+
+ QAction* pVibrateAction_;
+
+ QAction* pPauseAction_;
+
+ bool pauseForced_;
+ QTimer autopauseTimer;
};