46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#ifndef DIALOGCAMERA_H
|
|
#define DIALOGCAMERA_H
|
|
|
|
#include <QDialog>
|
|
#include <QComboBox>
|
|
#include <IVrEyeDevice.h>
|
|
#include <vector>
|
|
|
|
namespace Ui {
|
|
class DialogCamera;
|
|
}
|
|
|
|
class DialogCamera : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
// 支持多相机的构造函数
|
|
explicit DialogCamera(const std::vector<std::pair<std::string, IVrEyeDevice*>>& deviceList,
|
|
QWidget *parent = nullptr);
|
|
~DialogCamera();
|
|
|
|
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();
|
|
|
|
// 初始化相机选择下拉框
|
|
void InitCameraComboBox();
|
|
|
|
private:
|
|
Ui::DialogCamera *ui;
|
|
std::vector<std::pair<std::string, IVrEyeDevice*>> m_deviceList; // 相机设备列表
|
|
IVrEyeDevice* m_currentDevice = nullptr; // 当前选择的相机设备
|
|
int m_currentCameraIndex = 0; // 当前选择的相机索引
|
|
};
|
|
|
|
#endif // DIALOGCAMERA_H
|