1 /*********************************************************************** 2 * 3 * Copyright (C) 2009, 2014 Graeme Gott <graeme@gottcode.org> 4 * 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 3 of the License, or 8 * (at your option) any later version. 9 * 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. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 * 18 ***********************************************************************/ 19 20 #ifndef WINDOW_H 21 #define WINDOW_H 22 23 #include <QMainWindow> 24 class QAction; 25 class QLabel; 26 class Board; 27 class Clock; 28 class Definitions; 29 class ScoreBoard; 30 31 class Window : public QMainWindow { 32 Q_OBJECT 33 34 public: 35 Window(); 36 ~Window(); 37 38 public slots: 39 void newGame(); 40 41 protected: 42 virtual void closeEvent(QCloseEvent* event); 43 virtual bool event(QEvent* event); 44 virtual bool eventFilter(QObject* object, QEvent* event); 45 46 private slots: 47 void chooseGame(); 48 void about(); 49 void showDetails(); 50 void setLocale(); 51 void gameStarted(); 52 void gameFinished(); 53 void gamePauseChanged(); 54 55 private: 56 QAction* m_pause_action; 57 Board* m_board; 58 Clock* m_clock; 59 QLabel* m_definitions_button; 60 QLabel* m_hint_button; 61 ScoreBoard* m_scores; 62 Definitions* m_definitions; 63 QLabel* m_success; 64 }; 65 66 #endif 67