1 | /* **************************************************************************** |
2 | This file is part of the game 'KJumpingCube' |
3 | |
4 | Copyright (C) 1998-2000 by Matthias Kiefer |
5 | <matthias.kiefer@gmx.de> |
6 | |
7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. |
11 | |
12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. |
16 | |
17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
20 | |
21 | **************************************************************************** */ |
22 | #ifndef KJUMPINGCUBE_H |
23 | #define KJUMPINGCUBE_H |
24 | |
25 | #include <QLabel> |
26 | |
27 | #include <kxmlguiwindow.h> |
28 | #include <game.h> |
29 | |
30 | class QAction; |
31 | class KCubeBoxWidget; |
32 | class QPushButton; |
33 | |
34 | /** |
35 | * This class serves as the main window for KJumpingCube. It handles the |
36 | * menus, toolbars, and status bars. |
37 | * |
38 | * @short Main window class |
39 | * @author Matthias Kiefer <matthias.kiefer@gmx.de> |
40 | * @version 0.7.2 |
41 | */ |
42 | class KJumpingCube : public KXmlGuiWindow { |
43 | Q_OBJECT |
44 | |
45 | public: |
46 | /** Default Constructor */ |
47 | KJumpingCube(); |
48 | |
49 | public slots: |
50 | void setAction (const Action a, const bool onOff); |
51 | |
52 | protected: |
53 | /// To make sure all activity ceases before closing. |
54 | bool queryClose(); |
55 | |
56 | private: |
57 | Game * m_game; |
58 | KCubeBoxWidget * m_view; |
59 | QLabel *currentPlayer; |
60 | QAction *undoAction, *redoAction, *stopAction, *hintAction; |
61 | |
62 | void initKAction(); |
63 | |
64 | QPushButton * actionButton; |
65 | QString buttonLook; |
66 | |
67 | private slots: |
68 | void changePlayerColor (int newPlayer); |
69 | void changeButton (bool enabled, bool stop = false, |
70 | const QString & caption = QString()); |
71 | void statusMessage (const QString & message, bool timed); |
72 | }; |
73 | |
74 | #endif // KJUMPINGCUBE_H |
75 | |
76 | |