74 lines
2.1 KiB
C
Raw Normal View History

2025-12-10 00:01:32 +08:00
#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] imgQImage图像
*
* @briefDiasplay an image on user interface
* @param[in] imgimage */
void onImageGrabbed(const QString &devName, const QImage& img);
private slots:
/* @brief扫描相机按钮的槽函数
*
* @briefSlot function of probe push button. */
void on_pushButton_probe_clicked();
/* @brief打开相机按钮的槽函数
*
* @briefSlot function of open camera push button. */
void on_pushButton_openCamera_clicked();
/* @brief开始采集按钮的槽函数
*
* @briefSlot function of start acquisitio push button. */
void on_pushButton_startGrab_clicked();
/* @brief关闭相机按钮的槽函数
*
* @briefSlot function of close camera push button. */
void on_pushButton_closeCamera_clicked();
/* @brief停止采集按钮的槽函数
*
* @briefSlot function of stop acquisitio push button. */
void on_pushButton_stopGrab_clicked();
/* @brief处理设备操作线程结束信号
* @param[in] nIndex:
* @param[in] nType
* @param[in] bSuccess
*
* @briefHandle control thread finish signal
* @param[in] nIndex: index of operated camera
* @param[in] nTypetype of control
* @param[in] bSuccesswhether success */
void onControlFinish(int nIndex, ITK_DEVICE_CONTROL_TYPE nType, bool bSuccess);
/* @brief处理选择采集卡配置的信号
* @param[in] devName
*
* @briefSlot 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