56 lines
1.5 KiB
C++
56 lines
1.5 KiB
C++
#ifndef COMMONDIALOGCAMERA_H
|
|
#define COMMONDIALOGCAMERA_H
|
|
|
|
#include <QDialog>
|
|
#include <QComboBox>
|
|
#include <IVrEyeDevice.h>
|
|
#include <vector>
|
|
|
|
namespace Ui {
|
|
class CommonDialogCamera;
|
|
}
|
|
|
|
/**
|
|
* @brief 通用相机参数配置对话框
|
|
*
|
|
* 用于配置相机的基本参数(曝光、增益、帧率)和扫描设置(摆动速度、角度范围)
|
|
* 支持多相机选择和配置
|
|
*/
|
|
class CommonDialogCamera : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
/**
|
|
* @brief 构造函数
|
|
* @param deviceList 相机设备列表,包含相机名称和设备指针
|
|
* @param parent 父窗口
|
|
*/
|
|
explicit CommonDialogCamera(const std::vector<std::pair<std::string, IVrEyeDevice*>>& deviceList,
|
|
QWidget *parent = nullptr);
|
|
~CommonDialogCamera();
|
|
|
|
private slots:
|
|
void on_btn_camer_ok_clicked();
|
|
void on_btn_camer_cancel_clicked();
|
|
void on_camera_selection_changed(int index);
|
|
|
|
private:
|
|
// 初始化相机参数到界面
|
|
void InitCameraParameters();
|
|
|
|
// 应用界面参数到相机
|
|
bool ApplyCameraParameters(QString& errorMsg);
|
|
|
|
// 初始化相机选择下拉框
|
|
void InitCameraComboBox();
|
|
|
|
private:
|
|
Ui::CommonDialogCamera *ui;
|
|
std::vector<std::pair<std::string, IVrEyeDevice*>> m_deviceList; // 相机设备列表
|
|
IVrEyeDevice* m_currentDevice = nullptr; // 当前选择的相机设备
|
|
int m_currentCameraIndex = 0; // 当前选择的相机索引
|
|
};
|
|
|
|
#endif // COMMONDIALOGCAMERA_H
|