功能:新增桌面连接设置对话框
This commit is contained in:
parent
28f79e674b
commit
033b9bfc0d
52
terminal/kiosk-shell/src/desktop_settings_dialog.h
Normal file
52
terminal/kiosk-shell/src/desktop_settings_dialog.h
Normal file
@ -0,0 +1,52 @@
|
||||
// 桌面连接设置对话框
|
||||
//
|
||||
// 现场环境每套部署的桌面地址不同:选择一张桌面卡,
|
||||
// 编辑协议(Moonlight/RDP)、地址(IP / 域名 / VPN 隧道地址)、
|
||||
// 应用名、分辨率和帧率,保存后立即生效。
|
||||
// 地址为空 = 待分配,卡片不可连接。
|
||||
|
||||
#ifndef KIOSK_SHELL_DESKTOP_SETTINGS_DIALOG_H
|
||||
#define KIOSK_SHELL_DESKTOP_SETTINGS_DIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <vector>
|
||||
|
||||
#include "desktop_session.h"
|
||||
|
||||
class QComboBox;
|
||||
class QLineEdit;
|
||||
|
||||
namespace vdi {
|
||||
|
||||
class DesktopSettingsDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DesktopSettingsDialog(std::vector<DesktopInfo> desktops,
|
||||
const QString& selectId = QString(),
|
||||
QWidget* parent = nullptr);
|
||||
|
||||
// 保存后的桌面列表(供调用方刷新)
|
||||
std::vector<DesktopInfo> desktops() const { return desktops_; }
|
||||
|
||||
private slots:
|
||||
void onDesktopChanged(int index);
|
||||
void onAccepted();
|
||||
|
||||
private:
|
||||
void loadCurrent();
|
||||
|
||||
std::vector<DesktopInfo> desktops_;
|
||||
|
||||
QComboBox* comboDesktop_ = nullptr;
|
||||
QComboBox* comboProtocol_ = nullptr;
|
||||
QLineEdit* editEndpoint_ = nullptr;
|
||||
QLineEdit* editApp_ = nullptr;
|
||||
QComboBox* comboResolution_ = nullptr;
|
||||
QComboBox* comboFps_ = nullptr;
|
||||
bool loading_ = false;
|
||||
};
|
||||
|
||||
} // namespace vdi
|
||||
|
||||
#endif // KIOSK_SHELL_DESKTOP_SETTINGS_DIALOG_H
|
||||
Loading…
Reference in New Issue
Block a user