#ifndef RULES_H
#define RULES_H

#include <qtabdialog.h>

class Rule;
class QLabel;
class QSpinBox;
class QCheckBox;

class Rules : public QTabDialog
{
	Q_OBJECT
	public:
		Rules(QWidget *parent = NULL, const char *name = NULL);
		~Rules();

		Rule *rules();

		QString name();
		void setName(QString name);

	private slots:
		void slotAccept();

	private:
		void setRules(Rule *rules);
		void saveRules(Rule *rules);
		Rule *loadRules();

		QSpinBox *player_lives, *player_power, *player_bombs;
		QLabel *lplayer_lives, *lplayer_power, *lplayer_bombs;
		QSpinBox *monster_lives, *monster_power, *monster_bombs, *monster_blast;
		QLabel *lmonster_lives, *lmonster_power, *lmonster_bombs, *lmonster_blast;
		QSpinBox *map_grail, *map_speed, *map_power, *map_life, *map_bombs, *map_flash, *map_invisible;
		QLabel *lmap_grail, *lmap_speed, *lmap_power, *lmap_life, *lmap_bombs, *lmap_flash, *lmap_invisible;
		QSpinBox *rules_bombduration, *rules_screepercentage;
		QLabel *lrules_bombduration, *lrules_screepercentage;
		QCheckBox *rules_bombdestroy, *rules_bomblock, *rules_timebomballowed, *rules_moveablebomballowed;
		QLabel *lrules_bombdestroy, *lrules_bomblock, *lrules_timebomballowed, *lrules_moveablebomballowed;
		QCheckBox *rules_walldamage, *rules_grounddamage;
		QLabel *lrules_walldamage, *lrules_grounddamage;
		QString m_rulesname;
};

#endif

