2025-06-08 12:48:04 +08:00
|
|
|
#ifndef DIALOGCAMERA_H
|
|
|
|
|
#define DIALOGCAMERA_H
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
2025-06-22 14:08:15 +08:00
|
|
|
#include <QComboBox>
|
2025-06-08 23:51:48 +08:00
|
|
|
#include <IVrEyeDevice.h>
|
2025-06-22 14:08:15 +08:00
|
|
|
#include <vector>
|
2025-06-08 12:48:04 +08:00
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class DialogCamera;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class DialogCamera : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2025-06-22 14:08:15 +08:00
|
|
|
// 支持多相机的构造函数
|
|
|
|
|
explicit DialogCamera(const std::vector<IVrEyeDevice*>& deviceList,
|
|
|
|
|
const std::vector<QString>& cameraNames,
|
|
|
|
|
QWidget *parent = nullptr);
|
2025-06-08 12:48:04 +08:00
|
|
|
~DialogCamera();
|
|
|
|
|
|
2025-06-08 23:51:48 +08:00
|
|
|
private slots:
|
|
|
|
|
void on_btn_camer_ok_clicked();
|
|
|
|
|
void on_btn_camer_cancel_clicked();
|
2025-06-22 14:08:15 +08:00
|
|
|
void on_camera_selection_changed(int index);
|
2025-06-08 23:51:48 +08:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
// 初始化相机参数到界面
|
|
|
|
|
void InitCameraParameters();
|
|
|
|
|
|
|
|
|
|
// 应用界面参数到相机
|
|
|
|
|
bool ApplyCameraParameters();
|
2025-06-22 14:08:15 +08:00
|
|
|
|
|
|
|
|
// 初始化相机选择下拉框
|
|
|
|
|
void InitCameraComboBox();
|
2025-06-08 23:51:48 +08:00
|
|
|
|
2025-06-08 12:48:04 +08:00
|
|
|
private:
|
|
|
|
|
Ui::DialogCamera *ui;
|
2025-06-22 14:08:15 +08:00
|
|
|
std::vector<IVrEyeDevice*> m_deviceList; // 相机设备列表
|
|
|
|
|
std::vector<QString> m_cameraNames; // 相机名称列表
|
|
|
|
|
IVrEyeDevice* m_currentDevice = nullptr; // 当前选择的相机设备
|
|
|
|
|
int m_currentCameraIndex = 0; // 当前选择的相机索引
|
2025-06-08 12:48:04 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // DIALOGCAMERA_H
|