/***************************************************************************
 *   Copyright 2008-2010 Stefan Majewsky <majewsky@gmx.net>
 *
 *   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.
 ***************************************************************************/

#ifndef KDIAMOND_MAINWINDOW_H
#define KDIAMOND_MAINWINDOW_H

class Game;
#include "game-state.h"

class QAction;
class KActionMenu;
class KGameRenderer;

#include <KXmlGuiWindow>
#include <KgThemeSelector>

namespace KDiamond
{
class InfoBar;
class View;
}

class MainWindow : public KXmlGuiWindow
{
    Q_OBJECT
public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
public Q_SLOTS:
    void startGame(KDiamond::Mode mode);
    void startGameDispatcher();
    void stateChange(KDiamond::State state);
    void gameIsOver();
    void showHighscores();

    void configureNotifications();
Q_SIGNALS:
    void pause(bool paused);
protected Q_SLOTS:
    void pausedAction(bool paused);
private:
    KDiamond::GameState *m_gameState;
    Game *m_game;
    KDiamond::View *m_view;

    KDiamond::InfoBar *m_infoBar;

    KActionMenu *m_newAct;
    QAction *m_newTimedAct;
    QAction *m_newUntimedAct;
    QAction *m_pauseAct;
    QAction *m_hintAct;
    KGameRenderer *m_renderer;
    KgThemeSelector m_selector;
};

#endif //KDIAMOND_MAINWINDOW_H
