work towards new pause and menu systems
authorHeli Hyvättinen <heli.hyvattinen@kymp.net>
Sat, 16 Jul 2011 16:06:38 +0000 (19:06 +0300)
committerHeli Hyvättinen <heli.hyvattinen@kymp.net>
Sat, 16 Jul 2011 16:06:38 +0000 (19:06 +0300)
14 files changed:
Ghost Ship UML.xmi
ghostsoverboard.pro
mainwindow.cpp
mainwindow.h
qtc_packaging/debian_harmattan/README [new file with mode: 0644]
qtc_packaging/debian_harmattan/changelog [new file with mode: 0644]
qtc_packaging/debian_harmattan/compat [new file with mode: 0644]
qtc_packaging/debian_harmattan/control [new file with mode: 0644]
qtc_packaging/debian_harmattan/copyright [new file with mode: 0644]
qtc_packaging/debian_harmattan/rules [new file with mode: 0755]
seascene.cpp
seascene.h
seaview.cpp
seaview.h

index 5c76402..4e86a05 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMI verified="false" xmi.version="1.2" timestamp="2011-06-23T13:58:18" xmlns:UML="http://schema.omg.org/spec/UML/1.3">
+<XMI verified="false" xmi.version="1.2" timestamp="2011-07-15T23:27:47" xmlns:UML="http://schema.omg.org/spec/UML/1.3">
  <XMI.header>
   <XMI.documentation>
    <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
       </UML:Association>
       <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="CO1nT6P316Mi" name="QList"/>
       <UML:Dependency visibility="public" isSpecification="false" namespace="Logical View" supplier="eureV0DOTzZj" xmi.id="XV3lDwSNJR9m" client="AbKKOgodDVuj" name=""/>
+      <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AfOZ8fowgF0x" name="menuGraphicsPixmapItem">
+       <UML:GeneralizableElement.generalization>
+        <UML:Generalization xmi.idref="uSbqd8Qr4Ovl"/>
+       </UML:GeneralizableElement.generalization>
+      </UML:Class>
+      <UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="nTjiZxb4BwCZ" name="">
+       <UML:Association.connection>
+        <UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="false" isSpecification="false" xmi.id="cEvy6hAEMWoU" type="AfOZ8fowgF0x" name="" aggregation="none"/>
+        <UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="BcQppPlcqUKQ" type="5lTu70iDvlJn" name="" aggregation="none"/>
+       </UML:Association.connection>
+      </UML:Association>
+      <UML:Generalization discriminator="" visibility="public" isSpecification="false" namespace="Logical View" child="AfOZ8fowgF0x" xmi.id="uSbqd8Qr4Ovl" parent="5lTu70iDvlJn" name=""/>
+      <UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="QmMBJWGMTnZz" name="">
+       <UML:Association.connection>
+        <UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="kcL5NGEdVnFe" type="AfOZ8fowgF0x" name="" aggregation="none"/>
+        <UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="mVbNryoFi9O1" type="Tbq52XmJtNFL" name="" aggregation="none"/>
+       </UML:Association.connection>
+      </UML:Association>
+      <UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="fcM6Pv37VPCt" name="ghosts and rocks">
+       <UML:Association.connection>
+        <UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="fOU89kkuDJH2" type="5lTu70iDvlJn" name="" aggregation="none"/>
+        <UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="F3HyCfxpHJue" type="Tbq52XmJtNFL" name="" aggregation="none"/>
+       </UML:Association.connection>
+      </UML:Association>
      </UML:Namespace.ownedElement>
      <XMI.extension xmi.extender="umbrello">
       <diagrams>
-       <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="1" showstereotype="1" name="luokkakaavio" font="Ubuntu,9,-1,5,50,0,0,0,0,0" canvasheight="859" canvaswidth="1750" localid="-1" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffff00" zoom="100" xmi.id="p6gcOt8u0cHb" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
+       <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="1" showstereotype="1" name="luokkakaavio" font="Ubuntu,9,-1,5,50,0,0,0,0,0" canvasheight="876" canvaswidth="1747" localid="-1" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffff00" zoom="100" xmi.id="p6gcOt8u0cHb" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
         <widgets>
          <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="410" showattsigs="601" showstereotype="1" y="395" showattributes="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" width="340" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="cmJcFyooDBTl" showscope="1" height="248" showopsigs="601"/>
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="1" x="151" showattsigs="601" showstereotype="1" y="68" showattributes="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" width="97" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="JtWWJpEA6bpd" showscope="1" height="55" showopsigs="601"/>
          <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="1" x="1576" showattsigs="601" showstereotype="1" y="418" showattributes="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" width="100" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="XzOcNaMph9yB" showscope="1" height="120" showopsigs="601"/>
          <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="806" showattsigs="601" showstereotype="1" y="577" showattributes="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" width="267" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="HoOKzsbjGV56" showscope="1" height="95" showopsigs="601"/>
          <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="82" showattsigs="601" showstereotype="1" y="686" showattributes="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" width="203" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="MVTSCQB83hIP" showscope="1" height="91" showopsigs="601"/>
