QTfrontend/ui/page/pagegamestats.h
changeset 6616 f77bb02b669f
parent 6060 fdfc01419815
child 6700 e04da46ee43c
equal deleted inserted replaced
6615:65602f1ef0f8 6616:f77bb02b669f
    25 
    25 
    26 #include "AbstractPage.h"
    26 #include "AbstractPage.h"
    27 
    27 
    28 class FitGraphicsView : public QGraphicsView
    28 class FitGraphicsView : public QGraphicsView
    29 {
    29 {
    30     Q_OBJECT
    30         Q_OBJECT
    31 
    31 
    32 public:
    32     public:
    33     FitGraphicsView(QWidget* parent = 0);
    33         FitGraphicsView(QWidget* parent = 0);
    34 
    34 
    35 protected:
    35     protected:
    36     void resizeEvent(QResizeEvent * event);
    36         void resizeEvent(QResizeEvent * event);
    37 };
    37 };
    38 
    38 
    39 class PageGameStats : public AbstractPage
    39 class PageGameStats : public AbstractPage
    40 {
    40 {
    41     Q_OBJECT
    41         Q_OBJECT
    42 
    42 
    43 public:
    43     public:
    44     PageGameStats(QWidget* parent = 0);
    44         PageGameStats(QWidget* parent = 0);
    45 
    45 
    46     QPushButton *btnSave;
    46         QPushButton *btnSave;
    47     QLabel *labelGameStats;
    47         QLabel *labelGameStats;
    48     QLabel *labelGameWin;
    48         QLabel *labelGameWin;
    49     QLabel *labelGameRank;
    49         QLabel *labelGameRank;
    50     FitGraphicsView * graphic;
    50         FitGraphicsView * graphic;
    51 
    51 
    52 public slots:
    52     public slots:
    53     void GameStats(char type, const QString & info);
    53         void GameStats(char type, const QString & info);
    54     void clear();
    54         void clear();
    55     void renderStats();
    55         void renderStats();
    56     
       
    57 signals:
       
    58     void saveDemoRequested();
       
    59 
    56 
    60 private:
    57     signals:
    61     void AddStatText(const QString & msg);
    58         void saveDemoRequested();
    62 
    59 
    63     QMap<quint32, QVector<quint32> > healthPoints;
    60     private:
    64     unsigned int playerPosition;
    61         void AddStatText(const QString & msg);
    65     quint32 lastColor;
       
    66 
    62 
    67 protected:
    63         QMap<quint32, QVector<quint32> > healthPoints;
    68     QLayout * bodyLayoutDefinition();
    64         unsigned int playerPosition;
    69     QLayout * footerLayoutDefinition();
    65         quint32 lastColor;
    70     void connectSignals();
    66 
       
    67     protected:
       
    68         QLayout * bodyLayoutDefinition();
       
    69         QLayout * footerLayoutDefinition();
       
    70         void connectSignals();
    71 };
    71 };
    72 
    72 
    73 #endif // STATSPAGE_H
    73 #endif // STATSPAGE_H