27 |
27 |
28 HWPasswordDialog::HWPasswordDialog(QWidget* parent) : QDialog(parent) |
28 HWPasswordDialog::HWPasswordDialog(QWidget* parent) : QDialog(parent) |
29 { |
29 { |
30 setWindowTitle(tr("Login")); |
30 setWindowTitle(tr("Login")); |
31 |
31 |
32 QString titleLabelText = "To connect to the server, please log in.\n\nIf you don't have an account on www.hedgewars.org,\njust enter your nickname."; |
|
33 QString nickLabelText = "Nickname:"; |
|
34 QString passLabelText = "Password:"; |
|
35 |
|
36 QGridLayout * layout = new QGridLayout(this); |
32 QGridLayout * layout = new QGridLayout(this); |
37 |
33 |
38 QLabel * titleLabel = new QLabel(this); |
34 QLabel * titleLabel = new QLabel(this); |
39 titleLabel->setText(titleLabelText); |
35 titleLabel->setText(tr("To connect to the server, please log in.\n\nIf you don't have an account on www.hedgewars.org,\njust enter your nickname.")); |
40 layout->addWidget(titleLabel, 0, 0); |
36 layout->addWidget(titleLabel, 0, 0); |
41 |
37 |
42 QLabel * nickLabel = new QLabel(this); |
38 QLabel * nickLabel = new QLabel(this); |
43 nickLabel->setText(nickLabelText); |
39 nickLabel->setText(tr("Nickname:")); |
44 layout->addWidget(nickLabel, 1, 0); |
40 layout->addWidget(nickLabel, 1, 0); |
45 |
41 |
46 leNickname = new QLineEdit(this); |
42 leNickname = new QLineEdit(this); |
47 leNickname->setEchoMode(QLineEdit::Normal); |
43 leNickname->setEchoMode(QLineEdit::Normal); |
48 layout->addWidget(leNickname, 2, 0); |
44 layout->addWidget(leNickname, 2, 0); |
49 |
45 |
50 QLabel * passLabel = new QLabel(this); |
46 QLabel * passLabel = new QLabel(this); |
51 passLabel->setText(passLabelText); |
47 passLabel->setText(tr("Password:")); |
52 layout->addWidget(passLabel, 3, 0); |
48 layout->addWidget(passLabel, 3, 0); |
53 |
49 |
54 lePassword = new QLineEdit(this); |
50 lePassword = new QLineEdit(this); |
55 lePassword->setEchoMode(QLineEdit::Password); |
51 lePassword->setEchoMode(QLineEdit::Password); |
56 layout->addWidget(lePassword, 4, 0); |
52 layout->addWidget(lePassword, 4, 0); |