2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2013-06-10 00:57:54 +03:00
|
|
|
|
|
|
|
|
#include "authenticationdialog.h"
|
|
|
|
|
#include "ui_authenticationdialog.h"
|
|
|
|
|
|
2014-11-04 22:12:40 +02:00
|
|
|
namespace Mercurial {
|
|
|
|
|
namespace Internal {
|
2013-06-10 00:57:54 +03:00
|
|
|
|
|
|
|
|
AuthenticationDialog::AuthenticationDialog(const QString &username, const QString &password, QWidget *parent) :
|
|
|
|
|
QDialog(parent),
|
|
|
|
|
ui(new Ui::AuthenticationDialog)
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
ui->username->setText(username);
|
|
|
|
|
ui->password->setText(password);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AuthenticationDialog::~AuthenticationDialog()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AuthenticationDialog::setPasswordEnabled(bool enabled)
|
|
|
|
|
{
|
|
|
|
|
ui->password->setEnabled(enabled);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString AuthenticationDialog::getUserName()
|
|
|
|
|
{
|
|
|
|
|
return ui->username->text();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString AuthenticationDialog::getPassword()
|
|
|
|
|
{
|
|
|
|
|
return ui->password->text();
|
|
|
|
|
}
|
2014-11-04 22:12:40 +02:00
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Mercurial
|