Files
GUI/src/device/DeviceManager.h

33 lines
608 B
C
Raw Normal View History

//
// Created by Krad on 2021/10/12.
//
#ifndef GUI_DEVICEMANAGER_H
#define GUI_DEVICEMANAGER_H
#include <QObject>
class DeviceManager:public QObject {
Q_OBJECT
public:
static DeviceManager* Default(){
static DeviceManager manager;
return &manager;
}
void initDevice();
protected:
void timerEvent(QTimerEvent* event) override ;
private:
2021-10-20 15:55:15 +08:00
void processScan(const char * json,bool empty = false);
int timerID = -1;
int deviceInfTimerID = -1;
int lastStatus=-1;
bool previewing = false;
bool errorOccured = false;
};
#endif //GUI_DEVICEMANAGER_H