diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | c90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch) | |
tree | 6d8391395bce9eaea4ad78958617edb20c6a7573 /kmines/dialogs.h | |
download | tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmines/dialogs.h')
-rw-r--r-- | kmines/dialogs.h | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/kmines/dialogs.h b/kmines/dialogs.h new file mode 100644 index 00000000..12dde5ac --- /dev/null +++ b/kmines/dialogs.h @@ -0,0 +1,125 @@ +/* + * Copyright (c) 1996-2003 Nicolas HADACEK ([email protected]) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef DIALOGS_H +#define DIALOGS_H + +#include <qpushbutton.h> + +#include <kgamelcd.h> +#include <kexthighscore.h> + +#include "defines.h" +#include "settings.h" + +class KComboBox; +class KIntNumInput; + +//----------------------------------------------------------------------------- +class Smiley : public QPushButton, public KMines +{ + Q_OBJECT + public: + Smiley(QWidget *parent, const char *name = 0) + : QPushButton(QString::null, parent, name) {} + + public slots: + void setMood(Mood); + + private: + static const char **XPM_NAMES[NbMoods]; +}; + +//----------------------------------------------------------------------------- +class DigitalClock : public KGameLCDClock +{ + Q_OBJECT + public: + DigitalClock(QWidget *parent); + + void reset(bool customGame); + + bool cheating() const { return _cheating; } + uint nbActions() const { return _nbActions; } + KExtHighscore::Score score() const; + + public slots: + void start(); + void setCheating(); + void addAction() { _nbActions++; } + + private slots: + void timeoutClock(); + + private: + KExtHighscore::Score _first, _last; + uint _nbActions; + bool _cheating, _customGame; +}; + +//----------------------------------------------------------------------------- +class CustomConfig : public QWidget, public KMines +{ + Q_OBJECT + public: + CustomConfig(); + + static const uint maxWidth; + static const uint minWidth; + static const uint maxHeight; + static const uint minHeight; + + void init() { updateNbMines(); } + + private slots: + void typeChosen(int); + void updateNbMines(); + + private: + bool _block; + KIntNumInput *_width, *_height, *_mines; + KComboBox *_gameType; +}; + +//----------------------------------------------------------------------------- +class GameConfig : public QWidget, public KMines +{ + Q_OBJECT + public: + GameConfig(); + + static void saveLevel(Level::Type); + + void init() { _magicDialogEnabled = true; } + + private slots: + void magicModified(bool); + + private: + bool _magicDialogEnabled; + +}; + +class AppearanceConfig : public QWidget, public KMines +{ + Q_OBJECT + public: + AppearanceConfig(); +}; + +#endif |