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

ksquares

  • sources
  • kde-4.14
  • kdegames
  • ksquares
  • src
ksquareswindow.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2006 by Matthew Williams <matt@milliams.com> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  ***************************************************************************/
9 
10 #ifndef KSQUARESWINDOW_H
11 #define KSQUARESWINDOW_H
12 
13 #include <KXmlGuiWindow>
14 
15 #include "ksquaresgame.h"
16 #include "ui_prefs_ai.h"
17 #include "ui_prefs_display.h"
18 
19 class KToggleAction;
20 class GameBoardView;
21 class GameBoardScene;
22 
31 class KSquaresWindow : public KXmlGuiWindow
32 {
33  Q_OBJECT
34 
35  public:
37  KSquaresWindow();
38  ~KSquaresWindow();
39 
40  public slots:
41  void showHighscores();
42  //void configureHighscores();
44  void gameNew();
46  void gameReset();
47 
48  private slots:
49  void aiChooseLine(); // testing only
50  void initObject();
51  void optionsPreferences();
52  void playerTakeTurn(KSquaresPlayer* currentPlayer);
53  void gameOver(const QVector<KSquaresPlayer> &_playerList); //when KSquaresGame says the game is over. Display score board
54 
55  private:
56  enum StatusBarItem
57  {
58  statusplayer,
59  statusnetwork
60  };
61 
62  //void setupAccel();
63  void setupActions();
64  Ui::prefs_ai ui_prefs_ai;
65  Ui::prefs_display ui_prefs_display;
67  GameBoardView *m_view;
69  GameBoardScene *m_scene;
71  KSquaresGame* sGame;
72  // Remember last network move
73  int m_lastx1, m_lasty1, m_lastx2, m_lasty2;
74 
75  //KToggleAction *m_toolbarAction;
76  //KToggleAction *m_statusbarAction;
77 };
78 
79 #endif // KSQUARESWINDOW_H
KSquaresPlayer
Player class for KSquares.
Definition: ksquaresplayer.h:23
KSquaresWindow::~KSquaresWindow
~KSquaresWindow()
Definition: ksquareswindow.cpp:45
KSquaresGame
The game controller.
Definition: ksquaresgame.h:44
GameBoardScene
Scene for displaying the game board.
Definition: gameboardscene.h:27
KSquaresWindow::gameReset
void gameReset()
Start a new game with the same settings (read from KConfig Settings)
Definition: ksquareswindow.cpp:143
KSquaresWindow::showHighscores
void showHighscores()
Definition: ksquareswindow.cpp:68
KXmlGuiWindow
ksquaresgame.h
KSquaresWindow::gameNew
void gameNew()
Launch the new game dialog and create a new game.
Definition: ksquareswindow.cpp:77
QVector< KSquaresPlayer >
KSquaresWindow
Mainwindow class.
Definition: ksquareswindow.h:31
KSquaresWindow::KSquaresWindow
KSquaresWindow()
Constructor.
Definition: ksquareswindow.cpp:39
GameBoardView
Actual game board widget.
Definition: gameboardview.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ksquares

Skip menu "ksquares"
  • 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