Object Detection
5.0
Image Processing Using Qt and Opencv
devicemanager.cpp
1
#include "devicemanager.h"
2
#include "Serial/serialhandler.h"
3
#include "Bluetooth/bluetoothhandler.h"
4
DeviceManager::DeviceManager(QObject *parent) : QObject(parent)
5
{
6
//TODO add Bluetooth handler For IOS and Android
7
#if !defined(Q_OS_ANDROID) || !defined(Q_OS_IOS)
8
_devWriter =
new
Devices::SerialHandler
(
this
);
9
#else
10
_devWriter =
new
Devices::BluetoothHandler
(
this
);
11
#endif
12
13
}
14
15
Devices::AbstractDeviceWriter
*DeviceManager::devWriter()
const
16
{
17
return
_devWriter;
18
}
19
20
void
DeviceManager::setDevWriter(
Devices::AbstractDeviceWriter
*devWriter)
21
{
22
_devWriter = devWriter;
23
}
24
25
Devices::DeviceManager
& Devices::DeviceManager::instance(QObject *parent)
26
{
27
static
DeviceManager
_instance;
28
29
return
_instance;
30
}
Devices::SerialHandler
Definition:
serialhandler.h:14
Devices::BluetoothHandler
Definition:
bluetoothhandler.h:10
Devices::AbstractDeviceWriter
Definition:
abstractdevicewriter.h:14
Devices::DeviceManager
Definition:
devicemanager.h:12
object-detector
src
DevicesInterfaces
DeviceHandler
devicemanager.cpp
Generated by
1.8.13