LedDisplay/OmobiDisplayApp/omobidisplaybackend.h

34 lines
793 B
C++

#ifndef OMOBIDISPLAYBACKEND_H
#define OMOBIDISPLAYBACKEND_H
#include <QObject>
#include <qbluetoothleuart.h>
class OmobiDisplayBackend : public QObject
{
Q_OBJECT
Q_PROPERTY(QBluetoothLeUart* bleController READ getBleController NOTIFY bleControllerChanged)
public:
explicit OmobiDisplayBackend(QObject *parent = nullptr);
Q_INVOKABLE void startScanning();
private:
QBluetoothLeUart *ble;
public slots:
QBluetoothLeUart* getBleController();
private slots:
void handleBluetoothStateChange(QBluetoothLeUart::BluetoothLeUartState state);
void handleFoundNewDevice(QBluetoothLeUartDevice* device);
void DataHandler(const QString &s);
void handleBluetoothDeviceConected();
signals:
void bleControllerChanged();
};
#endif // OMOBIDISPLAYBACKEND_H