15 #include "ui_sessionnamewindow.h"
16 #include "../serverapp/serverapp.h"
17 #include "../numerickeyboard/numerickeyboard.h"
18 #include "../../shared/util.h"
20 #include <QCloseEvent>
24 , ui(new
Ui::SessionName)
28 connect(
ui->bboxOkCancel, &QDialogButtonBox::rejected,
this, &SessionNameWindow::close);
33 ui->keyboard_placeholder->addWidget(keyboard);
46 ui->lineEditName->setText(name);
47 ui->lineEditName->setFocus();
67 serverApp->setSessionName(
ui->lineEditName->text());
74 ui->lineEditName->setText(QString::number(
slxrand() % 9000 + 1000));
80 QString text =
ui->lineEditName->text();
81 ui->lineEditName->setText(text.left(text.length() - 1));
87 QString text =
ui->lineEditName->text();
88 ui->lineEditName->setText(text + QString::number(i));
void onDigitDelete()
deletes the last digit of the saved sessionname
~SessionNameWindow() override
void onGenerateRandomName()
void onDigitTyped(int)
appends the digit to the session name
void show(const QString &name)
SessionNameWindow(QWidget *parent=nullptr)
void closeEvent(QCloseEvent *e) override