FemaLocalSoftware/apiform.cpp
lopata29435_NSK 3af06d02ec finish
2025-01-08 05:13:48 +07:00

26 lines
576 B
C++

#include "apiform.h"
#include "ui_apiform.h"
#include "utils.h"
ApiForm::ApiForm(QDialog *parent)
: QDialog(parent)
, ui(new Ui::ApiForm)
{
ui->setupUi(this);
connect(ui->loginButton, &QPushButton::clicked, this, [this]() {
const QString adres = ui->adres->text();
const QString port = ui->port->text();
if (!adres.isEmpty() && !port.isEmpty()) {
utils::API_URL = QString("http://%1:%2").arg(adres).arg(port);
this->accept();
}
this->accept();
});
}
ApiForm::~ApiForm()
{
delete ui;
}