59 lines
1.0 KiB
C++
59 lines
1.0 KiB
C++
//WORKING
|
|
#include <logService.hpp>
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <cachePool.hpp>
|
|
#include <appConfig.h>
|
|
#include <pythonCpp.h>
|
|
//QT
|
|
#include <appCoreQtFunction.h>
|
|
#include <qtimer.h>
|
|
|
|
|
|
#define disableBackEndCheck 1
|
|
#define disableeAlgo 0
|
|
#define enableHideConsle 1
|
|
class detGlobalData
|
|
{
|
|
public:
|
|
std::string productTypeStr;
|
|
std::string currentSn;
|
|
int productType = 0;
|
|
int indexOfArm = 0;
|
|
};
|
|
/// <summary>
|
|
/// APP BASIC
|
|
/// </summary>
|
|
class appCore :public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
appCore()
|
|
: _productDataCache(10)
|
|
{
|
|
};
|
|
pythonCpp _pythonCpp;
|
|
LRUCache<std::string, productCacheBase> _productDataCache;//²úÆ·ÐÅÏ¢»º´æ
|
|
qtFunction _qtFunc;
|
|
appConfig _appConfig;
|
|
logService _logService;
|
|
detGlobalData _detGlobalData;
|
|
QTimer* hourQTimer,*halfSecQTimer;
|
|
void initTimer()
|
|
{
|
|
hourQTimer = new QTimer();
|
|
hourQTimer->start(3600000);
|
|
|
|
halfSecQTimer = new QTimer();
|
|
halfSecQTimer->start(500);
|
|
}
|
|
public slots:
|
|
void switchProductSignal()
|
|
{
|
|
|
|
}
|
|
};
|
|
//
|
|
|
|
extern appCore _core;
|
|
#pragma once |