-         <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="1" x="995" showattsigs="601" showstereotype="1" y="34" showattributes="1" font="Ubuntu,9,-1,5,75,0,0,0,0,0" width="242" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="eureV0DOTzZj" showscope="1" height="105" showopsigs="601"/>
+         <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="1" x="995" showattsigs="601" showstereotype="1" y="34" showattributes="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" width="242" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="eureV0DOTzZj" showscope="1" height="105" showopsigs="601"/>
+         <classwidget linecolor="none" usesdiagramfillcolor="1" linewidth="none" showoperations="1" usesdiagramusefillcolor="1" showpubliconly="1" showpackage="1" x="548" showattsigs="601" showstereotype="1" y="83" showattributes="1" font="Ubuntu,9,-1,5,75,0,0,0,0,0" width="176" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="AfOZ8fowgF0x" showscope="1" height="97" showopsigs="601"/>
         </widgets>
         <messages/>
         <associations>
            <endpoint endx="248" endy="123"/>
           </linepath>
          </assocwidget>
-         <assocwidget indexa="2" indexb="1" widgetaid="Tbq52XmJtNFL" linecolor="none" totalcounta="5" xmi.id="RL5P5aqtVkRF" widgetbid="pvwYlKFsbFLP" totalcountb="2" type="500" linewidth="none">
+         <assocwidget indexa="3" indexb="1" widgetaid="Tbq52XmJtNFL" linecolor="none" totalcounta="6" xmi.id="RL5P5aqtVkRF" widgetbid="pvwYlKFsbFLP" totalcountb="2" type="500" linewidth="none">
           <linepath>
            <startpoint startx="1318" starty="589"/>
            <endpoint endx="1318" endy="519"/>
            <endpoint endx="949" endy="247"/>
           </linepath>
          </assocwidget>
-         <assocwidget indexa="1" indexb="1" widgetaid="AbKKOgodDVuj" linecolor="none" totalcounta="2" xmi.id="WcwY43n3LIYt" widgetbid="Tbq52XmJtNFL" totalcountb="5" type="503" linewidth="none">
+         <assocwidget indexa="1" indexb="2" widgetaid="AbKKOgodDVuj" linecolor="none" totalcounta="2" xmi.id="WcwY43n3LIYt" widgetbid="Tbq52XmJtNFL" totalcountb="6" type="503" linewidth="none">
           <linepath>
            <startpoint startx="1172" starty="423"/>
            <endpoint endx="1226" endy="589"/>
           </linepath>
          </assocwidget>
-         <assocwidget indexa="3" indexb="1" widgetaid="5lTu70iDvlJn" linecolor="none" totalcounta="4" xmi.id="2hsLPE26ZzKy" widgetbid="Tbq52XmJtNFL" totalcountb="4" type="500" linewidth="none">
-          <linepath>
-           <startpoint startx="469" starty="209"/>
-           <endpoint endx="1226" endy="589"/>
-           <point x="807" y="377"/>
-          </linepath>
-          <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="638" showstereotype="1" y="293" text="ghosts and rocks" font="Ubuntu,9,-1,5,50,0,0,0,0,0" pretext="" role="703" width="99" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="x1dHJCv2nluX" height="18"/>
-          <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="445" showstereotype="1" y="215" text="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" pretext="" role="701" width="15" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="kppCbLMBInfJ" height="18"/>
-          <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="1219" showstereotype="1" y="551" text="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" pretext="" role="702" width="15" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="fQTeR0hMzIbJ" height="18"/>
-         </assocwidget>
          <assocwidget indexa="1" indexb="1" widgetaid="AbKKOgodDVuj" linecolor="none" totalcounta="3" xmi.id="nRcOFJO68hTA" widgetbid="I7cafWFM6qXf" totalcountb="2" type="512" linewidth="none">
           <linepath>
            <startpoint startx="1172" starty="290"/>
            <endpoint endx="1576" endy="423"/>
           </linepath>
          </assocwidget>
