-
Notifications
You must be signed in to change notification settings - Fork 0
/
StatisticsWindow.cpp
34 lines (28 loc) · 1.01 KB
/
StatisticsWindow.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* File: StatisticsWindow.cpp
* Author: brandon
*
* Created on June 27, 2011, 10:50 PM
*/
#include "StatisticsWindow.h"
#include "GameLibrary.h"
#include "Player.h"
StatisticsWindow::StatisticsWindow() : QDialog() {
this->setWindowTitle("Settlers | Statistics");
longestLabel = new QLabel();
longestLabel->setText("Longest Road:");
longestNum = new QLineEdit();
longestNum->setText(QString::fromStdString(GameLibrary::IntToStr(GameLibrary::getCurrentLocalPlayer()->getLongestRoad())));
longestNum->setReadOnly(true);
knightsLabel = new QLabel();
knightsLabel->setText("Knights Played:");
knightsNum = new QLineEdit();
knightsNum->setText(QString::fromStdString(GameLibrary::IntToStr(GameLibrary::getCurrentLocalPlayer()->getKnightsPlayed())));
knightsNum->setReadOnly(true);
layout = new QFormLayout();
layout->addRow(longestLabel, longestNum);
layout->addRow(knightsLabel, knightsNum);
this->setLayout(layout);
}
StatisticsWindow::~StatisticsWindow() {
}