mainwindow.h 2.07 KB
Newer Older
Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/*******************************************************************
 *
 * Copyright 2006 Dmitry Suzdalev <dimsuz@gmail.com>
 *
 * This file is part of the KDE project "KReversi"
 *
 * KReversi 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, or (at your option)
 * any later version.
 *
 * KReversi 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 KReversi; see the file COPYING.  If not, write to
 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 ********************************************************************/
Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
23 24 25 26 27
#ifndef KREVERSI_MAIN_WINDOW_H
#define KREVERSI_MAIN_WINDOW_H

#include <kmainwindow.h>

28
class KReversiScene;
Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
29
class KReversiGame;
30
class KReversiView;
31
class QAction;
32
class KSelectAction;
33
class KToggleAction;
34 35
class QListWidget;
class QLabel;
36

Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
37 38
class KReversiMainWindow : public KMainWindow
{
39
    Q_OBJECT
Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
40
public:
Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
41
    explicit KReversiMainWindow(QWidget* parent=0);
42
public slots:
Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
43
    void slotNewGame();
44
    void slotSkillChanged(int);
45
    void slotAnimSpeedChanged(int);
Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
46
    void slotUndo();
47
    void slotMoveFinished();
48
    void slotGameOver();
49
    void slotToggleDemoMode();
50
    void slotUseColoredChips(bool);
51
    void slotShowMovesHistory(bool);
52
    void slotComputerCantMove();
53
    void slotHighscores();
54
    void slotSeats();
Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
55 56
private:
    void setupActions();
57
    void loadSettings();
58

Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
59
    KReversiScene *m_scene;
60
    KReversiView  *m_view;
61 62
    KReversiGame  *m_game;
    QLabel        *m_historyLabel;
Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
63
    QListWidget   *m_historyView;
64

65 66 67
    QAction* m_undoAct;
    QAction* m_hintAct;
    QAction* m_demoAct;
68
    QAction* m_seatsAct;
69
    KSelectAction* m_animSpeedAct;
70
    KSelectAction* m_skillAct;
71
    KToggleAction* m_coloredChipsAct;
Dmitry Suzdalev's avatar
Dmitry Suzdalev committed
72 73
};
#endif