Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+48
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Login Screen for ADLER WebsocketSimulator
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, ESZS, 2025-03-03
|
||||
*/
|
||||
|
||||
#include "awss_login.h"
|
||||
#include "ui_awss_login.h"
|
||||
|
||||
|
||||
namespace AdlerWebSocketSimulator {
|
||||
|
||||
Login::Login(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, m_ui(new Ui::Login)
|
||||
, m_logger(getLogger("Login"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
connect( m_ui->pbConnect, &QPushButton::clicked, this, &Login::onConnectToServer);
|
||||
}
|
||||
|
||||
Login::~Login()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void Login::onConnectToServer()
|
||||
{
|
||||
QString serverName = m_ui->leServerName->text();
|
||||
int port = m_ui->lePort->text().toInt();
|
||||
int id = m_ui->leSaaId->text().toInt();
|
||||
if (m_ui->leServerName->text().isEmpty())
|
||||
serverName = m_ui->leServerName->placeholderText();
|
||||
|
||||
if (m_ui->lePort->text().isEmpty())
|
||||
port = m_ui->lePort->placeholderText().toInt();
|
||||
|
||||
if (m_ui->leSaaId->text().isEmpty())
|
||||
id = m_ui->leSaaId->placeholderText().toInt();
|
||||
|
||||
emit connectToServer(serverName, port, id);
|
||||
}
|
||||
|
||||
} // #namespace AdlerWebSocketSimulator
|
||||
Reference in new issue
Block a user