SVN_SILENT made messages (.desktop file)
[kdegames.git] / ksame / mainwindow.h
blob962f2f3e3782358d3ee04cb923126f7827c3d40a
1 /*
2 * KSame
3 * Copyright (C) 1997,1998 Marcus Kreutzberger <kreutzbe@informatik.mu-luebeck.de>
4 * Copyright (C) 2006 Henrique Pinto <henrique.pinto@kdemail.net>
5 * Copyright (C) 2007 Simon Hürlimann <simon.huerlimann@huerlisi.ch>
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.
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.
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.
23 #ifndef KSAME_MAINWINDOW_H
24 #define KSAME_MAINWINDOW_H
26 #include <KXmlGuiWindow>
28 class QAction;
29 class KToggleAction;
31 namespace KSame
33 class Board;
35 class MainWindow: public KXmlGuiWindow
37 Q_OBJECT
39 public:
40 explicit MainWindow( QWidget *parent = 0 );
42 private slots:
43 void newGame();
44 void onNewGameStarted( quint32 boardNumber, quint8 colors );
45 void restartGame();
46 void showHighScoreDialog();
47 void undo();
49 void gameover();
50 void setScore(quint32 score);
51 void setMarked(int m);
53 void showNumberRemainingToggled();
55 protected:
56 void newGame(unsigned int board, int colors);
57 void setupActions();
58 virtual void saveProperties(KConfigGroup &conf);
59 virtual void readProperties(const KConfigGroup &conf);
61 bool confirmAbort();
63 private:
64 KSame::Board *m_board;
65 KStatusBar *m_statusBar;
67 KToggleAction *m_randomBoardAction;
68 KToggleAction *m_showNumberRemainingAction;
69 QAction *m_restartAction;
70 QAction *m_undoAction;
73 } // namespace KSame
75 #endif // KSAME_MAINWINDOW_H