mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 10:46:51 -07:00
Register Manual Host on first Connect
This commit is contained in:
parent
d72148cb99
commit
5c52f8b89c
4 changed files with 31 additions and 10 deletions
|
@ -96,6 +96,8 @@ class ManualHost
|
|||
bool GetRegistered() const { return registered; }
|
||||
HostMAC GetMAC() const { return registered_mac; }
|
||||
|
||||
void Register(const RegisteredHost ®istered_host) { this->registered = true; this->registered_mac = registered_host.GetPS4MAC(); }
|
||||
|
||||
void SaveToSettings(QSettings *settings) const;
|
||||
static ManualHost LoadFromSettings(QSettings *settings);
|
||||
};
|
||||
|
|
|
@ -45,6 +45,8 @@ class RegistDialog : public QDialog
|
|||
QDialogButtonBox *button_box;
|
||||
QPushButton *register_button;
|
||||
|
||||
RegisteredHost registered_host;
|
||||
|
||||
private slots:
|
||||
void ValidateInput();
|
||||
|
||||
|
@ -52,6 +54,8 @@ class RegistDialog : public QDialog
|
|||
explicit RegistDialog(Settings *settings, const QString &host = QString(), QWidget *parent = nullptr);
|
||||
~RegistDialog();
|
||||
|
||||
RegisteredHost GetRegisteredHost() { return registered_host; }
|
||||
|
||||
public slots:
|
||||
void accept() override;
|
||||
};
|
||||
|
@ -71,6 +75,8 @@ class RegistExecuteDialog: public QDialog
|
|||
QPlainTextEdit *log_edit;
|
||||
QDialogButtonBox *button_box;
|
||||
|
||||
RegisteredHost registered_host;
|
||||
|
||||
void Finished();
|
||||
|
||||
private slots:
|
||||
|
@ -81,6 +87,8 @@ class RegistExecuteDialog: public QDialog
|
|||
public:
|
||||
explicit RegistExecuteDialog(Settings *settings, const ChiakiRegistInfo ®ist_info, QWidget *parent = nullptr);
|
||||
~RegistExecuteDialog();
|
||||
|
||||
RegisteredHost GetRegisteredHost() { return registered_host; }
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(ChiakiRegistEventType)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue