71 lines
1.8 KiB
C++
71 lines
1.8 KiB
C++
#pragma once
|
|
|
|
#include <functional>
|
|
#include <qstring.h>
|
|
#include <windows.h>
|
|
#include <iostream>
|
|
#include <qcolor.h>
|
|
#include <qpixmap.h>
|
|
#include <opencv.hpp>
|
|
enum initStatus{
|
|
NotInit,
|
|
InitFailure,
|
|
InitOK
|
|
};
|
|
|
|
struct showImgPack{
|
|
cv::Mat img;
|
|
QString name = "";
|
|
QString type;
|
|
showImgPack() {};
|
|
showImgPack(QString name,QString type) : type(type), name(name) {}
|
|
};
|
|
class qtFuncBridge : public QObject {
|
|
Q_OBJECT
|
|
signals:
|
|
// 日志相关
|
|
void loadingWindow_appendInitLog(const QString& text, const QColor& color);
|
|
void loadingWindow_modifyLog(int col, const QString& text, const QColor& color);
|
|
void loadingWindow_clearLog();
|
|
|
|
// 登录结果
|
|
void initResult(initStatus result);
|
|
|
|
// 图像显示
|
|
void displayWidget_sendImg(showImgPack pack);
|
|
|
|
// 汇总数据
|
|
void summaryData_addData(QString window, double data);
|
|
|
|
//数据到界面
|
|
void pieWidgetAddNG();
|
|
void pieWidgetAddOK();
|
|
void histogramWidgetAddData(std::vector<std::string>);
|
|
void setPlcConnectionError();
|
|
void setPlcConnectionOk();
|
|
void setCamConnectionError();
|
|
void setCamConnectionOk();
|
|
|
|
///////////////////////////////////////////////
|
|
// 切换界面
|
|
void switchMainStakedWidget(int index);
|
|
|
|
// UI 效果
|
|
void passWordEditShake();
|
|
|
|
// 加载窗口状态图标
|
|
void loadingWindow_SetLoadingIcon();
|
|
void loadingWindow_SetErrorIcon();
|
|
void loadingWindow_SetErrorText(QString text);
|
|
|
|
// 警告日志
|
|
void loadingWindow_appendWarningLog(QString text);
|
|
void loadingWindow_clearWarningLog();
|
|
//////////////////////////////////////////////////////////////
|
|
void reInitConfig();
|
|
|
|
//排障
|
|
void runCommand_addBtn(const QString& btnName, const QString& tip, const QString& uuid);
|
|
|
|
};
|
|
#pragma once |