diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-08-14 02:27:01 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-08-14 02:27:01 +0200 |
commit | 0adb572a07d13a35bdb378ba024655de6a9967b3 (patch) | |
tree | 9c2d1b4b0e45669f181841adc584017549e86648 /application/dialogs | |
parent | 8ed10c5b8142243481305c5cba8318eed2f4a120 (diff) | |
download | MultiMC-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')
-rw-r--r-- | application/dialogs/EditAccountDialog.cpp | 14 | ||||
-rw-r--r-- | application/dialogs/EditAccountDialog.h | 10 | ||||
-rw-r--r-- | application/dialogs/EditAccountDialog.ui | 2 |
3 files changed, 16 insertions, 10 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(); diff --git a/application/dialogs/EditAccountDialog.h b/application/dialogs/EditAccountDialog.h index df8b21bf..e1f6f401 100644 --- a/application/dialogs/EditAccountDialog.h +++ b/application/dialogs/EditAccountDialog.h @@ -31,14 +31,10 @@ public: int flags = UsernameField | PasswordField); ~EditAccountDialog(); - /*! - * Gets the text entered in the dialog's username field. - */ - QString username() const; + void setUsername(const QString & user) const; + void setPassword(const QString & pass) const; - /*! - * Gets the text entered in the dialog's password field. - */ + QString username() const; QString password() const; enum Flags diff --git a/application/dialogs/EditAccountDialog.ui b/application/dialogs/EditAccountDialog.ui index 5f727bd4..da24c124 100644 --- a/application/dialogs/EditAccountDialog.ui +++ b/application/dialogs/EditAccountDialog.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>Edit Account</string> + <string>Login</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> |