-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresultsdialog.cpp
More file actions
38 lines (33 loc) · 830 Bytes
/
Copy pathresultsdialog.cpp
File metadata and controls
38 lines (33 loc) · 830 Bytes
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
34
35
36
37
38
#include "resultsdialog.h"
#include "ui_resultsdialog.h"
#include <QDesktopWidget>
#include <QRect>
#include <QSize>
#include <QCloseEvent>
ResultsDialog::ResultsDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::ResultsDialog)
{
ui->setupUi(this);
QRect position = frameGeometry();
position.moveCenter(QDesktopWidget().availableGeometry().center());
move(position.topLeft());
this->setFixedSize( QSize( this->width(), this->height()));
}
ResultsDialog::~ResultsDialog()
{
delete ui;
}
void ResultsDialog::setResult(QString time, int points)
{
this->ui->lblPoints->setText(QString::number(points));
this->ui->lblTime->setText(time);
}
void ResultsDialog::on_pushButton_clicked()
{
QCoreApplication::exit();
}
void ResultsDialog::on_pushButton_2_clicked()
{
this->done(1);
}