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

libtdegames

  • libtdegames
  • highscore
kscoredialog.h
1 /****************************************************************
2 Copyright (c) 1998 Sandro Sigala <ssigala@globalnet.it>.
3 Copyright (c) 2001 Waldo Bastian <bastian@kde.org>
4 All rights reserved.
5 
6 Permission to use, copy, modify, and distribute this software
7 and its documentation for any purpose and without fee is hereby
8 granted, provided that the above copyright notice appear in all
9 copies and that both that the copyright notice and this
10 permission notice and warranty disclaimer appear in supporting
11 documentation, and that the name of the author not be used in
12 advertising or publicity pertaining to distribution of the
13 software without specific, written prior permission.
14 
15 The author disclaim all warranties with regard to this
16 software, including all implied warranties of merchantability
17 and fitness. In no event shall the author be liable for any
18 special, indirect or consequential damages or any damages
19 whatsoever resulting from loss of use, data or profits, whether
20 in an action of contract, negligence or other tortious action,
21 arising out of or in connection with the use or performance of
22 this 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>
33 class TQGridLayout;
34 class TQLineEdit;
35 class TQWidgetStack;
36 
40 class TDE_EXPORT KScoreDialog : public KDialogBase {
41  TQ_OBJECT
42 
43 
44 public:
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 
108 private slots:
109  void slotGotReturn();
110  void slotGotName();
111 
112 private:
113  /* read scores */
114  void loadScores();
115  void saveScores();
116 
117  void aboutToShow();
118  void setupDialog();
119  void keyPressEvent( TQKeyEvent *ev);
120 
121 private:
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.8.13
This website is maintained by Timothy Pearson.