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

KShisen

  • sources
  • kde-4.14
  • kdegames
  • kshisen
  • src
app.h
Go to the documentation of this file.
1 /***************************************************************************
2  * KShisen - A japanese game similar to mahjongg *
3  * Copyright 1997 Mario Weilguni <mweilguni@sime.com> *
4  * Copyright 2002-2004 Dave Corrie <kde@davecorrie.com> *
5  * Copyright 2009,2010 Frederik Schwarzer <schwarzer@kde.org> *
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
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 APP_H
22 #define APP_H
23 
24 #include <kxmlguiwindow.h>
25 
26 class QLabel;
27 
28 class Board;
29 
33 class App : public KXmlGuiWindow
34 {
35  Q_OBJECT
36 
37 public:
38  explicit App(QWidget *parent = 0);
39 
40 private slots:
41  void slotEndOfGame();
42 
47  void updateItems();
49  void updateTimeDisplay();
51  void updateTileDisplay();
53  void updateCheatDisplay();
55  void showSettingsDialog(); // const?
56 
57  void notifyTilesDoNotMatch();
58  void notifyInvalidMove();
59  void notifySelectATile();
60  void notifySelectAMatchingTile();
61  void notifySelectAMove();
62 
66  void newGame();
67 
74  void restartGame();
75  // void isSolvable(); // currently not used
77  void togglePause();
78 
83  void setPauseEnabled(bool enable);
84 
89  void undo();
91  void redo();
92 
97  void hint();
99  void keyBindings();
101  void showHighscores(); // const?
102 
103 signals:
111  void invokeNewGame();
112 
113 private:
115  int score(int x, int y, int seconds, bool gravity) const;
116 
124  void setupStatusBar();
126  void setupActions();
128  void setCheatModeEnabled(bool enabled);
129 
130 private:
131  QLabel *m_gameTipLabel;
132  QLabel *m_gameTimerLabel;
133  QLabel *m_gameTilesLabel;
134  QLabel *m_gameCheatLabel;
135  Board *m_board;
136 };
137 
138 #endif // APP_H
139 
140 // vim: expandtab:tabstop=4:shiftwidth=4
141 // kate: space-indent on; indent-width 4
QWidget
Board
Class holding the game board and its functions.
Definition: board.h:136
KXmlGuiWindow
App::invokeNewGame
void invokeNewGame()
Invokes the creation of a new game.
App::App
App(QWidget *parent=0)
Definition: app.cpp:68
QLabel
App
Class holding the application and its functions.
Definition: app.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KShisen

Skip menu "KShisen"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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