QTfrontend/statsPage.cpp
changeset 3381 f8800c44b3de
parent 3236 4ab3917d7d44
child 3788 9aa8a832e296
equal deleted inserted replaced
3380:a46a311097af 3381:f8800c44b3de
    19 #include <QLabel>
    19 #include <QLabel>
    20 #include <QGridLayout>
    20 #include <QGridLayout>
    21 #include <QGraphicsScene>
    21 #include <QGraphicsScene>
    22 
    22 
    23 #include "statsPage.h"
    23 #include "statsPage.h"
       
    24 #include "team.h"
    24 
    25 
    25 FitGraphicsView::FitGraphicsView(QWidget* parent) : QGraphicsView(parent)
    26 FitGraphicsView::FitGraphicsView(QWidget* parent) : QGraphicsView(parent)
    26 {
    27 {
    27 
    28 
    28 }
    29 }
   121             quint32 clan = info.left(i).toInt();
   122             quint32 clan = info.left(i).toInt();
   122             quint32 hp = info.mid(i + 1).toUInt();
   123             quint32 hp = info.mid(i + 1).toUInt();
   123             healthPoints[clan].append(hp);
   124             healthPoints[clan].append(hp);
   124             break;
   125             break;
   125         }
   126         }
       
   127         case 'T': { // local team stats
       
   128             //AddStatText("<p>local team: " + info + "</p>");
       
   129             QStringList infol = info.split(":");
       
   130             HWTeam team(infol[0]);
       
   131             if(team.FileExists()) // do some better test to avoid influence from scripted/predefined teams?
       
   132             {
       
   133                 team.LoadFromFile();
       
   134                 team.Rounds++;
       
   135                 if(infol[1].toInt() > 0) // might require some better test for winning condition (or changed flag) ... WIP!
       
   136                     team.Wins++; // should draws count as wins?
       
   137                 //team.SaveToFile(); // don't save yet
       
   138             }
       
   139         }
   126     }
   140     }
   127 }
   141 }