vdi-cloud/terminal/kiosk-shell/src/login_page.h
宋一鸣 61127fb714 功能:实现桌面选择流程并接入 Moonlight 会话
变更详情:feat(kiosk-shell): 登录/桌面列表产品流程 + Moonlight 会话 + 看门狗进程组修复

- 登录页改为用户认证(本地演示认证,账号密码非空通过)
- 新增桌面列表页:Windows/Moonlight 可连接,Ubuntu/麒麟待分配
- 新增 DesktopService 适配层(登录/桌面列表/连接票据,后续接 API)
- 新增 MoonlightSession:QProcess 参数数组直启 moonlight-qt,退出回列表
- 状态机扩展 AUTHENTICATING / DESKTOP_LIST
- 移除开机自动 RDP,收敛为 monitor -> kiosk-shell 单一自启链
- Monitor 按进程组结束整棵进程树,修复孤儿串流进程
- vdi-moonlight 启动器新增 vsync/frame-pacing/overlay 低延迟开关
2026-10-28 20:48:12 +08:00

62 lines
1.6 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 登录页
//
// 产品流程第一步:设备 SN/网络展示 + 用户认证。
// 当前为本地演示认证(账号密码非空通过),由 DesktopService 承担;
// 页面只负责输入采集与状态展示,不直接连接云桌面。
#ifndef KIOSK_SHELL_LOGIN_PAGE_H
#define KIOSK_SHELL_LOGIN_PAGE_H
#include <QWidget>
#include <functional>
#include "config.h"
class QLineEdit;
class QLabel;
class QPushButton;
class QGridLayout;
class QVBoxLayout;
namespace vdi {
class LoginPage : public QWidget {
Q_OBJECT
public:
// 认证回调:由 MainWindow 接到 DesktopService
using LoginHandler = std::function<void(const QString& username, const QString& password)>;
explicit LoginPage(const TerminalConfig& initial, QWidget* parent = nullptr);
void setLoginHandler(LoginHandler handler);
void setStatus(const QString& text, bool error = false);
void setBusy(bool busy);
// 保留设备首配信息(SN/服务器地址),登录不再承载 Windows 直连参数
TerminalConfig deviceConfig() const;
signals:
void loginRequested(const QString& username, const QString& password);
void quitRequested();
private slots:
void onLoginClicked();
private:
TerminalConfig cfg_;
LoginHandler loginHandler_;
QLineEdit* editUser_ = nullptr;
QLineEdit* editPassword_ = nullptr;
QLabel* labelStatus_ = nullptr;
QLabel* labelSn_ = nullptr;
QLabel* labelNetwork_ = nullptr;
QPushButton* buttonLogin_ = nullptr;
QPushButton* buttonQuit_ = nullptr;
};
} // namespace vdi
#endif // KIOSK_SHELL_LOGIN_PAGE_H