SVN_SILENT made messages (.desktop file)
[kdegames.git] / bovo / gui / mainwindow.h
blobd57125d75819643a29dc4e93015ec3cd10304577
1 /*******************************************************************
3 * This file is part of the KDE project "Bovo"
5 * Bovo 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, or (at your option)
8 * any later version.
10 * Bovo 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 Bovo; see the file COPYING. If not, write to
17 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
20 ********************************************************************/
22 #ifndef __MAINWINDOW_H__
23 #define __MAINWINDOW_H__
25 #include <QString>
26 #include <QStringList>
28 #include <kxmlguiwindow.h>
30 #include "common.h"
31 #include "theme.h"
33 namespace ai {
34 class Ai;
37 namespace bovo {
38 class Game;
41 using namespace bovo;
42 using namespace ai;
44 class KSelectAction;
46 namespace gui {
48 class Scene;
49 class View;
51 class MainWindow : public KXmlGuiWindow
53 Q_OBJECT
54 public:
55 explicit MainWindow(QWidget* parent=0);
56 ~MainWindow();
58 public slots:
59 void hint();
60 void slotNewGame();
61 void slotPlayerTurn();
62 void slotOposerTurn();
63 void slotGameOver();
64 void slotNewDemo();
65 void slotNewDemoWait();
66 void slotUndo();
67 void replay();
68 void changeSkill();
69 void changeTheme(int);
70 void reEnableReplay();
71 void enableUndo();
72 void disableUndo();
73 void setupThemes();
74 void save() const;
75 void setAnimation(bool enabled);
77 private:
78 Scene *m_scene;
79 View *m_view;
80 Game *m_game;
81 Theme m_theme;
82 QList<Theme> m_themes;
83 int m_wins, m_losses;
84 void setupActions();
85 void increaseWins();
86 void updateWins(const int wins);
87 void increaseLosses();
88 void updateLosses(const int losses);
89 QAction* m_hintAct;
90 QAction* m_undoAct;
91 KSelectAction* m_themeAct;
92 bool m_computerStarts;
93 Ai *m_demoAi;
94 void readConfig();
95 void saveSettings();
96 int m_playbackSpeed;
97 QStringList m_lastGame;
98 bool m_animate;
101 } /* namespace gui */
103 #endif /* __MAINWINDOW_H__ */