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

kmahjongg

  • sources
  • kde-4.14
  • kdegames
  • kmahjongg
kmahjongg.h
Go to the documentation of this file.
1 /* kmahjongg, the classic mahjongg game for KDE project
2  *
3  * Copyright (C) 1997 Mathias Mueller <in5y158@public.uni-hamburg.de>
4  * Copyright (C) 2006-2007 Mauricio Piacentini <mauricio@tabuleiro.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
19 
20 #ifndef _KMAHJONGG_H
21 #define _KMAHJONGG_H
22 
23 
24 #include <kxmlguiwindow.h>
25 
26 #include "KmTypes.h"
27 #include "kmahjonggtileset.h"
28 #include "kmahjonggbackground.h"
29 #include "BoardLayout.h"
30 #include "boardwidget.h"
31 
32 
33 class QAction;
34 class KToggleAction;
35 class QLabel;
36 class KGameClock;
37 class Editor;
38 
43 class KMahjongg : public KXmlGuiWindow
44 {
45  Q_OBJECT
46 
47 public:
52  explicit KMahjongg(QWidget *parent = 0);
53 
56  ~KMahjongg();
57 
58 public slots:
63  void startNewGame(int num = -1);
64 
70  void showStatusText(const QString &msg, long board);
71 
78  void showTileNumber(int iMaximum, int iCurrent, int iLeft);
79 
84  void demoModeChanged(bool bActive);
85 
91  void gameOver(unsigned short removed, unsigned short cheats);
92 
97 // void loadBoardLayout(const QString &file);
98 
101  void setDisplayedWidth();
102 
105  void newGame();
106 
109  void timerReset();
110 
111 protected:
114  void setupKAction();
115 
118  void setupStatusBar();
119 
122  void changeEvent(QEvent *event);
123 
124 private slots:
125  void showSettings();
126  void startNewNumeric();
127  void saveGame();
128  void loadGame();
129  void restartGame();
130  void undo();
131  void redo();
132  void pause();
133  void demoMode();
134  void displayTime(const QString& timestring);
135  void showHighscores();
136  void slotBoardEditor();
137 
138 private:
139  unsigned long gameElapsedTime;
140  bool bDemoModeActive;
141  bool mFinished;
142 
143  BoardWidget *bw;
144 
145  Editor *boardEditor;
146 
147  QLabel *gameNumLabel;
148  QLabel *tilesLeftLabel;
149  QLabel *statusLabel;
150  QLabel *gameTimerLabel;
151 
152  QAction *undoAction;
153  QAction *redoAction;
154 
155  KGameClock *gameTimer;
156 
157  KToggleAction *pauseAction;
158  KToggleAction *demoAction;
159 };
160 
161 
162 #endif
QEvent
QWidget
KMahjongg
Class Description.
Definition: kmahjongg.h:43
KMahjongg::KMahjongg
KMahjongg(QWidget *parent=0)
Constructor.
Definition: kmahjongg.cpp:81
KmTypes.h
KMahjongg::setupKAction
void setupKAction()
Method Description.
Definition: kmahjongg.cpp:127
KMahjongg::setupStatusBar
void setupStatusBar()
Method Description.
Definition: kmahjongg.cpp:179
KXmlGuiWindow
KMahjongg::demoModeChanged
void demoModeChanged(bool bActive)
Slot Description.
Definition: kmahjongg.cpp:429
KMahjongg::newGame
void newGame()
Slot Description.
Definition: kmahjongg.cpp:308
KMahjongg::showStatusText
void showStatusText(const QString &msg, long board)
Slot Description.
Definition: kmahjongg.cpp:403
boardwidget.h
KMahjongg::showTileNumber
void showTileNumber(int iMaximum, int iCurrent, int iLeft)
Slot Description.
Definition: kmahjongg.cpp:410
KMahjongg::timerReset
void timerReset()
Slot Description.
Definition: kmahjongg.cpp:330
QString
BoardLayout.h
KMahjongg::gameOver
void gameOver(unsigned short removed, unsigned short cheats)
Slot Description.
Definition: kmahjongg.cpp:351
KMahjongg::startNewGame
void startNewGame(int num=-1)
Slot Description.
Definition: kmahjongg.cpp:313
Editor
This class implements.
Definition: Editor.h:46
QAction
KMahjongg::~KMahjongg
~KMahjongg()
Default Destructor.
Definition: kmahjongg.cpp:121
KMahjongg::setDisplayedWidth
void setDisplayedWidth()
Load BoardLayout from file.
Definition: kmahjongg.cpp:211
KMahjongg::changeEvent
void changeEvent(QEvent *event)
Method Override.
Definition: kmahjongg.cpp:339
QLabel
BoardWidget
Where all the funn happens.
Definition: boardwidget.h:52
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmahjongg

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