2019-05-12 06:31:40 +03:00
|
|
|
#include "connectdb_widget.h"
|
|
|
|
|
#include "ui_connectdb_widget.h"
|
|
|
|
|
|
2019-05-12 19:06:23 +03:00
|
|
|
ConnectDbWidget::ConnectDbWidget(const QString& message, QWidget *parent) :
|
2019-05-12 06:31:40 +03:00
|
|
|
QWidget(parent),
|
|
|
|
|
ui(new Ui::ConnectDbWidget)
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
2019-05-12 19:06:23 +03:00
|
|
|
ui->mMessageLabel->setText(message);
|
|
|
|
|
connect(ui->mButtonBox, SIGNAL(accepted()), this, SLOT(onOk()));
|
|
|
|
|
connect(ui->mButtonBox, SIGNAL(rejected()), this, SLOT(onCancel()));
|
|
|
|
|
connect(ui->mPasswordEdit, SIGNAL(returnPressed()), this, SLOT(onOk()));
|
2019-05-12 06:31:40 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ConnectDbWidget::~ConnectDbWidget()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|
}
|
2019-05-12 19:06:23 +03:00
|
|
|
|
|
|
|
|
void ConnectDbWidget::onOk()
|
|
|
|
|
{
|
|
|
|
|
emit passwordEntered(ui->mPasswordEdit->text());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ConnectDbWidget::onCancel()
|
|
|
|
|
{
|
|
|
|
|
emit cancelled();
|
|
|
|
|
}
|