1/*
2 Copyright 2003 Russell Steffen <rsteffen@bayarea.net>
3 Copyright 2003 Stephan Zehetner <s.zehetner@nevox.org>
4 Copyright 2006 Dmitry Suzdalev <dimsuz@gmail.com>
5 Copyright 2006 Inge Wallin <inge@lysator.liu.se>
6 Copyright 2006 Pierre Ducroquet <pinaraf@gmail.com>
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22
23#ifndef KONQUEST_MAINWIN_H
24#define KONQUEST_MAINWIN_H
25
26#include <kaction.h>
27#include <kxmlguiwindow.h>
28
29#include "game.h"
30#include "gameview.h"
31
32class QAction;
33class QDockWidget;
34
35
36class MainWindow : public KXmlGuiWindow
37{
38 Q_OBJECT
39
40public:
41 MainWindow();
42 ~MainWindow();
43
44 QSize sizeHint() const;
45
46private:
47 void setupActions();
48 void setupGameView();
49 void setupGUI();
50
51private slots:
52 void guiStateChange( GUIState );
53 void startNewGame();
54 void updateMessagesActionSlot();
55 void updateStandingsActionSlot();
56
57private:
58 // Widgets
59 Game *m_game;
60 GameView *m_gameView;
61 QLabel *m_statusBarText;
62
63 // Actions
64 KAction *m_endTurnAction;
65 KAction *m_messagesAction;
66 KAction *m_standingsAction;
67
68 QAction *m_endGameAction;
69 QAction *m_measureAction;
70 QAction *m_fleetAction;
71
72 QDockWidget *m_messagesDock;
73 QDockWidget *m_standingsDock;
74};
75
76#endif // KONQUEST_MAINWIN_H
77