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

kblackbox

  • sources
  • kde-4.14
  • kdegames
  • kblackbox
kbbmainwindow.h
Go to the documentation of this file.
1 //
2 // KBlackBox
3 //
4 // A simple game inspired by an emacs module
5 //
6 /***************************************************************************
7  * Copyright (c) 1999-2000, Robert Cimrman *
8  * cimrman3@students.zcu.cz *
9  * *
10  * Copyright (c) 2007, Nicolas Roffet *
11  * nicolas-kde@roffet.com *
12  * *
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  * This program is distributed in the hope that it will be useful, *
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22  * GNU General Public License for more details. *
23  * *
24  * You should have received a copy of the GNU General Public License *
25  * along with this program; if not, write to the *
26  * Free Software Foundation, Inc., *
27  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA *
28  ***************************************************************************/
29 
30 #ifndef KBLACKBOX_KBBMAINWINDOW_H
31 #define KBLACKBOX_KBBMAINWINDOW_H
32 
33 class QAction;
34 class QWidget;
35 
36 class KGameClock;
37 #include <kxmlguiwindow.h>
38 #include <KgDifficulty>
39 
40 class KBBGameDoc;
41 class KBBLevelConfigurationWidget;
42 class KBBScalableGraphicWidget;
43 class KBBThemeManager;
44 class KBBTutorial;
45 
49 class KBBMainWindow : public KXmlGuiWindow
50 {
51  Q_OBJECT
52 
53 
54  public:
55  KBBMainWindow();
56  ~KBBMainWindow();
57 
58 
59  public slots:
63  void levelChanged();
64 
68  void setRunning(bool r);
69 
73  void updateStats();
74 
75 
76  private slots:
83  void done();
84 
88  void newGame();
89 
93  void pause(bool state);
94 
98  void settingsChanged();
99 
103  void settingsDialog();
104 
108  void showHighscores();
109 
116  void solve();
117 
121  void startSandbox();
122 
126  void startTutorial();
127 
128 
129  private:
133  static const int SRUN = 0;
134  static const int STIME = 1;
135  static const int SSIZE = 2;
136 
137 
143  bool mayAbortGame();
144 
145  void solving();
146 
150  void startGame(bool newSandboxModeMode);
151 
152 
153  // Actions
154  QAction *m_doneAction;
155  QAction *m_pauseAction;
156  QAction *m_solveAction;
157 
158 
162  KBBGameDoc* m_gameDoc;
163 
167  KBBScalableGraphicWidget* m_gameWidget;
168 
169 
170  // Custom difficulty level
171  int m_customBallNumber;
172  int m_customColumns;
173  int m_customRows;
174 
175  // Various member variables
176  int m_ballNumber;
177  QWidget* m_centralWidget;
178  int m_columns;
179  KGameClock* m_gameClock;
180  KgDifficultyLevel::StandardLevel m_level;
181  KBBLevelConfigurationWidget* m_levelConfig;
182  int m_rows;
183  bool m_boardEnabled;
184  bool m_sandboxMode;
185  KBBThemeManager* m_themeManager;
186  KBBTutorial* m_tutorial;
187 };
188 
189 #endif // KBLACKBOX_KBBMAINWINDOW_H
QWidget
KBBMainWindow::levelChanged
void levelChanged()
Player changed the level.
Definition: kbbmainwindow.cpp:225
KBBScalableGraphicWidget
Scalable graphic central widget for KBlackBox.
Definition: kbbscalablegraphicwidget.h:62
KBBMainWindow::KBBMainWindow
KBBMainWindow()
Definition: kbbmainwindow.cpp:67
KBBGameDoc
Game document (Logical board)
Definition: kbbgamedoc.h:56
KBBMainWindow::updateStats
void updateStats()
Displays game statistics on the status bar.
Definition: kbbmainwindow.cpp:288
KXmlGuiWindow
KBBTutorial
Tutorial widget.
Definition: kbbtutorial.h:51
KBBMainWindow::~KBBMainWindow
~KBBMainWindow()
Definition: kbbmainwindow.cpp:211
KBBMainWindow
Main window of the game KBlackBox.
Definition: kbbmainwindow.h:49
KBBLevelConfigurationWidget
Widget to configure the level difficulty.
Definition: kbblevelconfigurationwidget.h:28
QAction
KBBMainWindow::setRunning
void setRunning(bool r)
Set if the game is running.
Definition: kbbmainwindow.cpp:271
KBBThemeManager
Theme manager of the scalable graphic widget.
Definition: kbbthememanager.h:51
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kblackbox

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