@ -1,4 +1,4 @@
|
||||
[General]
|
||||
StationNum=2
|
||||
Station_1=1111
|
||||
Station_2=3D9H
|
||||
Station_1=82072D
|
||||
Station_2=82071E
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
#include "CDllDesigner.h"
|
||||
#include "DllLoader.h"
|
||||
|
||||
CDllDesigner::CDllDesigner()
|
||||
{
|
||||
m_pLibDesigner = new CDllLoaderM("lpdesigner", "Lib_Designer_Init", "Lib_Designer_Free", QStringList());
|
||||
if (nullptr != m_pLibDesigner)
|
||||
{
|
||||
m_pDesigner = (IDetectorUI *)m_pLibDesigner->ModuleInit(nullptr);
|
||||
if (m_pDesigner) {
|
||||
|
||||
}
|
||||
else {
|
||||
tpDebugOut("failed to get instance from tpCoreCtrl.dll");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CDllDesigner::~CDllDesigner()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CDllDesigner::Initialize(IDetectorEngine* lpDE)
|
||||
{
|
||||
if (!lpDE)
|
||||
return false;
|
||||
if (m_pDesigner)
|
||||
{
|
||||
m_pDesigner->Initialize(lpDE);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IDetectorUI* CDllDesigner::GetDesignerInterface() const
|
||||
{
|
||||
return m_pDesigner;
|
||||
}
|
||||
|
||||
void CDllDesigner::OnManualTrigger()
|
||||
{
|
||||
emit sgCloseWindow();
|
||||
}
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
#ifndef QDETECTORDESIGNERMGR_H
|
||||
#define QDETECTORDESIGNERMGR_H
|
||||
|
||||
#include ".\lpbengine.h"
|
||||
#include ".\lpdesigner.h"
|
||||
#include <QObject>
|
||||
|
||||
class CDllDesigner : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CDllDesigner();
|
||||
virtual ~CDllDesigner();
|
||||
bool Initialize(IDetectorEngine* lpDE);
|
||||
|
||||
IDetectorUI * GetDesignerInterface() const;
|
||||
virtual void OnManualTrigger();
|
||||
|
||||
signals:
|
||||
void sgCloseWindow();
|
||||
private:
|
||||
class CDllLoaderM* m_pLibDesigner{ nullptr };
|
||||
IDetectorUI *m_pDesigner{ nullptr };
|
||||
};
|
||||
|
||||
#endif // QDETECTORDESIGNERMGR_H
|
||||
@ -1,65 +0,0 @@
|
||||
#include "QDetectorDesignerMgr.h"
|
||||
|
||||
QDetectorDesignerMgr::QDetectorDesignerMgr()
|
||||
{
|
||||
m_pDesigner = NULL;
|
||||
m_pDE = NULL;
|
||||
}
|
||||
|
||||
QDetectorDesignerMgr::~QDetectorDesignerMgr()
|
||||
{
|
||||
Quit();
|
||||
}
|
||||
|
||||
bool QDetectorDesignerMgr::Initialize(IDetectorEngine* lpDE)
|
||||
{
|
||||
if (!lpDE)
|
||||
return false;
|
||||
m_pDE = lpDE;
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_lib.setFileName("lpdesignerd.dll");
|
||||
#else
|
||||
m_lib.setFileName("lpdesigner.dll");
|
||||
#endif
|
||||
if (!m_lib.load()) {
|
||||
qDebug() << "lpdesigner lib load failed";
|
||||
return false;
|
||||
}
|
||||
qDebug() << "lib load ok";
|
||||
FnLpDesignerNewInstance pfnLpNewInstance = (FnLpDesignerNewInstance)m_lib.resolve("LpDesignerNewInstance");
|
||||
if (pfnLpNewInstance)
|
||||
pfnLpNewInstance(&m_pDesigner, m_pDE, nullptr);
|
||||
|
||||
if (!m_pDesigner)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IDetectorUI* QDetectorDesignerMgr::GetDesignerInterface() const
|
||||
{
|
||||
return m_pDesigner;
|
||||
}
|
||||
|
||||
void QDetectorDesignerMgr::Quit()
|
||||
{
|
||||
|
||||
if (m_pDesigner)
|
||||
{
|
||||
delete m_pDesigner;
|
||||
m_pDesigner = NULL;
|
||||
}
|
||||
if (m_lib.isLoaded())
|
||||
m_lib.unload();
|
||||
}
|
||||
|
||||
void QDetectorDesignerMgr::OnManualTrigger()
|
||||
{
|
||||
emit sgCloseWindow();
|
||||
}
|
||||
|
||||
void QDetectorDesignerMgr::OnSetParam(IDetectorTask* pTask)
|
||||
{
|
||||
//return m_pApp->SetParam(pTask);
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
#ifndef QDETECTORDESIGNERMGR_H
|
||||
#define QDETECTORDESIGNERMGR_H
|
||||
|
||||
#include ".\lpbengine.h"
|
||||
#include ".\lpdesigner.h"
|
||||
#include "qobject.h"
|
||||
|
||||
class QDetectorDesignerMgr : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QDetectorDesignerMgr();
|
||||
virtual ~QDetectorDesignerMgr();
|
||||
bool Initialize(IDetectorEngine* lpDE);
|
||||
void Quit();
|
||||
IDetectorUI * GetDesignerInterface() const;
|
||||
virtual void OnManualTrigger();
|
||||
virtual void ResetItem(QPoint pos, QRect size){}
|
||||
virtual void OnSetParam(IDetectorTask* pTask);
|
||||
|
||||
signals:
|
||||
void sgCloseWindow();
|
||||
private:
|
||||
|
||||
private:
|
||||
QLibrary m_lib;
|
||||
IDetectorUI *m_pDesigner;
|
||||
IDetectorEngine *m_pDE;
|
||||
};
|
||||
|
||||
#endif // QDETECTORDESIGNERMGR_H
|
||||
@ -0,0 +1,60 @@
|
||||
#include "CDetectorUI.h"
|
||||
|
||||
CDetectorUI::CDetectorUI()
|
||||
{
|
||||
m_pMainFrame = new CMainFrame;
|
||||
}
|
||||
|
||||
CDetectorUI::~CDetectorUI()
|
||||
{
|
||||
if (m_pMainFrame)
|
||||
{
|
||||
delete m_pMainFrame;
|
||||
m_pMainFrame = nullptr;
|
||||
}
|
||||
if (m_pDE)
|
||||
{
|
||||
m_pDE = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool CDetectorUI::Initialize(IDetectorEngine* lpDE)
|
||||
{
|
||||
if (!lpDE)
|
||||
return false;
|
||||
|
||||
m_pDE = lpDE;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CDetectorUI::ShowMainFrame(class QWidget* parent)
|
||||
{
|
||||
if (!m_pMainFrame->Initialize(m_pDE))
|
||||
return false;
|
||||
|
||||
if (!m_pMainFrame->InitGraphView())
|
||||
return false;
|
||||
|
||||
m_pMainFrame->setParent(parent);
|
||||
m_pMainFrame->setWindowFlags(Qt::Dialog | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
|
||||
m_pMainFrame->setWindowIcon(QIcon(":/image/leaper"));
|
||||
m_pMainFrame->setWindowModality(Qt::ApplicationModal);
|
||||
m_pMainFrame->setAttribute(Qt::WA_ShowModal, true);
|
||||
|
||||
m_pMainFrame->show();
|
||||
return true;
|
||||
}
|
||||
|
||||
void CDetectorUI::HideMainFrame()
|
||||
{
|
||||
m_pMainFrame->hide();
|
||||
}
|
||||
|
||||
bool CDetectorUI::IsMainFrameHidden()
|
||||
{
|
||||
return m_pMainFrame->isHidden();
|
||||
}
|
||||
|
||||
|
||||
@ -1,56 +0,0 @@
|
||||
#include "LPDsg.h"
|
||||
|
||||
CDetectorUI::CDetectorUI()
|
||||
{
|
||||
m_pMainFrame = new CMainFrame;
|
||||
}
|
||||
|
||||
CDetectorUI::~CDetectorUI()
|
||||
{
|
||||
if (m_pMainFrame)
|
||||
{
|
||||
delete m_pMainFrame;
|
||||
m_pMainFrame = nullptr;
|
||||
}
|
||||
if (m_pDE)
|
||||
{
|
||||
m_pDE = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool CDetectorUI::Initialize(IDetectorEngine* lpDE)
|
||||
{
|
||||
if (!lpDE)
|
||||
return false;
|
||||
|
||||
m_pDE = lpDE;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CDetectorUI::ShowDeviceMgrDlg()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CDetectorUI::ShowSolutionMgrDlg()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CDetectorUI::ShowMainFrame()
|
||||
{
|
||||
if (!m_pMainFrame->Initialize(m_pDE))
|
||||
return false;
|
||||
|
||||
if (!m_pMainFrame->InitGraphView())
|
||||
return false;
|
||||
|
||||
m_pMainFrame->show();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CDetectorUI::ShowReportView(QMap<QString, QVariant> statInfo)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -1,19 +1,17 @@
|
||||
#include "lpdesigner.h"
|
||||
#include "LPDsg.h"
|
||||
#include "CDetectorUI.h"
|
||||
|
||||
void LpDesignerNewInstance(IDetectorUI **lppDetectorUI, IDetectorEngine *lpDE, IDetectorUISink* lpSink)
|
||||
LPDESIGNER_EXPORT IDetectorUI* Lib_Designer_Init(void)
|
||||
{
|
||||
CDetectorUI *g_pDetectUI = new CDetectorUI;
|
||||
if (g_pDetectUI)
|
||||
{
|
||||
if(!g_pDetectUI->Initialize(lpDE))
|
||||
return;
|
||||
}
|
||||
|
||||
*lppDetectorUI = (IDetectorUI *)g_pDetectUI;
|
||||
CDetectorUI *g_pDetectUI = new CDetectorUI();
|
||||
return (IDetectorUI*)g_pDetectUI;
|
||||
}
|
||||
|
||||
bool LpDesignerDeleteInstance()
|
||||
LPDESIGNER_EXPORT void Lib_Designer_Free(IDetectorUI *ptr)
|
||||
{
|
||||
return true;
|
||||
if (ptr)
|
||||
{
|
||||
delete ptr;
|
||||
ptr = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 757 B |
|
After Width: | Height: | Size: 446 B |
|
After Width: | Height: | Size: 477 B |
|
After Width: | Height: | Size: 431 B |
|
After Width: | Height: | Size: 461 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1020 B |
|
After Width: | Height: | Size: 1023 B |
|
After Width: | Height: | Size: 943 B |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 966 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 822 B |
|
After Width: | Height: | Size: 1017 B |
|
After Width: | Height: | Size: 665 B |