功能:实现终端登录页与状态机骨架
变更详情:feat(kiosk-shell): 首版登录页与状态机骨架 按《VDI 云桌面软件开发方案》3.2 节实现: - 状态机 BOOT/CONFIG/CONNECTING/SESSION/RECONNECT/ERROR - 首配页(SN 绑定、服务器地址、账号、密码、显示档位) - 全局热键 Ctrl+Alt+Shift+M 呼出管理菜单 - FreeRDP 3 以 libfreerdp3 API 内嵌,非拉起外部进程
This commit is contained in:
commit
c25bc2908a
14 files changed
+1374
No files matched your search
@@ -0,0 +1,68 @@
|
||||
// 首配 / 登录页
|
||||
//
|
||||
// 对应《VDI 云桌面软件开发方案》3.2 节:
|
||||
// 首配页(无配置时进入)——SN 绑定、WiFi 扫码、服务器地址
|
||||
// 状态条——网络 / 会话状态
|
||||
|
||||
#ifndef KIOSK_SHELL_LOGIN_PAGE_H
|
||||
#define KIOSK_SHELL_LOGIN_PAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <functional>
|
||||
|
||||
#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<void(const TerminalConfig&)>;
|
||||
|
||||
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
|
||||
Reference in new issue
Block a user