-         <assocwidget indexa="4" indexb="2" widgetaid="Tbq52XmJtNFL" linecolor="none" totalcounta="5" xmi.id="nmsp4aYykheY" widgetbid="XzOcNaMph9yB" totalcountb="3" type="503" linewidth="none">
+         <assocwidget indexa="5" indexb="2" widgetaid="Tbq52XmJtNFL" linecolor="none" totalcounta="6" xmi.id="nmsp4aYykheY" widgetbid="XzOcNaMph9yB" totalcountb="3" type="503" linewidth="none">
           <linepath>
            <startpoint startx="1499" starty="589"/>
            <endpoint endx="1576" endy="538"/>
            <endpoint endx="806" endy="658"/>
            <point x="570" y="658"/>
           </linepath>
-          <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="688" showstereotype="1" y="658" text="Signal-slot association" font="Ubuntu,9,-1,5,50,0,0,0,0,0" pretext="" role="703" width="127" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="SWJEFDlx2b9b" height="18"/>
-          <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="269" showstereotype="1" y="652" text="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" pretext="" role="701" width="15" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="uVmBIPUvpxXE" height="18"/>
-          <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="780" showstereotype="1" y="637" text="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" pretext="" role="702" width="15" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="vCatUBAvfT9u" height="18"/>
+          <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="688" showstereotype="1" y="658" text="Signal-slot association" font="Ubuntu,9,-1,5,50,0,0,0,0,0" pretext="" role="703" width="127" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="v1jqPpGtBRVJ" height="18"/>
+          <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="269" showstereotype="1" y="652" text="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" pretext="" role="701" width="15" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="Eo1T4HYVmx8G" height="18"/>
+          <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="780" showstereotype="1" y="637" text="1" font="Ubuntu,9,-1,5,50,0,0,0,0,0" pretext="" role="702" width="15" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="tVGM8Ng3ONun" height="18"/>
          </assocwidget>
          <assocwidget indexa="2" indexb="3" widgetaid="MVTSCQB83hIP" linecolor="none" totalcounta="3" xmi.id="sHG785Kj5yAa" widgetbid="Tbq52XmJtNFL" totalcountb="4" type="503" linewidth="none">
           <linepath>
            <endpoint endx="1226" endy="686"/>
           </linepath>
          </assocwidget>
-         <assocwidget indexa="3" indexb="2" widgetaid="Tbq52XmJtNFL" linecolor="none" totalcounta="5" xmi.id="Kw4q4bR2FO5B" widgetbid="eureV0DOTzZj" totalcountb="3" type="503" linewidth="none">
+         <assocwidget indexa="4" indexb="1" widgetaid="Tbq52XmJtNFL" linecolor="none" totalcounta="6" xmi.id="Kw4q4bR2FO5B" widgetbid="eureV0DOTzZj" totalcountb="3" type="503" linewidth="none">
           <linepath>
            <startpoint startx="1226" starty="589"/>
            <endpoint endx="1226" endy="139"/>
           </linepath>
          </assocwidget>
-         <assocwidget indexa="1" indexb="2" widgetaid="eureV0DOTzZj" linecolor="none" totalcounta="3" xmi.id="ro74BDGnkFsn" widgetbid="AbKKOgodDVuj" totalcountb="3" type="503" linewidth="none">
+         <assocwidget indexa="2" indexb="2" widgetaid="eureV0DOTzZj" linecolor="none" totalcounta="3" xmi.id="ro74BDGnkFsn" widgetbid="AbKKOgodDVuj" totalcountb="3" type="503" linewidth="none">
           <linepath>
            <startpoint startx="1170" starty="139"/>
            <endpoint endx="1170" endy="290"/>
           </linepath>
          </assocwidget>
