You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.5 KiB
C++
74 lines
2.5 KiB
C++
#ifndef SOLUTION_H
|
|
#define SOLUTION_H
|
|
|
|
#include "lpbengine.h"
|
|
|
|
class CDetectorSolution : public IDetectorSolution
|
|
{
|
|
public:
|
|
CDetectorSolution();
|
|
virtual ~CDetectorSolution();
|
|
virtual bool SetSolutionInfo(const PLP_DETECTOR_SOLUTION pSolution);
|
|
virtual PLP_DETECTOR_SOLUTION GetSolutionInfo();
|
|
virtual IDetectorTask* AddTask(const PLP_DETECTOR_TASK pTask, bool bRet = true);
|
|
bool AddTaskByCopy(IDetectorTask* pSrc);
|
|
virtual bool SetRunTask(int nCameraID, QString strTaskName);
|
|
IDetectorTask* AddTask(const PLP_DETECTOR_TASK pTask, QString strPath);
|
|
virtual bool DeleteTask(int nTaskID);
|
|
bool DeleteTask(QString strName);
|
|
virtual IDetectorTask* GetTask(int nTaskID);
|
|
IDetectorTask* GetTask(QString strName);
|
|
virtual int EnumTask(IDetectorTask** lppTask, int nCount);
|
|
virtual void Release();
|
|
virtual int GetID() const;
|
|
void SetID(int nID);
|
|
virtual int GetTaskBaseID() const;
|
|
|
|
virtual bool GetRunState();
|
|
virtual void SetRunState(bool bRun);
|
|
virtual bool GetModifyFlag();
|
|
virtual void SetModifyFlag(bool bModify);
|
|
|
|
virtual IDetectorTask* GetTaskByCameraID(int nCameraID);
|
|
bool Initialize(/*IAlgorithmShare* pAlgoShare,*/ IAlgorithmLibMgr* pAlgoLibMgr);
|
|
void CleanUp();
|
|
virtual IDetectorSolution* Copy();
|
|
virtual bool Copy(IDetectorSolution* pSrcSolution, bool bRet = true);
|
|
virtual IDetectorTask* AddAndCopyTask(IDetectorTask* pSrcTask, LP_DETECTOR_TASK tTaskInfo);
|
|
virtual bool GenerateDataTable();
|
|
virtual bool ExportData(QString strFileName, QString strStarTime = "", QString strEndTime = "");
|
|
|
|
virtual bool InsertTaskOrder(int nID, int nIndex);
|
|
|
|
virtual void SaveUserParamValue();
|
|
virtual void LoadUserParamValue();
|
|
virtual void ClearUserParamValue();
|
|
|
|
virtual QStringList GetAllTaskNames();
|
|
virtual QMap<int, IDetectorTask*> GetRunningTask();
|
|
bool CheckTask(int nTaskID, QString strTaskName);
|
|
|
|
virtual bool SaveFileEx(const QString& strPath);
|
|
virtual bool SaveFileEx(const QString& strPath, QStringList sTaskNames);
|
|
virtual bool LoadFileEx(const QString& strPath);
|
|
virtual bool SaveFile(const QString& strPath);
|
|
virtual bool LoadFile(const QString& strPath);
|
|
bool SerializeToJson(QJsonObject& jsonObject);
|
|
bool SerializeFromJson(QJsonObject* pJsonObject);
|
|
private:
|
|
int m_nID;
|
|
int m_nBaseID;
|
|
bool m_bIsRun;
|
|
bool m_bIsModify;
|
|
LP_DETECTOR_SOLUTION m_tSolutionInfo;
|
|
QMap<QString, IDetectorTask*> m_TaskMapByName;
|
|
QMap<int, IDetectorTask*> m_TaskMapByID;
|
|
QMap<int, IDetectorTask*> m_CurRunTaskMap;//CamID(int),TaskPtr(IDetectorTask*)
|
|
|
|
// IAlgorithmShare* m_pAlgoShare;
|
|
IAlgorithmLibMgr* m_pAlgoLibMgr;
|
|
|
|
QMutex m_mutex;
|
|
};
|
|
|
|
#endif // SOLUTION_H
|