Clean up some old test code and make sure graphs have right paramaters to be viewed.

This commit is contained in:
2019-11-13 16:23:51 -05:00
parent 1303626dd8
commit e8d666d922
6 changed files with 76 additions and 59 deletions

View File

@@ -28,8 +28,8 @@
#include <QQmlListProperty>
#include <QAbstractItemModel>
#include <QDateTime>
#include <QStandardItemModel>
#include "florahistory.h"
#include <QXYSeries>
/**
* Class using QtBluetooth to find and retrive info from Mi Flora devices.
@@ -43,19 +43,20 @@ class MiFlora : public QObject
Q_PROPERTY(quint16 conduction NOTIFY conductionChanged MEMBER conduct)
Q_PROPERTY(quint8 battery NOTIFY batteryChanged MEMBER battery)
Q_PROPERTY(QQmlListProperty<BluetoothDevices> devices READ getDeviceList NOTIFY newDeviceFound)
Q_PROPERTY(QAbstractTableModel* model READ getModel NOTIFY historyUpdated)
Q_PROPERTY(QAbstractTableModel* model READ getModel NOTIFY modelUpdated)
public:
Q_INVOKABLE void startSearch();
Q_INVOKABLE void stopSearch();
Q_INVOKABLE void updateDataFromDevice(QString mac);
QQmlListProperty<BluetoothDevices> getDeviceList();
QAbstractTableModel* getModel();
signals:
void newDeviceFound();
void historyUpdated();
void modelUpdated();
void temperatureChanged(float temperature);
void brightnessChanged(quint32 brightness);
void moistureChanged(quint8 moisture);