Moved menu actions to SeaScene from MainWindow
[ghostsoverboard] / seascene.h
index c9d9a54..08e6a4e 100644 (file)
@@ -28,6 +28,7 @@
 #include<QGraphicsItemGroup>
 #include "screenlitkeeper.h"
 #include "level.h"
+#include <QAction>
 
 class SeaScene : public QGraphicsScene
 {
@@ -64,11 +65,21 @@ public slots:
 
     void vibrationActivate(bool);
 
-    void menuClicked();
+    void handleScreenTapped();
+
+    void about();
+
+    void restartLevel();
+
+    void nextLevel();
+
+    void restartGame();
+
+    void forcePause();
+
+    void softContinue();
 
-    void showMenu();
 
-    void hideMenu();
 
 protected:
 
@@ -79,6 +90,7 @@ protected:
     QPointF* findRandomFreeSlot();
 
     void createMenuItems();
+    void prepareForMenu(QGraphicsItem * pItem);
 
     const QString ghostImageFilename_;
     const QString rockImageFilename_;
@@ -96,15 +108,26 @@ protected:
     ScreenLitKeeper screenLitKeeper_;
 
 
-    QGraphicsItemGroup menuItems_;
+    int menuItemCount_;
 
     QGraphicsSimpleTextItem * pPausetextItem_;
 
     QGraphicsSimpleTextItem * pRestartLevelItem_;
     QGraphicsSimpleTextItem * pRestartGameItem_;
-    QGraphicsSimpleTextItem * pVibrateItem_;
+    QGraphicsSimpleTextItem * pSettingsItem_;
     QGraphicsSimpleTextItem * pAboutItem_;
 
+    QList<Level> levelList_;
+
+    int currentLevel_;
+
+
+    QAction* pVibrateAction_;
+
+    QAction* pPauseAction_;
+
+    bool pauseForced_;
+
 
 };