1
0
forked from BRT/arc
arc/views/device/WifiConnectDialog.h
2026-06-17 19:30:24 +07:00

28 lines
815 B
C++

#pragma once
#include <QDialog>
class QLineEdit;
class QPushButton;
class QLabel;
// Диалог «Подключить по Wi-Fi»: оператор вводит IP, порт и pairing-код.
// По кнопке — онбординг в фоновом потоке: adb pair → adb connect → читаем android_id →
// запись в wifi_connections. Дальше устройство подхватывает DeviceScreener.
class WifiConnectDialog final : public QDialog {
Q_OBJECT
public:
explicit WifiConnectDialog(QWidget *parent = nullptr);
private:
void onConnect();
void setStatus(const QString &text);
QLineEdit *m_ip = nullptr;
QLineEdit *m_port = nullptr;
QLineEdit *m_code = nullptr;
QPushButton *m_btn = nullptr;
QLabel *m_status = nullptr;
};