Moved menu actions to SeaScene from MainWindow
[ghostsoverboard] / seascene.h
index 6d932ab..08e6a4e 100644 (file)
 #define SEASCENE_H
 
 #include <QGraphicsScene>
+#include<QGraphicsItemGroup>
 #include "screenlitkeeper.h"
 #include "level.h"
+#include <QAction>
 
 class SeaScene : public QGraphicsScene
 {
@@ -63,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.
@@ -71,6 +89,9 @@ protected:
 
     QPointF* findRandomFreeSlot();
 
+    void createMenuItems();
+    void prepareForMenu(QGraphicsItem * pItem);
+
     const QString ghostImageFilename_;
     const QString rockImageFilename_;
     const QString octopusImageFilename_;
@@ -87,6 +108,25 @@ protected:
     ScreenLitKeeper screenLitKeeper_;
 
 
+    int menuItemCount_;
+
+    QGraphicsSimpleTextItem * pPausetextItem_;
+
+    QGraphicsSimpleTextItem * pRestartLevelItem_;
+    QGraphicsSimpleTextItem * pRestartGameItem_;
+    QGraphicsSimpleTextItem * pSettingsItem_;
+    QGraphicsSimpleTextItem * pAboutItem_;
+
+    QList<Level> levelList_;
+
+    int currentLevel_;
+
+
+    QAction* pVibrateAction_;
+
+    QAction* pPauseAction_;
+
+    bool pauseForced_;
 
 
 };