File indexing completed on 2024-12-01 06:52:14

0001 /*
0002     SPDX-FileCopyrightText: 2003 Russell Steffen <rsteffen@bayarea.net>
0003     SPDX-FileCopyrightText: 2003 Stephan Zehetner <s.zehetner@nevox.org>
0004     SPDX-FileCopyrightText: 2006 Dmitry Suzdalev <dimsuz@gmail.com>
0005     SPDX-FileCopyrightText: 2006 Inge Wallin <inge@lysator.liu.se>
0006     SPDX-FileCopyrightText: 2006 Pierre Ducroquet <pinaraf@gmail.com>
0007 
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #ifndef KONQUEST_MAINWIN_H
0012 #define KONQUEST_MAINWIN_H
0013 
0014 #include <QAction>
0015 #include <KXmlGuiWindow>
0016 
0017 #include "game.h"
0018 #include "gameview.h"
0019 
0020 class QDockWidget;
0021 
0022 
0023 class MainWindow : public KXmlGuiWindow
0024 {
0025     Q_OBJECT
0026 
0027 public:
0028     MainWindow();
0029     ~MainWindow() override;
0030 
0031     QSize sizeHint() const override;
0032 
0033 private:
0034     void setupActions();
0035     void setupGameView();
0036     void setupGUI();
0037 
0038 private Q_SLOTS:
0039     void guiStateChange( GUIState );
0040     void startNewGame();
0041     void updateMessagesActionSlot();
0042     void updateStandingsActionSlot();
0043 
0044 private:
0045     // Widgets
0046     Game       *m_game;
0047     GameView   *m_gameView;
0048     QLabel     *m_statusBarText;
0049 
0050     // Actions
0051     QAction *m_endTurnAction;
0052     QAction *m_messagesAction;
0053     QAction *m_standingsAction;
0054 
0055     QAction  *m_endGameAction;
0056     QAction  *m_measureAction;
0057     QAction  *m_fleetAction;
0058 
0059     QDockWidget *m_messagesDock;
0060     QDockWidget *m_standingsDock;
0061 };
0062 
0063 #endif // KONQUEST_MAINWIN_H