+         <assocwidget indexa="1" indexb="1" widgetaid="AfOZ8fowgF0x" linecolor="none" totalcounta="2" xmi.id="uSbqd8Qr4Ovl" widgetbid="5lTu70iDvlJn" totalcountb="2" type="500" linewidth="none">
+          <linepath>
+           <startpoint startx="548" starty="155"/>
+           <endpoint endx="469" endy="155"/>
+          </linepath>
+         </assocwidget>
+         <assocwidget indexa="1" indexb="1" widgetaid="AfOZ8fowgF0x" linecolor="none" totalcounta="2" xmi.id="QmMBJWGMTnZz" widgetbid="Tbq52XmJtNFL" totalcountb="6" type="503" linewidth="none">
+          <linepath>
+           <startpoint startx="724" starty="180"/>
+           <endpoint endx="1226" endy="589"/>
+          </linepath>
+         </assocwidget>
+         <assocwidget indexa="3" indexb="1" widgetaid="5lTu70iDvlJn" linecolor="none" totalcounta="4" xmi.id="fcM6Pv37VPCt" widgetbid="Tbq52XmJtNFL" totalcountb="4" type="503" linewidth="none">
+          <linepath>
+           <startpoint startx="469" starty="209"/>
+           <endpoint endx="1226" endy="589"/>
+           <point x="815" y="383"/>
+          </linepath>
+          <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="642" showstereotype="1" y="296" text="ghosts and rocks" font="Ubuntu,9,-1,5,50,0,0,0,0,0" pretext="" role="703" width="99" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="qpO38d5OeMKr" height="18"/>
+         </assocwidget>
         </associations>
        </diagram>
       </diagrams>
   </UML:Model>
  </XMI.content>
  <XMI.extensions xmi.extender="umbrello">
-  <docsettings viewid="p6gcOt8u0cHb" uniqueid="Rx0q80ugTxPg" documentation=""/>
+  <docsettings viewid="p6gcOt8u0cHb" uniqueid="qpO38d5OeMKr" documentation=""/>
   <listview>
    <listitem open="1" type="800" id="Views">
     <listitem open="1" type="801" id="Logical View">
       <listitem open="0" type="815" id="V51mov12wdwr"/>
       <listitem open="0" type="815" id="r5VanFidNggU"/>
      </listitem>
-     <listitem open="1" type="830" id="Datatypes">
+     <listitem open="1" type="813" id="AfOZ8fowgF0x"/>
+     <listitem open="0" type="830" id="Datatypes">
       <listitem open="1" type="829" id="isqrsOo7RB24"/>
       <listitem open="1" type="829" id="LEHanyUaSN4M"/>
       <listitem open="1" type="829" id="g190gw4KZRDf"/>
index 48bef5e..30a176f 100644 (file)
@@ -19,7 +19,8 @@ SOURCES += main.cpp\
     screenlitkeeper.cpp \
     timercontrolledgraphicspixmapobject.cpp \
     octopus.cpp \
-    level.cpp
+    level.cpp \
+    seaview.cpp
 
 HEADERS  += mainwindow.h \
     orientationcontrolledgraphicspixmapobject.h \
@@ -28,7 +29,8 @@ HEADERS  += mainwindow.h \
     screenlitkeeper.h \
     timercontrolledgraphicspixmapobject.h \
     octopus.h \
-    level.h
+    level.h \
+    seaview.h
 
 CONFIG += mobility
 MOBILITY = sensors
@@ -73,4 +75,10 @@ OTHER_FILES += \
     qtc_packaging/debian_fremantle/copyright \
     qtc_packaging/debian_fremantle/control \
     qtc_packaging/debian_fremantle/compat \
-    qtc_packaging/debian_fremantle/changelog
+    qtc_packaging/debian_fremantle/changelog \
+    qtc_packaging/debian_harmattan/rules \
+    qtc_packaging/debian_harmattan/README \
+    qtc_packaging/debian_harmattan/copyright \
+    qtc_packaging/debian_harmattan/control \
+    qtc_packaging/debian_harmattan/compat \
+    qtc_packaging/debian_harmattan/changelog
index f30d851..d834829 100644 (file)
@@ -43,7 +43,8 @@ MainWindow::MainWindow(QWidget *parent)
     pScene_ = new SeaScene ();
     connect(pScene_,SIGNAL(allGhostsPicked()),this,SLOT(nextLevel()));
 
-    pView_  = new QGraphicsView ();
+    pView_  = new SeaView ();
+
 
     pView_->setScene(pScene_);
     setCentralWidget(pView_);
