2 This file is part of Cute Chess.
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.
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.
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/>.
21 #include <QMainWindow>
24 namespace Chess
{ class Board
; class Move
; }
33 class EngineConfigurationModel
;
41 class MainWindow
: public QMainWindow
46 explicit MainWindow(ChessGame
* game
);
47 virtual ~MainWindow();
48 QString
windowListTitle() const;
51 void addGame(ChessGame
* game
);
54 virtual void closeEvent(QCloseEvent
* event
);
58 void gameProperties();
61 void onWindowMenuAboutToShow();
62 void showGameWindow();
63 void updateWindowTitle();
67 void onTabChanged(int index
);
68 void onTabCloseRequested(int index
);
69 void removeGame(ChessGame
* game
);
70 void destroyGame(ChessGame
* game
);
75 void createToolBars();
76 void createDockWindows();
78 QString
genericTitle(ChessGame
* game
) const;
79 bool saveGame(const QString
& fileName
);
81 void setCurrentGame(ChessGame
* game
);
91 BoardScene
* m_boardScene
;
92 QGraphicsView
* m_boardView
;
93 MoveListModel
* m_moveListModel
;
94 ChessClock
* m_chessClock
[2];
96 QAction
* m_quitGameAct
;
97 QAction
* m_gamePropertiesAct
;
98 QAction
* m_newGameAct
;
99 QAction
* m_closeGameAct
;
100 QAction
* m_saveGameAct
;
101 QAction
* m_saveGameAsAct
;
102 QAction
* m_importGameAct
;
103 QAction
* m_manageEnginesAct
;
104 QAction
* m_showGameDatabaseWindowAct
;
105 QAction
* m_showGameWallAct
;
107 PlainTextLog
* m_engineDebugLog
;
109 QPointer
<ChessGame
> m_game
;
110 QList
<ChessGame
*> m_games
;
112 QString m_currentFile
;
116 #endif // MAINWINDOW_H