
#include <qdialog.h>
#include <qlistbox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlist.h>

#include <stdio.h>

#define MAX_HIGHSCORES 5

class CListElement
{
 public:
	CListElement(int s, QString n) { _score = s; _name = n; }
	int _score;
	QString _name;
};	

class CHighscoreDialog : public QDialog
{
	Q_OBJECT
 public:
	CHighscoreDialog(QWidget* parent,int ys);
	void initializeDialog();
	virtual ~CHighscoreDialog();

 protected:
	QString nameDialog();

	void getHighscoreFile(char* name);
	char readList();
	bool writeList();
	
	int _yourScore; // value 0 means: called outside of a game

	QLabel* _yourResult;
	QListBox* _listBox;
	QPushButton* _ok;

	QList<CListElement>* _list;
};
