summaryrefslogtreecommitdiff
path: root/noncore/games/tetrix/ohighscoredlg.h
Unidiff
Diffstat (limited to 'noncore/games/tetrix/ohighscoredlg.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/tetrix/ohighscoredlg.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/noncore/games/tetrix/ohighscoredlg.h b/noncore/games/tetrix/ohighscoredlg.h
index fdbe623..845e639 100644
--- a/noncore/games/tetrix/ohighscoredlg.h
+++ b/noncore/games/tetrix/ohighscoredlg.h
@@ -3,30 +3,31 @@
3 * This program is free software; you can redistribute it and/or modify * 3 * This program is free software; you can redistribute it and/or modify *
4 * it under the terms of the GNU General Public License as published by * 4 * it under the terms of the GNU General Public License as published by *
5 * the Free Software Foundation; either version 2 of the License, or * 5 * the Free Software Foundation; either version 2 of the License, or *
6 * ( at your option ) any later version. * 6 * ( at your option ) any later version. *
7 * * 7 * *
8 **************************************************************************/ 8 **************************************************************************/
9 9
10class QWidget; 10class QWidget;
11class QVBoxLayout; 11class QVBoxLayout;
12class QListView; 12class QListView;
13 13
14#include <qdialog.h> 14#include <qdialog.h>
15#include <list> 15#include <qlist.h>
16 16
17using namespace std; 17class t_playerData
18
19struct t_playerData
20{ 18{
19
20public :
21
21 QString sName; 22 QString sName;
22 int points; 23 int points;
23 int level; 24 int level;
24}; 25};
25 26
26class OHighscore : public QWidget 27class OHighscore : public QWidget
27{ 28{
28 Q_OBJECT 29 Q_OBJECT
29 30
30 public: 31 public:
31 /* 32 /*
32 *An OHighscore-Object contains all Points, level and playernames sorted in a stl::vector 33 *An OHighscore-Object contains all Points, level and playernames sorted in a stl::vector
@@ -36,34 +37,32 @@ class OHighscore : public QWidget
36 ~OHighscore(); 37 ~OHighscore();
37 38
38 /* 39 /*
39 * is true if the player did a new highscore 40 * is true if the player did a new highscore
40 */ 41 */
41 bool isNewhighscore; 42 bool isNewhighscore;
42 43
43 /* 44 /*
44 * this inserts the new entry at the correct position 45 * this inserts the new entry at the correct position
45 */ 46 */
46 void insertData( QString , int , int ); 47 void insertData( QString , int , int );
47 48
48 list<t_playerData*> playerData; 49 QList<t_playerData> playerData;
49 50
50 /* 51 /*
51 * As Qt/e does not support QInputDialog I did that code myself 52 * As Qt/e does not support QInputDialog I did that code myself
52 */ 53 */
53 QString getName(); 54 QString getName();
54 private: 55 private:
55 56
56 list<t_playerData*>::iterator iPlayerData;
57
58 /* 57 /*
59 * the lowest score in the highscorelist 58 * the lowest score in the highscorelist
60 */ 59 */
61 int lowest; 60 int lowest;
62 61
63 /* 62 /*
64 * the level of the highscore 63 * the level of the highscore
65 */ 64 */
66 int pLevel; 65 int pLevel;
67 66
68 /* 67 /*
69 * get all scores in a vector and give "lowest" a value 68 * get all scores in a vector and give "lowest" a value