kscoredialog.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef KSCOREDIALOG_H
00026
#define KSCOREDIALOG_H
00027
00028
#include <qmap.h>
00029
#include <qptrlist.h>
00030
00031
#include <kdialogbase.h>
00032
00033
class QGridLayout;
00034
class QLineEdit;
00035
class QWidgetStack;
00036
00040 class KScoreDialog :
public KDialogBase {
00041 Q_OBJECT
00042
00043
public:
00044
enum Fields { Name = 1 << 0,
00045 Level = 1 << 1,
00046
00047 Custom1 = 1 << 10,
00048 Custom2 = 1 << 11,
00049 Custom3 = 1 << 12,
00050
00051 Time = 1 << 28,
00052 Score = 1 << 29 };
00053
00054
typedef QMap<int, QString> FieldInfo;
00055
00061
KScoreDialog(
int fields,
QWidget *parent=0,
const char *name=0);
00062
00063 ~
KScoreDialog();
00064
00069
void setConfigGroup(
const QString &group);
00070
00075
void setComment(
const QString &comment);
00076
00083
void addField(
int field,
const QString &header,
const QString &key);
00084
00096
int addScore(
int newScore,
const FieldInfo &newInfo,
bool askName,
bool lessIsMore);
00097
int addScore(
int newScore,
const FieldInfo &newInfo,
bool askName=
true);
00098
00102
int highScore();
00103
00104
virtual void show();
00105
00106
private slots:
00107
void slotGotReturn();
00108
void slotGotName();
00109
00110
private:
00111
00112
void loadScores();
00113
void saveScores();
00114
00115
void aboutToShow();
00116
void setupDialog();
00117
void keyPressEvent(
QKeyEvent *ev);
00118
00119
private:
00120
class KScoreDialogPrivate;
00121 KScoreDialogPrivate *d;
00122 };
00123
00124
#endif // !KSCOREDIALOG_H
This file is part of the documentation for libkdegames Library Version 3.2.3.