@@ -53,6 +54,7 @@ MainWindow::MainWindow(QWidget *parent)
     addAction(pPauseAction_);
     connect(pPauseAction_,SIGNAL(triggered(bool)),pScene_,SLOT(pause(bool)));
     menuBar()->addAction(pPauseAction_);
+    connect(pView_,SIGNAL(pauseChanged()),pPauseAction_,SLOT(toggle()));
 
     QAction * pRestartLevelAction = new QAction(tr("Restart level"),this);
     addAction(pRestartLevelAction);
index 5c2664c..b96eb4a 100644 (file)
@@ -27,6 +27,7 @@
 #include <QGraphicsView>
 #include "orientationcontrolledgraphicspixmapobject.h"
 #include "seascene.h"
+#include "seaview.h"
 #include "level.h"
 
 class MainWindow : public QMainWindow
@@ -51,7 +52,7 @@ public slots:
 private:
 
 SeaScene * pScene_;
-QGraphicsView * pView_;
+SeaView * pView_;
 QAction* pPauseAction_;
 QList<Level> levelList_;
 int currentLevel_;
diff --git a/qtc_packaging/debian_harmattan/README b/qtc_packaging/debian_harmattan/README
new file mode 100644 (file)
index 0000000..0e78871
--- /dev/null
@@ -0,0 +1,6 @@
+The Debian Package ghostsoverboard
+----------------------------
+
+Comments regarding the Package
+
+ -- Heli Hyvättinen <heli@unknown>  Sat, 16 Jul 2011 16:15:34 +0300
diff --git a/qtc_packaging/debian_harmattan/changelog b/qtc_packaging/debian_harmattan/changelog
new file mode 100644 (file)
index 0000000..e3b7a3a
--- /dev/null
@@ -0,0 +1,5 @@
+ghostsoverboard (0.2.1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Heli Hyvättinen <heli@unknown>  Sat, 16 Jul 2011 16:15:34 +0300
diff --git a/qtc_packaging/debian_harmattan/compat b/qtc_packaging/debian_harmattan/compat
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/qtc_packaging/debian_harmattan/control b/qtc_packaging/debian_harmattan/control
new file mode 100644 (file)
index 0000000..655a601
--- /dev/null
@@ -0,0 +1,15 @@
+Source: ghostsoverboard
+Section: user/other
+Priority: optional
+Maintainer: Heli Hyvättinen <heli@unknown>
+Build-Depends: debhelper (>= 5), libqt4-dev
+Standards-Version: 3.7.3
+Homepage: <insert the upstream URL, if relevant>
+
+Package: ghostsoverboard
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Pick up ghosts by tilting the device
+ <insert long description, indented with spaces>
+XSBC-Maemo-Display-Name: ghostsoverboard
+XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAB/9JREFUaIHtmGtsVNcRx//nru2117DEBrOYgINtoFWBVOIl6ijUIETSVC2Uh9ukwbyCKiHRUvH+gJS2iUiE1BaRNi3PSkAQhaI2IRFNBMFNIQoNUJKS0CYk1DbCKS0YL7Lx3pn598PdXW/MI7YxfPJIV3t1zt07/985c+acuUCP9ViP9RgAXKutfTReW7vuXvv1uutF9Lyv0PPm3ar/VytXzvj50qX/HBeN/mVsfv7mMSiOdIffbgMw6GUHDGiqrz99tb6+on0/nVtzqaFhOMiHnfOeyr6vZelDxcUld+q32wAAACQc8aAHHI3X168jmfn+sf9paABIAER2OPxsXm7ev78xYsT+6WPGlHfVpbtz1YHF6+q2AG5h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rFazcLrCyigX03Vw8KELqQ9dlg6TzEWQvCfgwEW7a2q2dETDHX2V+NnWrU8nQqEyks/SrNGYESZmIFKxj6AtGf/tBQeWBjk0vLJyW0c1dFtJuXj27F7ZwChCR4mwXFVzUiWiiIEmV4Wab4YBIGIO9OAYArxrBMSR/3PO7egdjx/7orDpsR7rsR7rsR5L2f8BvgjKOoDMTeYAAAAASUVORK5CYII=
diff --git a/qtc_packaging/debian_harmattan/copyright b/qtc_packaging/debian_harmattan/copyright
new file mode 100644 (file)
index 0000000..763a679
--- /dev/null
@@ -0,0 +1,40 @@
+This package was debianized by Heli Hyvättinen <heli@unknown> on
+Sat, 16 Jul 2011 16:15:34 +0300.
+
+It was downloaded from <url://example.com>
+
+Upstream Author(s):
+
+    <put author's name and email here>
+    <likewise for another author>
+
+Copyright:
+
+    <Copyright (C) YYYY Name OfAuthor>
+    <likewise for another author>
+
+License:
+
+    This package 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 package 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 package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+The Debian packaging is (C) 2011, Heli Hyvättinen <heli@unknown> and
+is licensed under the GPL, see above.
+
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
diff --git a/qtc_packaging/debian_harmattan/rules b/qtc_packaging/debian_harmattan/rules
new file mode 100755 (executable)
index 0000000..5497d44
--- /dev/null
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # qmake PREFIX=/usr# Uncomment this line for use without Qt Creator
+
+       touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp  
+       dh_testdir
+
+       # Add here commands to compile the package.
+       # $(MAKE) # Uncomment this line for use without Qt Creator
+       #docbook-to-man debian/ghostsoverboard.sgml > ghostsoverboard.1
+
+       touch $@
+
+clean: 
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       $(MAKE) clean
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into debian/ghostsoverboard.
+       $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/ghostsoverboard install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+       dh_installdocs
+       dh_installexamples
+#      dh_install
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_perl
+#      dh_makeshlibs
+       dh_installdeb
+       # dh_shlibdeps # Uncomment this line for use without Qt Creator
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
index 764fea9..866fae1 100644 (file)
@@ -49,6 +49,10 @@ SeaScene::SeaScene(QObject *parent) :
 
     qsrand(QTime::currentTime().msec()+2);  //+2 to avoid setting it to 1
 
+    //connect selecting to menu handling (only menu items selectable)
+
+    connect(this,SIGNAL(selectionChanged()),this,SLOT(menuClicked()));
+
 
 
 }
