mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-21 05:53:12 -07:00
Support Broadcast in Regist
This commit is contained in:
parent
cda4d1cefc
commit
cbf51a7f82
6 changed files with 109 additions and 46 deletions
|
@ -29,6 +29,7 @@ class Settings;
|
|||
class QLineEdit;
|
||||
class QPlainTextEdit;
|
||||
class QDialogButtonBox;
|
||||
class QCheckBox;
|
||||
|
||||
class RegistDialog : public QDialog
|
||||
{
|
||||
|
@ -38,6 +39,7 @@ class RegistDialog : public QDialog
|
|||
Settings *settings;
|
||||
|
||||
QLineEdit *host_edit;
|
||||
QCheckBox *broadcast_check_box;
|
||||
QLineEdit *psn_id_edit;
|
||||
QLineEdit *pin_edit;
|
||||
QDialogButtonBox *button_box;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <QPlainTextEdit>
|
||||
#include <QScrollBar>
|
||||
#include <QMessageBox>
|
||||
#include <QCheckBox>
|
||||
|
||||
Q_DECLARE_METATYPE(ChiakiLogLevel)
|
||||
|
||||
|
@ -52,6 +53,10 @@ RegistDialog::RegistDialog(Settings *settings, const QString &host, QWidget *par
|
|||
else
|
||||
host_edit->setText(host);
|
||||
|
||||
broadcast_check_box = new QCheckBox(this);
|
||||
form_layout->addRow(tr("Broadcast:"), broadcast_check_box);
|
||||
broadcast_check_box->setChecked(host.isEmpty());
|
||||
|
||||
psn_id_edit = new QLineEdit(this);
|
||||
form_layout->addRow(tr("PSN ID (username):"), psn_id_edit);
|
||||
|
||||
|
@ -90,6 +95,7 @@ void RegistDialog::accept()
|
|||
QByteArray host = host_edit->text().trimmed().toUtf8();
|
||||
info.psn_id = psn_id.data();
|
||||
info.host = host.data();
|
||||
info.broadcast = broadcast_check_box->isChecked();
|
||||
info.pin = (uint32_t)pin_edit->text().toULong();
|
||||
|
||||
RegistExecuteDialog execute_dialog(settings, info, this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue