Add a class called DeviceManager to manage ShimLib operation.
This commit is contained in:
32
src/device/DeviceManager.h
Normal file
32
src/device/DeviceManager.h
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// 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 setDeviceErrorCallBack();
|
||||
void initDevice();
|
||||
|
||||
protected:
|
||||
void timerEvent(QTimerEvent* event) override ;
|
||||
|
||||
private:
|
||||
void processScan(const char * json);
|
||||
int timerID = -1;
|
||||
int lastStatus=-1;
|
||||
bool previewing = false;
|
||||
bool errorOccured = false;
|
||||
};
|
||||
|
||||
|
||||
#endif //GUI_DEVICEMANAGER_H
|
||||
Reference in New Issue
Block a user