diff options
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> |