author | unc0rr |
Sun, 04 Sep 2011 20:51:54 +0400 | |
changeset 5768 | 852ba8f5685c |
parent 5734 | d710db47a1ef |
child 6009 | 14f6fc9869f2 |
permissions | -rw-r--r-- |
1621 | 1 |
/* |
2 |
* Hedgewars, a free turn based strategy game |
|
4976 | 3 |
* Copyright (c) 2010-2011 Andrey Korotaev <unC0Rr@gmail.com> |
1621 | 4 |
* |
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
17 |
*/ |
|
18 |
||
19 |
#ifndef STATSPAGE_H |
|
20 |
#define STATSPAGE_H |
|
21 |
||
1625 | 22 |
#include <QVector> |
23 |
#include <QMap> |
|
1636 | 24 |
#include <QGraphicsView> |
5205
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
4976
diff
changeset
|
25 |
|
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
4976
diff
changeset
|
26 |
#include "AbstractPage.h" |
1621 | 27 |
|
1636 | 28 |
class FitGraphicsView : public QGraphicsView |
29 |
{ |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
30 |
Q_OBJECT |
1636 | 31 |
|
32 |
public: |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
33 |
FitGraphicsView(QWidget* parent = 0); |
1636 | 34 |
|
35 |
protected: |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
36 |
void resizeEvent(QResizeEvent * event); |
1636 | 37 |
}; |
1625 | 38 |
|
1621 | 39 |
class PageGameStats : public AbstractPage |
40 |
{ |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
41 |
Q_OBJECT |
1621 | 42 |
|
43 |
public: |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
44 |
PageGameStats(QWidget* parent = 0); |
1621 | 45 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
46 |
QPushButton *BtnBack; |
5734 | 47 |
QPushButton *BtnSave; |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
48 |
QLabel *labelGameStats; |
3788
9aa8a832e296
adds prettier after-game statistics page with more stats
TheXception
parents:
3236
diff
changeset
|
49 |
QLabel *labelGameWin; |
9aa8a832e296
adds prettier after-game statistics page with more stats
TheXception
parents:
3236
diff
changeset
|
50 |
QLabel *labelGameRank; |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
51 |
FitGraphicsView * graphic; |
1622 | 52 |
|
53 |
public slots: |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
54 |
void GameStats(char type, const QString & info); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
55 |
void clear(); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
56 |
void renderStats(); |
5734 | 57 |
|
58 |
signals: |
|
59 |
void saveDemoRequested(); |
|
2377 | 60 |
|
1622 | 61 |
private: |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
62 |
void AddStatText(const QString & msg); |
1625 | 63 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2377
diff
changeset
|
64 |
QMap<quint32, QVector<quint32> > healthPoints; |
3788
9aa8a832e296
adds prettier after-game statistics page with more stats
TheXception
parents:
3236
diff
changeset
|
65 |
unsigned int playerPosition; |
9aa8a832e296
adds prettier after-game statistics page with more stats
TheXception
parents:
3236
diff
changeset
|
66 |
quint32 lastColor; |
1621 | 67 |
}; |
68 |
||
69 |
#endif // STATSPAGE_H |