FemaLocalSoftware/apiform.cpp

26 lines
576 B
C++
Raw Permalink Normal View History

2025-01-07 22:13:48 +00:00
#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;
}