summaryrefslogtreecommitdiff
path: root/noncore/games/tetrix/ohighscoredlg.h
authorwimpie <wimpie>2005-01-04 01:35:26 (UTC)
committer wimpie <wimpie>2005-01-04 01:35:26 (UTC)
commita9c188235c97e07b0eb96b13adbcdfd4bad64767 (patch) (unidiff)
tree13f6ae5c499dc0c1d1bd4b763a1973a0fa8635cf /noncore/games/tetrix/ohighscoredlg.h
parent48b6cd5966ec6cc0b968edf10ba1a1ad96ef165f (diff)
downloadopie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.zip
opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.gz
opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.bz2
CONTROL files : changed version string
NS2 many changes and first release of OT2
Diffstat (limited to 'noncore/games/tetrix/ohighscoredlg.h') (more/less context) (ignore 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
@@ -1,97 +1,96 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
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
33 */ 34 */
34 OHighscore( int , int ); 35 OHighscore( int , int );
35 36
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
70 */ 69 */
71 void getList(); 70 void getList();
72 71
73 /* 72 /*
74 * sets the bool if the current score is in the top10 73 * sets the bool if the current score is in the top10
75 */ 74 */
76 void checkIfItIsANewhighscore( int ); 75 void checkIfItIsANewhighscore( int );
77}; 76};
78 77
79class OHighscoreDialog : public QDialog 78class OHighscoreDialog : public QDialog
80{ 79{
81 Q_OBJECT 80 Q_OBJECT
82 81
83 public: 82 public:
84 OHighscoreDialog(OHighscore *highscore, QWidget *parent, const char *name = 0, bool modal = true ); 83 OHighscoreDialog(OHighscore *highscore, QWidget *parent, const char *name = 0, bool modal = true );
85 84
86 private: 85 private:
87 OHighscore *hs_; 86 OHighscore *hs_;
88 87
89 QVBoxLayout *vbox_layout; 88 QVBoxLayout *vbox_layout;
90 89
91 /* 90 /*
92 * this method creates the QListView with all data 91 * this method creates the QListView with all data
93 */ 92 */
94 void createHighscoreListView(); 93 void createHighscoreListView();
95 94
96 QListView *list; 95 QListView *list;
97}; 96};