38 lines
816 B
C++
38 lines
816 B
C++
#pragma once
|
|
|
|
#include <QtWidgets>
|
|
#include <QImage>
|
|
|
|
class HikWidget : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit HikWidget(QWidget *parent = nullptr);
|
|
|
|
private:
|
|
void initUI();
|
|
void connectAllSignalsAndSlots();
|
|
|
|
// 图像变量
|
|
QImage m_image;
|
|
|
|
// 左侧视图
|
|
QGraphicsScene *m_scene;
|
|
QGraphicsPixmapItem *m_pixmapItem;
|
|
QGraphicsView *m_gv;
|
|
|
|
// 相机操作按钮
|
|
QPushButton *m_btn_openCamera;
|
|
QPushButton *m_btn_closeCamera;
|
|
QPushButton *m_btn_startGrabbing;
|
|
QPushButton *m_btn_stopGrabbing;
|
|
|
|
// 图像保存控件
|
|
QLineEdit *m_edit_savePath;
|
|
QComboBox *m_cmb_imgFormat;
|
|
QPushButton *m_btn_openDir;
|
|
QPushButton *m_btn_saveImage;
|
|
|
|
// 相机参数控件
|
|
QDoubleSpinBox *m_spin_exposureTime;
|
|
QDoubleSpinBox *m_spin_gain;
|
|
}; |