• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

kigo

  • sources
  • kde-4.14
  • kdegames
  • kigo
  • src
  • gui
mainwindow.h
Go to the documentation of this file.
1 /*
2  Copyright 2008 Sascha Peilicke <sasch.pe@gmx.de>
3 
4  This program is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public License as
6  published by the Free Software Foundation; either version 2 of
7  the License or (at your option) version 3 or any later version
8  accepted by the membership of KDE e.V. (or its successor approved
9  by the membership of KDE e.V.), which shall act as a proxy
10  defined in Section 14 of version 3 of the license.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef KIGO_MAINWINDOW_H
22 #define KIGO_MAINWINDOW_H
23 
24 #include <KXmlGuiWindow>
25 
26 class KAction;
27 class KToggleAction;
28 class QDockWidget;
29 class QUndoView;
30 
31 namespace Kigo {
32 
33 class Game;
34 class GameScene;
35 class GameView;
36 class Player;
37 class SetupWidget;
38 
46 class MainWindow : public KXmlGuiWindow
47 {
48  Q_OBJECT
49 
50 public:
51  explicit MainWindow(const QString &fileName = "", QWidget *parent = 0);
52 
53 private slots:
54  void newGame();
55  void loadGame();
56  bool loadGame(const QString &fileName);
57  void getMoreGames();
58  void backendError();
59  void saveGame();
60  void startGame();
61  void finishGame();
62  void undo();
63  void redo();
64  void pass();
65  void hint();
66  void showPreferences();
67  void applyPreferences();
68  void showBusy(bool busy);
69  void showFinishGameAction();
70  void playerChanged();
71  void generateMove();
72  void passMovePlayed(const Player &);
73 
74 private:
75  void setupActions();
76  void setupDockWindows();
77 
78  bool isBackendWorking();
79 
80  Game *m_game;
81  GameScene *m_gameScene;
82  GameView *m_gameView;
83 
84  SetupWidget *m_setupWidget;
85  QUndoView *m_undoView;
86 
87  QDockWidget *m_setupDock;
88  QDockWidget *m_gameDock;
89  QDockWidget *m_movesDock;
90  QDockWidget *m_errorDock;
91 
92  KAction *m_newGameAction;
93  KAction *m_loadGameAction;
94  KAction *m_getMoreGamesAction;
95  KAction *m_saveAction;
96  KAction *m_undoMoveAction;
97  KAction *m_redoMoveAction;
98  KAction *m_passMoveAction;
99  KAction *m_hintAction;
100  KAction *m_startGameAction;
101  KAction *m_finishGameAction;
102  KToggleAction *m_moveNumbersAction;
103 };
104 
105 } // End of namespace Kigo
106 
107 #endif
QWidget
Kigo::GameScene
This class provides a graphical representation of the go game using QGraphicsScene.
Definition: gamescene.h:43
QDockWidget
Kigo::MainWindow
The MainWindow class acts as the main window for the Kigo graphical user interface.
Definition: mainwindow.h:46
Kigo::SetupWidget
Definition: setupwidget.h:36
KXmlGuiWindow
QUndoView
QString
Kigo::Player
The Player class holds all basic attributes of a Go player.
Definition: player.h:36
Kigo::MainWindow::MainWindow
MainWindow(const QString &fileName="", QWidget *parent=0)
Definition: mainwindow.cpp:51
Kigo::GameView
This class represents a view on a Go game view.
Definition: gameview.h:37
Kigo::Game
The Game class implements the Go game and acts as a wrapper around a remote Go Game game implementing...
Definition: game.h:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kigo

Skip menu "kigo"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal