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.
wheeldetect/tpvs17/tpMain/lpMainWin.cpp

71 lines
1.4 KiB
C++

#include "lpMainWin.h"
#pragma execution_character_set("utf-8")
lpMainWin::lpMainWin(QWidget *parent)
: QMainWindow(parent)
{
onInitCoreCtrl();
ui.setupUi(this);
}
lpMainWin::~lpMainWin()
{
if (m_pDllCoreCtrl)
{
delete m_pDllCoreCtrl;
m_pDllCoreCtrl = nullptr;
}
}
bool lpMainWin::onInitCoreCtrl()
{
//load coretrl
if (NULL == m_pDllCoreCtrl)
{
m_pDllCoreCtrl = new CDllCoreCtrl(QStringList(), nullptr);
if (NULL == m_pDllCoreCtrl)
{
return false;
}
m_pCoreCtrl = m_pDllCoreCtrl->m_pCoreCtrl;
FuncCallBack_VarInt getVarfunc = std::bind(&lpMainWin::IGetVariantById, this, std::placeholders::_1);
m_pCoreCtrl->IRegisterGetVariant(getVarfunc);
FuncCallBack_StrMap strMapfunc = std::bind(&lpMainWin::IVariantMapToUI, this, std::placeholders::_1, std::placeholders::_2);
m_pCoreCtrl->IRegisterResultCallBack(strMapfunc);
FuncCallBack_StrImg strImgfunc = std::bind(&lpMainWin::INewCameraImage, this, std::placeholders::_1, std::placeholders::_2);
m_pCoreCtrl->IRegisterImageCallBack(strImgfunc);
return true;
}
return false;
}
void lpMainWin::INewCameraImage(const QString& camKey, QImage img)
{
}
void lpMainWin::IVariantMapToUI(const QString& camKey, const QVariantMap& vMap)
{
}
QVariant lpMainWin::IGetVariantById(int id)
{
return QVariant();
}
void lpMainWin::timerEvent(QTimerEvent *event)
{
}
void lpMainWin::closeEvent(QCloseEvent *event)
{
}