• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kmahjongg

kmahjongg.h

Go to the documentation of this file.
00001 /*
00002     kmahjongg, the classic mahjongg game for KDE project
00003 
00004     Copyright (C) 1997 Mathias Mueller   <in5y158@public.uni-hamburg.de>
00005     Copyright (C) 2006-2007 Mauricio Piacentini   <mauricio@tabuleiro.com>
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00020 
00021 */
00022 
00023 #ifndef _KMAHJONGG_H
00024 #define _KMAHJONGG_H
00025 
00026 #include <kxmlguiwindow.h>
00027 
00028 #include "KmTypes.h"
00029 #include "kmahjonggtileset.h"
00030 #include "kmahjonggbackground.h"
00031 #include "BoardLayout.h"
00032 #include "boardwidget.h"
00033 
00034 class QAction;
00035 class KToggleAction;
00036 class QLabel;
00037 class KGameClock;
00038 
00044 class KMahjongg : public KXmlGuiWindow
00045 {
00046     Q_OBJECT
00047 
00048     public:
00051         explicit KMahjongg( QWidget* parent = 0 );
00054         ~KMahjongg();
00055 
00056     public slots:
00059     void startNewGame( int num = -1 );
00065     void showStatusText ( const QString &msg, long board);
00072     void showTileNumber( int iMaximum, int iCurrent, int iLeft );
00075     void demoModeChanged( bool bActive );
00081     void gameOver( unsigned short removed, unsigned short cheats);
00084 //  void loadBoardLayout(const QString &file);
00087     void setDisplayedWidth();
00090     void newGame();
00093     void timerReset();
00094 
00095 private slots:
00096   void showSettings();
00097 
00098   void startNewNumeric();
00099   void saveGame();
00100   void loadGame();
00101   void restartGame();
00102   void undo();
00103   void redo();
00104   void pause();
00105   void demoMode();
00106   void displayTime(const QString& timestring);
00107   void showHighscores();
00108   //void slotBoardEditor();
00109 
00110 protected:
00113     void setupKAction();
00116     void setupStatusBar();
00117 
00118 private:
00119   // number of seconds since the start of the game
00120   unsigned long gameElapsedTime;
00121   BoardWidget* bw;
00122 
00123   QLabel *gameNumLabel;
00124   QLabel *tilesLeftLabel;
00125   QLabel *statusLabel;
00126   QLabel *gameTimerLabel;
00127 
00128   KGameClock    *gameTimer;
00129 
00130   bool         bDemoModeActive;
00131 
00132   KToggleAction *pauseAction, *demoAction;
00133   QAction *undoAction, *redoAction;
00134 
00135 };
00136 
00137 #endif
00138 

kmahjongg

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

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal