3
Copyright (C) 1998 Andreas Wüst (AndreasWuest@gmx.de)
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
class KAtomicHighscores;
31
class GameWidget : public QWidget
36
GameWidget ( int startingLevel, QWidget *parent );
39
void enableSwitchToAnyLevel() { m_allowAnyLevelSwitch = true; }
40
bool switchToAnyLevelAllowed() const { return m_allowAnyLevelSwitch; }
42
PlayField* playfield() { return m_playField; }
44
int currentLevel() const { return m_level; }
45
QString currentMolecule() const;
46
int currentScore() const { return m_moves; }
47
int currentHighScore() const;
49
void statsChanged(int level,int score,int highscore);
50
void levelChanged(int level);
58
// restart current level
61
void gameOver(int moves);
63
// use this slot to update the moves continually
64
void updateMoves(int moves);
66
void showHighscores ();
73
virtual void resizeEvent( QResizeEvent* );
74
void switchToLevel (int);
76
* If on, katomic will allow user to switch to any
77
* level even if she didn't solved it yet.
79
bool m_allowAnyLevelSwitch;
81
QGraphicsView *m_view;
82
PlayField *m_playField;
86
KAtomicHighscores *m_highscore;
90
* Highscore of the current level
95
* Timer for automatic next level