summaryrefslogtreecommitdiffstats
path: root/application/dialogs/EditAccountDialog.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-08-14 02:27:01 +0200
committerPetr Mrázek <peterix@gmail.com>2015-08-14 02:27:01 +0200
commit0adb572a07d13a35bdb378ba024655de6a9967b3 (patch)
tree9c2d1b4b0e45669f181841adc584017549e86648 /application/dialogs/EditAccountDialog.cpp
parent8ed10c5b8142243481305c5cba8318eed2f4a120 (diff)
downloadMultiMC-0adb572a07d13a35bdb378ba024655de6a9967b3.tar
MultiMC-0adb572a07d13a35bdb378ba024655de6a9967b3.tar.gz
MultiMC-0adb572a07d13a35bdb378ba024655de6a9967b3.tar.lz
MultiMC-0adb572a07d13a35bdb378ba024655de6a9967b3.tar.xz
MultiMC-0adb572a07d13a35bdb378ba024655de6a9967b3.zip
NOISSUE improve account UI
Diffstat (limited to 'application/dialogs/EditAccountDialog.cpp')
-rw-r--r--application/dialogs/EditAccountDialog.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/application/dialogs/EditAccountDialog.cpp b/application/dialogs/EditAccountDialog.cpp
index b78cebee..7c2ff981 100644
--- a/application/dialogs/EditAccountDialog.cpp
+++ b/application/dialogs/EditAccountDialog.cpp
@@ -26,8 +26,8 @@ EditAccountDialog::EditAccountDialog(const QString &text, QWidget *parent, int f
ui->label->setText(text);
ui->label->setVisible(!text.isEmpty());
- ui->userTextBox->setVisible(flags & UsernameField);
- ui->passTextBox->setVisible(flags & PasswordField);
+ ui->userTextBox->setEnabled(flags & UsernameField);
+ ui->passTextBox->setEnabled(flags & PasswordField);
}
EditAccountDialog::~EditAccountDialog()
@@ -40,11 +40,21 @@ void EditAccountDialog::on_label_linkActivated(const QString &link)
QDesktopServices::openUrl(QUrl(link));
}
+void EditAccountDialog::setUsername(const QString & user) const
+{
+ ui->userTextBox->setText(user);
+}
+
QString EditAccountDialog::username() const
{
return ui->userTextBox->text();
}
+void EditAccountDialog::setPassword(const QString & pass) const
+{
+ ui->passTextBox->setText(pass);
+}
+
QString EditAccountDialog::password() const
{
return ui->passTextBox->text();