Tried to add minimize to menu CRASHES
[ghostsoverboard] / seascene.h
index 6d932ab..e16af19 100644 (file)
 #define SEASCENE_H
 
 #include <QGraphicsScene>
+#include<QGraphicsItemGroup>
 #include "screenlitkeeper.h"
 #include "level.h"
+#include <QAction>
 
 class SeaScene : public QGraphicsScene
 {
@@ -40,6 +42,7 @@ signals:
     void pauseOn();
     void pauseOff();
     void vibrationActivated(bool on);
+    void minimizeRequested();
 
 public slots:
 
@@ -63,6 +66,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.
@@ -71,6 +90,9 @@ protected:
 
     QPointF* findRandomFreeSlot();
 
+    void createMenuItems();
+    void prepareForMenu(QGraphicsItem * pItem);
+
     const QString ghostImageFilename_;
     const QString rockImageFilename_;
     const QString octopusImageFilename_;
@@ -87,6 +109,27 @@ protected:
     ScreenLitKeeper screenLitKeeper_;
 
 
+    int menuItemCount_;
+
+    QGraphicsTextItem * pPausetextItem_;
+
+    QGraphicsTextItem * pRestartLevelItem_;
+    QGraphicsTextItem * pRestartGameItem_;
+    QGraphicsTextItem * pSettingsItem_;
+    QGraphicsTextItem * pAboutItem_;
+    QGraphicsTextItem * pQuitItem_;
+    QGraphicsTextItem * pMinimizeItem_;
+
+    QList<Level> levelList_;
+
+    int currentLevel_;
+
+
+    QAction* pVibrateAction_;
+
+    QAction* pPauseAction_;
+
+    bool pauseForced_;
 
 
 };