You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdegames/kmines/dialogs.h

131 lines
2.9 KiB

/*
* Copyright (c) 1996-2003 Nicolas HADACEK (hadacek@kde.org)
*
* 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 <tqpushbutton.h>
#include <kgamelcd.h>
#include <highscore/kexthighscore.h>
#include "defines.h"
#include "settings.h"
class KComboBox;
class KIntNumInput;
//-----------------------------------------------------------------------------
class Smiley : public TQPushButton, public KMines
{
TQ_OBJECT
public:
Smiley(TQWidget *parent, const char *name = 0)
: TQPushButton(TQString(), parent, name) {}
public slots:
void setMood(Mood);
private:
static const char **XPM_NAMES[NbMoods];
};
//-----------------------------------------------------------------------------
class DigitalClock : public KGameLCDClock
{
TQ_OBJECT
public:
DigitalClock(TQWidget *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 TQWidget, public KMines
{
TQ_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 TQWidget, public KMines
{
TQ_OBJECT
public:
GameConfig();
static void saveLevel(Level::Type);
void init() { _magicDialogEnabled = true; }
private slots:
void magicModified(bool);
private:
bool _magicDialogEnabled;
};
class AppearanceConfig : public TQWidget, public KMines
{
TQ_OBJECT
public:
AppearanceConfig();
};
#endif