1 | /* |
2 | * Copyright (C) 2000-2005 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | */ |
18 | |
19 | #ifndef KBOUNCE_MAINWINDOW_H |
20 | #define KBOUNCE_MAINWINDOW_H |
21 | |
22 | #include <KXmlGuiWindow> |
23 | |
24 | #include "gamewidget.h" |
25 | |
26 | class KAction; |
27 | class KStatusBar; |
28 | class KToggleAction; |
29 | |
30 | |
31 | class KBounceMainWindow : public KXmlGuiWindow |
32 | { |
33 | Q_OBJECT |
34 | public: |
35 | KBounceMainWindow(); |
36 | ~KBounceMainWindow(); |
37 | |
38 | protected slots: |
39 | void newGame(); |
40 | void pauseGame(); |
41 | void closeGame(); |
42 | void gameOverNow(); |
43 | void configureSettings(); |
44 | void readSettings(); |
45 | void settingsChanged(); |
46 | void setSounds( bool val ); |
47 | void showHighscore(); |
48 | void displayLevel( int level ); |
49 | void displayScore( int score ); |
50 | void displayFilled( int filled ); |
51 | void displayLives( int lives ); |
52 | void displayTime( int time ); |
53 | void gameStateChanged( KBounceGameWidget::State state ); |
54 | protected: |
55 | void initXMLUI(); |
56 | void highscore(); |
57 | |
58 | void focusOutEvent( QFocusEvent * ); |
59 | void focusInEvent ( QFocusEvent * ); |
60 | |
61 | KBounceGameWidget* m_gameWidget; |
62 | |
63 | KStatusBar* m_statusBar; |
64 | |
65 | KToggleAction *m_pauseAction, *m_backgroundShowAction, *m_soundAction; |
66 | KAction *m_newAction; |
67 | }; |
68 | |
69 | #endif // KBOUNCE_MAINWINDOW_H |
70 | |