• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libtdegames
 

libtdegames

  • libtdegames
  • highscore
kscoredialog.h
1/****************************************************************
2Copyright (c) 1998 Sandro Sigala <ssigala@globalnet.it>.
3Copyright (c) 2001 Waldo Bastian <bastian@kde.org>
4All rights reserved.
5
6Permission to use, copy, modify, and distribute this software
7and its documentation for any purpose and without fee is hereby
8granted, provided that the above copyright notice appear in all
9copies and that both that the copyright notice and this
10permission notice and warranty disclaimer appear in supporting
11documentation, and that the name of the author not be used in
12advertising or publicity pertaining to distribution of the
13software without specific, written prior permission.
14
15The author disclaim all warranties with regard to this
16software, including all implied warranties of merchantability
17and fitness. In no event shall the author be liable for any
18special, indirect or consequential damages or any damages
19whatsoever resulting from loss of use, data or profits, whether
20in an action of contract, negligence or other tortious action,
21arising out of or in connection with the use or performance of
22this software.
23****************************************************************/
24
25#ifndef KSCOREDIALOG_H
26#define KSCOREDIALOG_H
27
28#include <tqmap.h>
29#include <tqptrlist.h>
30
31#include <kdialogbase.h>
32#include <tdemacros.h>
33class TQGridLayout;
34class TQLineEdit;
35class TQWidgetStack;
36
40class TDE_EXPORT KScoreDialog : public KDialogBase {
41 TQ_OBJECT
42
43
44public:
45 enum Fields { Name = 1 << 0,
46 Level = 1 << 1,
47
48 Custom1 = 1 << 10,
49 Custom2 = 1 << 11,
50 Custom3 = 1 << 12,
51
52 Date = 1 << 27,
53 Time = 1 << 28,
54 Score = 1 << 29 };
55
56 typedef TQMap<int, TQString> FieldInfo;
57
63 KScoreDialog(int fields, TQWidget *parent=0, const char *name=0);
64
65 ~KScoreDialog();
66
71 void setConfigGroup(const TQString &group);
72
77 void setComment(const TQString &comment);
78
85 void addField(int field, const TQString &header, const TQString &key);
86
98 int addScore(int newScore, const FieldInfo &newInfo, bool askName, bool lessIsMore);
99 int addScore(int newScore, const FieldInfo &newInfo, bool askName=true);
100
104 int highScore();
105
106 virtual void show();
107
108private slots:
109 void slotGotReturn();
110 void slotGotName();
111
112private:
113 /* read scores */
114 void loadScores();
115 void saveScores();
116
117 void aboutToShow();
118 void setupDialog();
119 void keyPressEvent( TQKeyEvent *ev);
120
121private:
122 class KScoreDialogPrivate;
123 KScoreDialogPrivate *d;
124};
125
126#endif // !KSCOREDIALOG_H
KScoreDialog
A simple high score dialog.
Definition: kscoredialog.h:40

libtdegames

Skip menu "libtdegames"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

libtdegames

Skip menu "libtdegames"
  • libtdegames
Generated for libtdegames by doxygen 1.9.4
This website is maintained by Timothy Pearson.