kblackbox
kbbmainwindow.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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
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
00172 int m_customBallNumber;
00173 int m_customColumns;
00174 int m_customRows;
00175
00176
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