@@ -318,3 +322,53 @@ void SeaScene::vibrationActivate(bool on)
 {
     emit vibrationActivated(on);
 }
+
+void SeaScene::menuClicked()
+{
+    QList<QGraphicsItem *> items = selectedItems();
+
+    //if nothing selected (selection was removed) do nothing
+
+    if (items.isEmpty())
+        return;
+
+    //Menu functions
+
+    QString menuitem = items.at(0)->data(0).toString();
+
+    if (menuitem == "restart game")
+    {
+
+    }
+
+    else if (menuitem == "restart level")
+    {
+
+    }
+
+    else if (menuitem == "vibration effects")
+    {
+
+    }
+
+    else if (menuitem == "about")
+    {
+
+    }
+
+
+    //Selection is just used to get notice of being clicked, removed after use
+
+    clearSelection();
+
+}
+
+void SeaScene::showMenu()
+{
+    menuItems_.show();
+}
+
+void::SeaScene::hideMenu()
+{
+    menuItems_.hide();
+}
index 6d932ab..69eeb6d 100644 (file)
@@ -25,6 +25,7 @@
 #define SEASCENE_H
 
 #include <QGraphicsScene>
+#include<QGraphicsItemGroup>
 #include "screenlitkeeper.h"
 #include "level.h"
 
@@ -63,6 +64,12 @@ public slots:
 
     void vibrationActivate(bool);
 
+    void menuClicked();
+
+    void showMenu();
+
+    void hideMenu();
+
 protected:
 
     /*! Gives a pointer to a random position if a free one is found. Otherwise returns NULL.
@@ -86,7 +93,9 @@ protected:
 
     ScreenLitKeeper screenLitKeeper_;
 
+private:
 
+    QGraphicsItemGroup menuItems_;
 
 
 };
index 9cdac5c..4dd3fb9 100644 (file)
@@ -26,3 +26,8 @@ SeaView::SeaView(QWidget *parent) :
     QGraphicsView(parent)
 {
 }
+
+int  SeaView::mousePressEvent(QMouseEvent *event)
+{
+    emit pauseChanged();
+}
index 06a67e4..e6e20ed 100644 (file)
--- a/seaview.h
+++ b/seaview.h
@@ -31,8 +31,12 @@ class SeaView : public QGraphicsView
 public:
     explicit SeaView(QWidget *parent = 0);
 
+    virtual void mousePressEvent(QMouseEvent *event);
+
 signals:
 
+    void pauseChanged();
+
 public slots:
 
 };