Cute Chess
0.1
projects
gui
src
cutechessapp.h
1
/*
2
This file is part of Cute Chess.
3
4
Cute Chess is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
Cute Chess 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
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef CUTE_CHESS_APPLICATION_H
19
#define CUTE_CHESS_APPLICATION_H
20
21
#include <QApplication>
22
#include <QPointer>
23
24
class
EngineManager
;
25
class
GameManager
;
26
class
MainWindow
;
27
class
SettingsDialog
;
28
class
TournamentResultsDialog
;
29
class
GameDatabaseManager
;
30
class
GameDatabaseDialog
;
31
class
PgnImporter
;
32
class
ChessGame
;
33
class
GameWall
;
34
35
class
CuteChessApplication
:
public
QApplication
36
{
37
Q_OBJECT
38
39
public
:
40
CuteChessApplication
(
int
& argc,
char
* argv[]);
41
virtual
~
CuteChessApplication
();
42
43
QString
configPath();
44
EngineManager
* engineManager();
45
GameManager
* gameManager();
46
GameDatabaseManager
* gameDatabaseManager();
47
QList<MainWindow*>
gameWindows();
48
void
showGameWindow(
int
index);
49
TournamentResultsDialog
* tournamentResultsDialog();
50
51
static
CuteChessApplication
* instance();
52
static
QString
userName();
53
54
public
slots:
55
MainWindow
* newGameWindow(
ChessGame
* game);
56
void
newDefaultGame();
57
void
showSettingsDialog();
58
void
showTournamentResultsDialog();
59
void
showGameDatabaseDialog();
60
void
showGameWall();
61
void
closeDialogs();
62
void
onQuitAction();
63
64
private
:
65
void
showDialog(
QWidget
* dlg);
66
67
SettingsDialog
* m_settingsDialog;
68
TournamentResultsDialog
* m_tournamentResultsDialog;
69
EngineManager
* m_engineManager;
70
GameManager
* m_gameManager;
71
GameDatabaseManager
* m_gameDatabaseManager;
72
QList<QPointer<MainWindow>
> m_gameWindows;
73
GameDatabaseDialog
* m_gameDatabaseDialog;
74
QPointer<GameWall> m_gameWall;
75
bool
m_initialWindowCreated;
76
77
private
slots:
78
void
onLastWindowClosed();
79
void
onAboutToQuit();
80
};
81
82
#endif // CUTE_CHESS_APPLICATION_H
QWidget
TournamentResultsDialog
Definition:
tournamentresultsdlg.h:26
GameDatabaseManager
Manages chess game databases.
Definition:
gamedatabasemanager.h:33
QApplication
EngineManager
Manages chess engines and their configurations.
Definition:
enginemanager.h:29
CuteChessApplication
Definition:
cutechessapp.h:35
ChessGame
Definition:
chessgame.h:38
PgnImporter
Reads PGN database in a separate thread.
Definition:
pgnimporter.h:30
SettingsDialog
Dialog for configuring global settings.
Definition:
settingsdlg.h:30
QString
QList
GameDatabaseDialog
Dialog for viewing game databases.
Definition:
gamedatabasedlg.h:42
GameManager
A class for managing chess games and players.
Definition:
gamemanager.h:39
GameWall
Definition:
gamewall.h:29
MainWindow
Definition:
mainwindow.h:47
Generated by
1.8.14