File indexing completed on 2024-04-28 04:03:29

0001 /*
0002     SPDX-FileCopyrightText: 2007 Paolo Capriotti <p.capriotti@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef MAINWINDOW_H
0008 #define MAINWINDOW_H
0009 
0010 class KGameDifficultyLevel;
0011 #include <KXmlGuiWindow>
0012 #include "ui_preferences.h"
0013 
0014 class QLabel;
0015 class MainArea;
0016 
0017 class MainWindow : public KXmlGuiWindow
0018 {
0019 Q_OBJECT
0020 public:
0021     MainWindow();
0022     ~MainWindow() override;
0023 protected:
0024     void setupActions();
0025 protected Q_SLOTS:
0026     void setGameTime(int time);
0027     void setBallNumber(int number);
0028     
0029     void newGame();
0030     void gameOver(int);
0031     void highscores();
0032     void changeState(bool);
0033     void pause(bool);
0034 private:
0035     QLabel* m_balls_label = nullptr;
0036     QLabel* m_time_label = nullptr;
0037     Ui_Preferences m_pref_ui;
0038     MainArea* m_main = nullptr;
0039     const KGameDifficultyLevel* m_lastUsedDifficulty = nullptr;
0040 
0041     void showCursor(bool show);
0042 
0043 };
0044 
0045 
0046 #endif // MAINWINDOW_H
0047