mainwin.h 1.93 KB
Newer Older
1
/*
2 3 4 5 6
    Copyright 2003 Russell Steffen <rsteffen@bayarea.net>
    Copyright 2003 Stephan Zehetner <s.zehetner@nevox.org>
    Copyright 2006 Dmitry Suzdalev <dimsuz@gmail.com>
    Copyright 2006 Inge Wallin <inge@lysator.liu.se>
    Copyright 2006 Pierre Ducroquet <pinaraf@gmail.com>
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
22

23 24
#ifndef KONQUEST_MAINWIN_H
#define KONQUEST_MAINWIN_H
25

Laurent Montel's avatar
Laurent Montel committed
26
#include <QAction>
27
#include <KXmlGuiWindow>
28

Pierre Ducroquet's avatar
Pierre Ducroquet committed
29
#include "game.h"
30
#include "gameview.h"
31

32
class QAction;
33 34
class QDockWidget;

35

Kevin Ottens's avatar
Kevin Ottens committed
36
class MainWindow : public KXmlGuiWindow
37 38 39 40
{
    Q_OBJECT

public:
Nicolas Hadacek's avatar
Nicolas Hadacek committed
41
    MainWindow();
42 43
    ~MainWindow();

44
    QSize sizeHint() const override;
45

46
private:
47
    void setupActions();
48
    void setupGameView();
49
    void setupGUI();
50 51

private slots:
Inge Wallin's avatar
Inge Wallin committed
52
    void guiStateChange( GUIState );
53
    void startNewGame();
54
    void updateMessagesActionSlot();
55
    void updateStandingsActionSlot();
Nicolas Hadacek's avatar
Nicolas Hadacek committed
56

57 58
private:
    // Widgets
Pierre Ducroquet's avatar
Pierre Ducroquet committed
59
    Game       *m_game;
60
    GameView   *m_gameView;
61 62 63
    QLabel     *m_statusBarText;

    // Actions
Laurent Montel's avatar
Laurent Montel committed
64 65 66
    QAction *m_endTurnAction;
    QAction *m_messagesAction;
    QAction *m_standingsAction;
67

Alexander Schuch's avatar
Alexander Schuch committed
68
    QAction  *m_endGameAction;
69 70
    QAction  *m_measureAction;
    QAction  *m_fleetAction;
71 72

    QDockWidget *m_messagesDock;
73
    QDockWidget *m_standingsDock;
74 75
};

76
#endif // KONQUEST_MAINWIN_H