SVN_SILENT made messages (.desktop file)
[kdegames.git] / kmahjongg / kmahjongg.h
blobbcaf467a5e42aeb0f8ad9161651892b4ec968fee
1 /*
2 kmahjongg, the classic mahjongg game for KDE project
4 Copyright (C) 1997 Mathias Mueller <in5y158@public.uni-hamburg.de>
5 Copyright (C) 2006-2007 Mauricio Piacentini <mauricio@tabuleiro.com>
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.
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.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef _KMAHJONGG_H
24 #define _KMAHJONGG_H
26 #include <kxmlguiwindow.h>
28 #include "KmTypes.h"
29 #include "kmahjonggtileset.h"
30 #include "kmahjonggbackground.h"
31 #include "BoardLayout.h"
32 #include "boardwidget.h"
34 class QAction;
35 class KToggleAction;
36 class QLabel;
37 class KGameClock;
39 /**
40 @short Class Description
42 @author Mathias
44 class KMahjongg : public KXmlGuiWindow
46 Q_OBJECT
48 public:
49 /**
50 * Constructor @param parent */
51 explicit KMahjongg( QWidget* parent = 0 );
52 /**
53 * Default Destructor */
54 ~KMahjongg();
56 public slots:
57 /**
58 * Slot Description @param num */
59 void startNewGame( int num = -1 );
60 /**
61 * Slot Description
62 * @param msg
63 * @param board
65 void showStatusText ( const QString &msg, long board);
66 /**
67 * Slot Description
68 * @param iMaximum
69 * @param iCurrent
70 * @param iLeft
72 void showTileNumber( int iMaximum, int iCurrent, int iLeft );
73 /**
74 * Slot Description @param bActive */
75 void demoModeChanged( bool bActive );
76 /**
77 * Slot Description
78 * @param removed
79 * @param cheats
81 void gameOver( unsigned short removed, unsigned short cheats);
82 /**
83 * Load BoardLayout from file @param file*/
84 // void loadBoardLayout(const QString &file);
85 /**
86 * Slot Description */
87 void setDisplayedWidth();
88 /**
89 * Slot Description */
90 void newGame();
91 /**
92 * Slot Description */
93 void timerReset();
95 private slots:
96 void showSettings();
98 void startNewNumeric();
99 void saveGame();
100 void loadGame();
101 void restartGame();
102 void undo();
103 void redo();
104 void pause();
105 void demoMode();
106 void displayTime(const QString& timestring);
107 void showHighscores();
108 //void slotBoardEditor();
110 protected:
112 * Method Description */
113 void setupKAction();
115 * Method Description */
116 void setupStatusBar();
118 private:
119 // number of seconds since the start of the game
120 unsigned long gameElapsedTime;
121 BoardWidget* bw;
123 QLabel *gameNumLabel;
124 QLabel *tilesLeftLabel;
125 QLabel *statusLabel;
126 QLabel *gameTimerLabel;
128 KGameClock *gameTimer;
130 bool bDemoModeActive;
132 KToggleAction *pauseAction, *demoAction;
133 QAction *undoAction, *redoAction;
137 #endif