mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 03:28:49 -07:00
add more info to dialogs (#4293)
* add more info to dialogs adds descriptive strings to the register, password reset request, password reset challenge request, password reset token dialogs adds tip to set manager to use ctrl a to select all sets change sizes in set manager moves default server info to settings instead of having it hardcoded in each dialog * make sets manager smaller * clangify * cleanup
This commit is contained in:
parent
1b4543aa11
commit
8e954b10e6
16 changed files with 170 additions and 158 deletions
|
|
@ -12,14 +12,13 @@
|
|||
|
||||
DlgForgotPasswordReset::DlgForgotPasswordReset(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
|
||||
QString lastfphost;
|
||||
QString lastfpport;
|
||||
QString lastfpplayername;
|
||||
ServersSettings &servers = SettingsCache::instance().servers();
|
||||
lastfphost = servers.getHostname("server.cockatrice.us");
|
||||
lastfpport = servers.getPort("4747");
|
||||
lastfpplayername = servers.getPlayerName("Player");
|
||||
lastfphost = servers.getHostname();
|
||||
lastfpport = servers.getPort();
|
||||
lastfpplayername = servers.getPlayerName();
|
||||
|
||||
if (!servers.getFPHostname().isEmpty() && !servers.getFPPort().isEmpty() && !servers.getFPPlayerName().isEmpty()) {
|
||||
lastfphost = servers.getFPHostname();
|
||||
|
|
@ -34,6 +33,9 @@ DlgForgotPasswordReset::DlgForgotPasswordReset(QWidget *parent) : QDialog(parent
|
|||
reject();
|
||||
}
|
||||
|
||||
infoLabel = new QLabel(tr("Enter the received token and the new password in order to set your new password."));
|
||||
infoLabel->setWordWrap(true);
|
||||
|
||||
hostLabel = new QLabel(tr("&Host:"));
|
||||
hostEdit = new QLineEdit(lastfphost);
|
||||
hostLabel->setBuddy(hostEdit);
|
||||
|
|
@ -70,18 +72,19 @@ DlgForgotPasswordReset::DlgForgotPasswordReset(QWidget *parent) : QDialog(parent
|
|||
}
|
||||
|
||||
QGridLayout *grid = new QGridLayout;
|
||||
grid->addWidget(hostLabel, 0, 0);
|
||||
grid->addWidget(hostEdit, 0, 1);
|
||||
grid->addWidget(portLabel, 1, 0);
|
||||
grid->addWidget(portEdit, 1, 1);
|
||||
grid->addWidget(playernameLabel, 2, 0);
|
||||
grid->addWidget(playernameEdit, 2, 1);
|
||||
grid->addWidget(tokenLabel, 3, 0);
|
||||
grid->addWidget(tokenEdit, 3, 1);
|
||||
grid->addWidget(newpasswordLabel, 4, 0);
|
||||
grid->addWidget(newpasswordEdit, 4, 1);
|
||||
grid->addWidget(newpasswordverifyLabel, 5, 0);
|
||||
grid->addWidget(newpasswordverifyEdit, 5, 1);
|
||||
grid->addWidget(infoLabel, 0, 0, 1, 2);
|
||||
grid->addWidget(hostLabel, 1, 0);
|
||||
grid->addWidget(hostEdit, 1, 1);
|
||||
grid->addWidget(portLabel, 2, 0);
|
||||
grid->addWidget(portEdit, 2, 1);
|
||||
grid->addWidget(playernameLabel, 3, 0);
|
||||
grid->addWidget(playernameEdit, 3, 1);
|
||||
grid->addWidget(tokenLabel, 4, 0);
|
||||
grid->addWidget(tokenEdit, 4, 1);
|
||||
grid->addWidget(newpasswordLabel, 5, 0);
|
||||
grid->addWidget(newpasswordEdit, 5, 1);
|
||||
grid->addWidget(newpasswordverifyLabel, 6, 0);
|
||||
grid->addWidget(newpasswordverifyEdit, 6, 1);
|
||||
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(actOk()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue