Diffstat (limited to 'noncore/games/minesweep/minefield.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/minesweep/minefield.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/games/minesweep/minefield.h b/noncore/games/minesweep/minefield.h index 1349c35..e243d77 100644 --- a/noncore/games/minesweep/minefield.h +++ b/noncore/games/minesweep/minefield.h | |||
@@ -1,20 +1,20 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
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 | #ifndef MINEFIELD_H | 20 | #ifndef MINEFIELD_H |
@@ -29,32 +29,35 @@ class MineField : public QScrollView | |||
29 | { | 29 | { |
30 | Q_OBJECT | 30 | Q_OBJECT |
31 | public: | 31 | public: |
32 | MineField( QWidget* parent = 0, const char* name = 0 ); | 32 | MineField( QWidget* parent = 0, const char* name = 0 ); |
33 | ~MineField(); | 33 | ~MineField(); |
34 | 34 | ||
35 | enum State { Waiting, Playing, GameOver }; | 35 | enum State { Waiting, Playing, GameOver }; |
36 | 36 | ||
37 | State state() const { return stat; } | 37 | State state() const { return stat; } |
38 | 38 | ||
39 | void readConfig(Config&); | 39 | void readConfig(Config&); |
40 | void writeConfig(Config&) const; | 40 | void writeConfig(Config&) const; |
41 | 41 | ||
42 | int level() const { return lev; } | 42 | int level() const { return lev; } |
43 | 43 | ||
44 | void setAvailableRect( const QRect & ); | 44 | void setAvailableRect( const QRect & ); |
45 | |||
46 | QSize sizeHint() const; | ||
47 | |||
45 | public slots: | 48 | public slots: |
46 | void setup( int level ); | 49 | void setup( int level ); |
47 | 50 | ||
48 | void showMines(); | 51 | void showMines(); |
49 | 52 | ||
50 | signals: | 53 | signals: |
51 | void gameOver( bool won ); | 54 | void gameOver( bool won ); |
52 | void gameStarted(); | 55 | void gameStarted(); |
53 | void mineCount( int ); | 56 | void mineCount( int ); |
54 | 57 | ||
55 | protected: | 58 | protected: |
56 | 59 | ||
57 | void contentsMousePressEvent( QMouseEvent* ); | 60 | void contentsMousePressEvent( QMouseEvent* ); |
58 | void contentsMouseReleaseEvent( QMouseEvent* ); | 61 | void contentsMouseReleaseEvent( QMouseEvent* ); |
59 | void keyPressEvent( QKeyEvent* ); | 62 | void keyPressEvent( QKeyEvent* ); |
60 | void keyReleaseEvent( QKeyEvent* ); | 63 | void keyReleaseEvent( QKeyEvent* ); |