X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=seascene.h;h=46739956848366e735edaf817624f3637f279ff5;hb=fc59090da28a9adeb50ddefc25aac843c4dfff99;hp=db65f17e5b1053dc2eaef57bf39de2dc50d4a353;hpb=5256583a62f6d7a752334f5987e7ee9f570b6c81;p=ghostsoverboard
diff --git a/seascene.h b/seascene.h
index db65f17..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
{
@@ -16,6 +42,9 @@ signals:
void allGhostsPicked();
void pauseOn();
void pauseOff();
+ void vibrationActivated(bool on);
+ void minimizeRequested();
+ void fullscreenRequested();
public slots:
@@ -37,6 +66,30 @@ public slots:
void pause (bool paused);
+ 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.
@@ -45,6 +98,9 @@ protected:
QPointF* findRandomFreeSlot();
+ void createMenuItems();
+ void prepareForMenu(QGraphicsItem * pItem);
+
const QString ghostImageFilename_;
const QString rockImageFilename_;
const QString octopusImageFilename_;
@@ -61,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;
};