47 |
47 |
48 BtnSave = addButton(":/res/Save.png", pageLayout, 3, 2, true); |
48 BtnSave = addButton(":/res/Save.png", pageLayout, 3, 2, true); |
49 BtnSave->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}"); |
49 BtnSave->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}"); |
50 connect(BtnSave, SIGNAL(clicked()), this, SIGNAL(saveDemoRequested())); |
50 connect(BtnSave, SIGNAL(clicked()), this, SIGNAL(saveDemoRequested())); |
51 |
51 |
|
52 |
52 BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); |
53 BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); |
53 BtnBack->setFixedHeight(BtnSave->height()); |
54 BtnBack->setFixedHeight(BtnSave->height()); |
54 BtnBack->setFixedWidth(BtnBack->width()+2); |
55 BtnBack->setFixedWidth(BtnBack->width()+2); |
55 BtnBack->setStyleSheet("QPushButton{margin: 22px 0 9px 2px;}"); |
56 BtnBack->setStyleSheet("QPushButton{margin: 22px 0 9px 2px;}"); |
|
57 connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); |
|
58 |
56 |
59 |
57 QGroupBox * gb = new QGroupBox(this); |
60 QGroupBox * gb = new QGroupBox(this); |
58 QVBoxLayout * gbl = new QVBoxLayout; |
61 QVBoxLayout * gbl = new QVBoxLayout; |
59 |
62 |
60 // details |
63 // details |
178 } |
181 } |
179 case 'T': { // local team stats |
182 case 'T': { // local team stats |
180 //AddStatText("<p>local team: " + info + "</p>"); |
183 //AddStatText("<p>local team: " + info + "</p>"); |
181 QStringList infol = info.split(":"); |
184 QStringList infol = info.split(":"); |
182 HWTeam team(infol[0]); |
185 HWTeam team(infol[0]); |
183 if(team.FileExists()) // do some better test to avoid influence from scripted/predefined teams? |
186 if(team.fileExists()) // do some better test to avoid influence from scripted/predefined teams? |
184 { |
187 { |
185 team.LoadFromFile(); |
188 team.loadFromFile(); |
186 team.Rounds++; |
189 team.incRounds(); |
187 if(infol[1].toInt() > 0) // might require some better test for winning condition (or changed flag) ... WIP! |
190 if(infol[1].toInt() > 0) // might require some better test for winning condition (or changed flag) ... WIP! |
188 team.Wins++; // should draws count as wins? |
191 team.incWins(); // should draws count as wins? |
189 //team.SaveToFile(); // don't save yet |
192 //team.SaveToFile(); // don't save yet |
190 } |
193 } |
191 break; |
194 break; |
192 } |
195 } |
193 |
196 |