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

kblackbox

kbbmainwindow.h

Go to the documentation of this file.
00001 //
00002 // KBlackBox
00003 //
00004 // A simple game inspired by an emacs module
00005 //
00006 /***************************************************************************
00007  *   Copyright (c) 1999-2000, Robert Cimrman                               *
00008  *   cimrman3@students.zcu.cz                                              *
00009  *                                                                         *
00010  *   Copyright (c) 2007, Nicolas Roffet                                    *
00011  *   nicolas-kde@roffet.com                                                *
00012  *                                                                         *
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  *   This program is distributed in the hope that it will be useful,       *
00020  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00021  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00022  *   GNU General Public License for more details.                          *
00023  *                                                                         *
00024  *   You should have received a copy of the GNU General Public License     *
00025  *   along with this program; if not, write to the                         *
00026  *   Free Software Foundation, Inc.,                                       *
00027  *   51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA               *
00028  ***************************************************************************/
00029 
00030 #ifndef KBLACKBOX_KBBMAINWINDOW_H
00031 #define KBLACKBOX_KBBMAINWINDOW_H
00032 
00033 class QAction;
00034 class QWidget;
00035 
00036 class KGameClock;
00037 #include <kgamedifficulty.h>
00038 class KScoreDialog;
00039 #include <kxmlguiwindow.h>
00040 
00041 class KBBGameDoc;
00042 class KBBLevelConfigurationWidget;
00043 class KBBScalableGraphicWidget;
00044 class KBBThemeManager;
00045 class KBBTutorial;
00046 
00050 class KBBMainWindow : public KXmlGuiWindow
00051 {
00052     Q_OBJECT
00053 
00054 
00055     public:
00056         KBBMainWindow();
00057         ~KBBMainWindow();
00058 
00059 
00060     public slots:
00064         void levelChanged(KGameDifficulty::standardLevel level);
00065 
00069         void setRunning(bool r);
00070 
00074         void updateStats();
00075 
00076 
00077     private slots:
00084         void done();
00085 
00089         void newGame();
00090 
00094         void pause(bool state);
00095 
00099         void settingsChanged();
00100 
00104         void settingsDialog();
00105 
00109         void showHighscores();
00110 
00117         void solve();
00118 
00122         void startSandbox();
00123 
00127         void startTutorial();
00128 
00129 
00130     private:
00134         static const int SRUN = 0;
00135         static const int STIME = 1;
00136         static const int SSIZE = 2;
00137 
00138 
00144         bool mayAbortGame();
00145 
00146         void solving();
00147 
00151         void startGame(bool newSandboxModeMode);
00152 
00153 
00154         // Actions
00155         QAction *m_doneAction;
00156         QAction *m_pauseAction;
00157         QAction *m_solveAction;
00158 
00159 
00163         KBBGameDoc* m_gameDoc;
00164 
00168         KBBScalableGraphicWidget* m_gameWidget;
00169 
00170 
00171         // Custom difficulty level
00172         int m_customBallNumber;
00173         int m_customColumns;
00174         int m_customRows;
00175 
00176         // Various member variables
00177         int m_ballNumber;
00178         QWidget* m_centralWidget;
00179         int m_columns;
00180         KGameClock* m_gameClock;
00181         KGameDifficulty::standardLevel m_level;
00182         KBBLevelConfigurationWidget* m_levelConfig;
00183         int m_rows;
00184         bool m_boardEnabled;
00185         bool m_sandboxMode;
00186         KScoreDialog* m_scoreDialog;
00187         KBBThemeManager* m_themeManager;
00188         KBBTutorial* m_tutorial;
00189 };
00190 
00191 #endif // KBLACKBOX_KBBMAINWINDOW_H

kblackbox

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