summaryrefslogtreecommitdiff
path: root/noncore/games/bounce/kbounce.h
Unidiff
Diffstat (limited to 'noncore/games/bounce/kbounce.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/bounce/kbounce.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/noncore/games/bounce/kbounce.h b/noncore/games/bounce/kbounce.h
new file mode 100644
index 0000000..de41710
--- a/dev/null
+++ b/noncore/games/bounce/kbounce.h
@@ -0,0 +1,99 @@
1/*
2 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19#ifndef KJEZZBALL_H_INCLUDED
20#define KJEZZBALL_H_INCLUDED
21
22#include <qmainwindow.h>
23#include <qmenubar.h>
24#include <qlabel.h>
25
26class JezzGame;
27class QLCDNumber;
28class QGridLayout;
29
30class KJezzball : public QMainWindow
31{
32 Q_OBJECT
33
34public:
35 KJezzball();
36
37public slots:
38 void newGame();
39 void pauseGame();
40 void closeGame();
41 void about();
42
43protected slots:
44 void died();
45 void newPercent( int percent );
46 void second();
47 void switchLevel();
48 void gameOverNow();
49
50protected:
51 void createLevel( int level );
52 void startLevel();
53 void stopLevel();
54 void nextLevel();
55 void gameOver();
56 void initXMLUI();
57
58 void focusOutEvent( QFocusEvent * );
59 void focusInEvent ( QFocusEvent * );
60 void keyPressEvent( QKeyEvent *ev );
61
62 JezzGame *m_gameWidget;
63 QWidget *m_view;
64 QGridLayout *m_layout;
65 QLCDNumber *m_levelLCD;
66 QLCDNumber *m_lifesLCD;
67 QLCDNumber *m_scoreLCD;
68 QLCDNumber *m_percentLCD;
69 QLCDNumber *m_timeLCD;
70
71 QTimer *m_timer;
72 QTimer *m_nextLevelTimer;
73 QTimer *m_gameOverTimer;
74
75 enum { Idle, Running, Paused, Suspend } m_state;
76
77 struct
78 {
79 int lifes;
80 int time;
81 int score;
82 } m_level;
83
84 struct
85 {
86 int level;
87 int score;
88 } m_game;
89private:
90 QMenuBar *menu;
91 QPopupMenu *game;
92 QLabel* ScoreLabel;
93 QLabel* LivesLabel;
94 QLabel* FilledLabel;
95 QLabel* TimeLabel;
96
97};
98
99#endif