summaryrefslogtreecommitdiff
path: root/noncore/games/snake/interface.h
Unidiff
Diffstat (limited to 'noncore/games/snake/interface.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/snake/interface.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/games/snake/interface.h b/noncore/games/snake/interface.h
index 454d4ee..fa1dee4 100644
--- a/noncore/games/snake/interface.h
+++ b/noncore/games/snake/interface.h
@@ -9,43 +9,46 @@
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include <qmainwindow.h> 20#include <qmainwindow.h>
21#include <qpe/qpeapplication.h>
21#include <qcanvas.h> 22#include <qcanvas.h>
22#include <qlabel.h> 23#include <qlabel.h>
23 24
24#include "snake.h" 25#include "snake.h"
25#include "target.h" 26#include "target.h"
26#include "obstacle.h" 27#include "obstacle.h"
27 28
28// class QCanvas; 29// class QCanvas;
29 30
30class SnakeGame : public QMainWindow { 31class SnakeGame : public QMainWindow {
31 Q_OBJECT 32 Q_OBJECT
32 33
33public: 34public:
34 SnakeGame(QWidget* parent=0, const char* name=0, WFlags f=0); 35 SnakeGame(QWidget* parent=0, const char* name=0, WFlags f=0);
35 ~SnakeGame(); 36 ~SnakeGame();
36 37
37 void clear(); 38 void clear();
38 void createTargets(); 39 void createTargets();
39 40
41 static QString appName() { return QString::fromLatin1("snake"); }
42
40protected: 43protected:
41 virtual void keyPressEvent(QKeyEvent*); 44 virtual void keyPressEvent(QKeyEvent*);
42 virtual void resizeEvent(QResizeEvent *e); 45 virtual void resizeEvent(QResizeEvent *e);
43 46
44signals: 47signals:
45 void moveFaster(); 48 void moveFaster();
46 49
47private slots: 50private slots:
48 void newGame(); 51 void newGame();
49 void gameOver(); 52 void gameOver();
50 void wait(); 53 void wait();
51 void levelUp(); 54 void levelUp();