init files

This commit is contained in:
rci
2024-09-27 14:31:22 +08:00
parent d04db633b4
commit a2ce7826dc
407 changed files with 123645 additions and 93 deletions
@@ -0,0 +1,52 @@
#ifndef PBGLOBALOBJECT_H
#define PBGLOBALOBJECT_H
#include <QObject>
#include<opencv2/opencv.hpp>
#include <opencv.hpp>
using namespace std;
//支持的PLC通信协议类型
enum class PLC_MODULE_TYPE
{
FinsTcp,
ModbusTcp,
McAsciiTcp,
McA1ETcp,
McBinaryTcp,
PanasonicMC,
InovanceH5UTcp,
Count,//总数,加协议类型须在前面添加
};
class PbGlobalObject : public QObject
{
Q_OBJECT
public:
explicit PbGlobalObject(int settype, QObject* parent = nullptr) : QObject(parent), type1(settype) {}
virtual ~PbGlobalObject() {}
virtual bool setParameter(const QMap<QString, QString> &) { return true; }
virtual QMap<QString,QString> parameters() = 0;
virtual bool init() { return true; }
virtual bool setData(const vector<cv::Mat> &, const QStringList &) { return true; }
virtual bool data(std::vector<cv::Mat> &, QStringList &) { return true; }
public:
//大类
enum PGOFAMLIY { GLOBALVARIABLE = 0, CAMERA2D, CAMERA2_5D, CAMERA3D, PLC, COM }famliy;
//小类
int type1 = -1; //对应哪个品牌相机(触发方式)/通信
int type2 = -1;
int type3 = -1;
QString name = "";
int id;
signals:
void trigged(bool);
private:
};
#endif // PBGLOBALOBJECT_H