74 lines
2.1 KiB
C++
74 lines
2.1 KiB
C++
#ifndef WIDGET_H
|
||
#define WIDGET_H
|
||
|
||
#include <QWidget>
|
||
#include "CameraOperationThread.h"
|
||
|
||
namespace Ui {
|
||
class Widget;
|
||
}
|
||
|
||
class Widget : public QWidget
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
explicit Widget(QWidget *parent = nullptr);
|
||
~Widget();
|
||
|
||
public slots:
|
||
/* @brief:在界面上显示图像
|
||
* @param[in] img:QImage图像
|
||
*
|
||
* @brief:Diasplay an image on user interface
|
||
* @param[in] img:image */
|
||
void onImageGrabbed(const QString &devName, const QImage& img);
|
||
|
||
private slots:
|
||
/* @brief:扫描相机按钮的槽函数
|
||
*
|
||
* @brief:Slot function of probe push button. */
|
||
void on_pushButton_probe_clicked();
|
||
/* @brief:打开相机按钮的槽函数
|
||
*
|
||
* @brief:Slot function of open camera push button. */
|
||
void on_pushButton_openCamera_clicked();
|
||
/* @brief:开始采集按钮的槽函数
|
||
*
|
||
* @brief:Slot function of start acquisitio push button. */
|
||
void on_pushButton_startGrab_clicked();
|
||
/* @brief:关闭相机按钮的槽函数
|
||
*
|
||
* @brief:Slot function of close camera push button. */
|
||
void on_pushButton_closeCamera_clicked();
|
||
/* @brief:停止采集按钮的槽函数
|
||
*
|
||
* @brief:Slot function of stop acquisitio push button. */
|
||
void on_pushButton_stopGrab_clicked();
|
||
|
||
/* @brief:处理设备操作线程结束信号
|
||
* @param[in] nIndex: 操作的相机索引
|
||
* @param[in] nType:操作类型
|
||
* @param[in] bSuccess:是否成功
|
||
*
|
||
* @brief:Handle control thread finish signal
|
||
* @param[in] nIndex: index of operated camera
|
||
* @param[in] nType:type of control
|
||
* @param[in] bSuccess:whether success */
|
||
void onControlFinish(int nIndex, ITK_DEVICE_CONTROL_TYPE nType, bool bSuccess);
|
||
|
||
/* @brief:处理选择采集卡配置的信号
|
||
* @param[in] devName:设备名称
|
||
*
|
||
* @brief:Slot function of select grab config file.
|
||
* @param[in] devName: Name of device */
|
||
QString onSelectGrabConfig(const QString& devName);
|
||
|
||
private:
|
||
Ui::Widget *ui;
|
||
DeviceControlThread* mCtrlThread;
|
||
|
||
};
|
||
|
||
#endif // WIDGET_H
|