toruschess/src/game.h

79 lines
2.4 KiB
C
Raw Normal View History

2009-01-06 13:52:03 +00:00
/***************************************************************************
* Copyright (C) 2009 by Stefan Bühler *
* stbuehler@web.de *
* *
* 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
2009-02-19 21:39:33 +00:00
#ifndef TORUSCHESSGAME_H
#define TORUSCHESSGAME_H
2009-01-06 13:52:03 +00:00
#include <QWidget>
2009-01-06 16:02:15 +00:00
#include <QSvgRenderer>
#include <QMainWindow>
#include <QSize>
2009-02-02 14:30:05 +00:00
#include <QStackedLayout>
2009-01-06 13:52:03 +00:00
#include "toruschess.h"
2009-01-09 11:44:39 +00:00
#include "piecelibrary.h"
2009-01-06 13:52:03 +00:00
#include "optiondlg.h"
2009-02-02 14:30:05 +00:00
#include "field2d.h"
#include "field3d.h"
2009-01-06 16:02:15 +00:00
/**
@author Stefan Bühler <stbuehler@web.de>
*/
2009-01-06 13:52:03 +00:00
namespace toruschess {
2009-02-09 18:04:09 +00:00
class GameWidget : public QMainWindow {
2009-01-06 16:02:15 +00:00
Q_OBJECT
2009-01-06 13:52:03 +00:00
public:
2009-02-09 18:04:09 +00:00
GameWidget(QWidget *parent = 0);
2009-02-02 14:30:05 +00:00
ViewMode viewMode() const { return m_viewMode; }
public slots:
void setViewMode(ViewMode viewMode);
signals:
void changedViewMode(ViewMode viewMode);
2009-01-21 15:45:17 +00:00
private slots:
void gameChanged(GameState state);
void menuRestart();
void menuOptions();
2009-02-02 14:30:05 +00:00
void menuView2d();
void menuView3d();
void menuViewTorus();
2009-01-06 16:02:15 +00:00
private:
Game *m_game;
OptionDlg *m_optionDlg;
2009-02-02 14:30:05 +00:00
ViewMode m_viewMode;
QStackedLayout *m_fieldsLayout;
Field2D *m_field2d;
Field3D *m_field3d;
QAction *m_act_view_2d, *m_act_view_3d, *m_act_view_torus;
2009-01-06 13:52:03 +00:00
};
}
#endif