Implemented basic speed game

This commit is contained in:
2021-07-17 05:09:39 +02:00
parent 294c2c32e9
commit b7f418c3a9
44 changed files with 2088 additions and 0 deletions

48
devicefinder.h Normal file
View File

@@ -0,0 +1,48 @@
#ifndef DEVICEFINDER_H
#define DEVICEFINDER_H
#include "bluetoothbaseclass.h"
#include <QTimer>
#include <QVariant>
#include <QBluetoothDeviceDiscoveryAgent>
#include <QBluetoothDeviceInfo>
class DeviceInfo;
class DeviceHandler;
class DeviceFinder: public BluetoothBaseClass
{
Q_OBJECT
Q_PROPERTY(bool scanning READ scanning NOTIFY scanningChanged)
Q_PROPERTY(QVariant devices READ devices NOTIFY devicesChanged)
public:
DeviceFinder(DeviceHandler *handler, QObject *parent = nullptr);
~DeviceFinder();
bool scanning() const;
QVariant devices();
public slots:
void startSearch();
void connectToService(const QString &address);
private slots:
void addDevice(const QBluetoothDeviceInfo&);
void scanError(QBluetoothDeviceDiscoveryAgent::Error error);
void scanFinished();
signals:
void scanningChanged();
void devicesChanged();
private:
DeviceHandler *m_deviceHandler;
QBluetoothDeviceDiscoveryAgent *m_deviceDiscoveryAgent;
QList<QObject*> m_devices;
};
#endif // DEVICEFINDER_H