2025-10-23 17:03:38 +08:00
|
|
|
#include <nlohmannJson.hpp>
|
2025-06-05 11:30:12 +08:00
|
|
|
#include <qtBridge.h>
|
2025-07-25 00:29:52 +08:00
|
|
|
#include <sql/qSqlBase.h>
|
2025-10-23 16:50:39 +08:00
|
|
|
class IBackend :public QThread {
|
2025-10-23 13:31:18 +08:00
|
|
|
Q_OBJECT
|
2025-03-27 18:36:54 +08:00
|
|
|
public:
|
|
|
|
|
virtual ~IBackend() = default;
|
2025-08-31 16:51:18 +08:00
|
|
|
virtual void init(SQLiteDB* ,qtFuncBridge*,nlohmann::ordered_json& json) = 0;
|
2025-03-28 18:33:43 +08:00
|
|
|
virtual void cleanup() = 0;
|
2025-10-24 11:16:38 +08:00
|
|
|
public slots:
|
2025-09-19 12:38:05 +08:00
|
|
|
virtual bool excuteCliCommand(const QString& command) = 0;
|
2025-08-20 16:57:03 +08:00
|
|
|
virtual bool excuteCliCommandPreset(const QString& uuid) = 0;
|
2025-10-23 16:50:39 +08:00
|
|
|
virtual void triggerAndCaptureImage(std::string cameraName, std::vector<cv::Mat>* mats) = 0;
|
2025-10-24 23:47:00 +08:00
|
|
|
virtual void getCameraNames(std::vector<std::string>* cameraNames) = 0;
|
|
|
|
|
|
2025-03-27 18:36:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
__declspec(dllexport) IBackend* CreateBackend();
|
|
|
|
|
__declspec(dllexport) void ReleaseBackend(IBackend* backend);
|
|
|
|
|
}
|
|
|
|
|
typedef IBackend* (*CreateBackendFunc)();
|
|
|
|
|
typedef void (*ReleaseBackendFunc)(IBackend*);
|
|
|
|
|
#pragma once
|