-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoundNameDialog.cpp
40 lines (28 loc) · 1.24 KB
/
RoundNameDialog.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
34
35
36
37
38
39
40
#include "RoundNameDialog.h"
#include "ui_RoundNameDialog.h"
RoundNameDialog::RoundNameDialog(std::shared_ptr<Tournament> T, QWidget *parent) :
QDialog(parent),
ui(new Ui::RoundNameDialog)
{
ui->setupUi(this);
passedTournament = T;
ui->buttonBox->button(QDialogButtonBox::Ok)->setStyleSheet("QPushButton::hover{background-color : lightgreen;}"
"QPushButton {background-color: #FFFFFF}");
ui->buttonBox->button(QDialogButtonBox::Cancel)->setStyleSheet("QPushButton::hover{background-color : lightgreen;}"
"QPushButton {background-color: #FFFFFF}");
ui->lineEdit->setStyleSheet("QLineEdit{background-color:#FFFFFF}");
this->setWindowTitle("Round Name Dialog");
this->setStyleSheet("color: black;"
"background-color: #F9DFCB;"
"selection-color: white;"
"selection-background-color: blue;");
}
RoundNameDialog::~RoundNameDialog()
{
delete ui;
}
void RoundNameDialog::on_buttonBox_accepted()
{
QString name = (ui->lineEdit->text());
passedTournament->addRound(name);
}