// 首配 / 登录页 // // 对应《VDI 云桌面软件开发方案》3.2 节: // 首配页(无配置时进入)——SN 绑定、WiFi 扫码、服务器地址 // 状态条——网络 / 会话状态 #ifndef KIOSK_SHELL_LOGIN_PAGE_H #define KIOSK_SHELL_LOGIN_PAGE_H #include #include #include "config.h" class QLineEdit; class QComboBox; class QCheckBox; class QLabel; class QPushButton; class QGridLayout; class QVBoxLayout; namespace vdi { class LoginPage : public QWidget { Q_OBJECT public: using ConnectHandler = std::function; explicit LoginPage(const TerminalConfig& initial, QWidget* parent = nullptr); void setConnectHandler(ConnectHandler handler); void setStatus(const QString& text, bool error = false); void setBusy(bool busy); // 供外部回填 TerminalConfig currentConfig() const; signals: void connectRequested(const vdi::TerminalConfig& cfg); void quitRequested(); private slots: void onConnectClicked(); void onResolutionChanged(int index); private: TerminalConfig cfg_; ConnectHandler connectHandler_; QLineEdit* editServer_ = nullptr; QLineEdit* editUser_ = nullptr; QLineEdit* editPassword_ = nullptr; QComboBox* comboResolution_ = nullptr; QCheckBox* checkRemember_ = nullptr; QLabel* labelStatus_ = nullptr; QLabel* labelSn_ = nullptr; QLabel* labelNetwork_ = nullptr; QPushButton* buttonConnect_ = nullptr; QPushButton* buttonQuit_ = nullptr; }; } // namespace vdi Q_DECLARE_METATYPE(vdi::TerminalConfig) #endif // KIOSK_SHELL_LOGIN_PAGE_H