diff options
-rw-r--r-- | qmlplugin/weightDataLoader.cpp | 4 | ||||
-rw-r--r-- | qmlplugin/weightDataLoader.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/qmlplugin/weightDataLoader.cpp b/qmlplugin/weightDataLoader.cpp index a81201a..2331252 100644 --- a/qmlplugin/weightDataLoader.cpp +++ b/qmlplugin/weightDataLoader.cpp @@ -53,6 +53,10 @@ QVariant WeightDataLoader::getDataForDate(QDate date) { return QVariant::fromValue(m_filedata); } +void WeightDataLoader::addDataPoint(qreal value) { + fileAddRecord("weight",QString::number(value)); +} + void WeightDataLoader::triggerDaemonRecording() { m_iface->call("triggerRecording"); } diff --git a/qmlplugin/weightDataLoader.h b/qmlplugin/weightDataLoader.h index 63067f4..606f066 100644 --- a/qmlplugin/weightDataLoader.h +++ b/qmlplugin/weightDataLoader.h @@ -25,6 +25,7 @@ public: Q_INVOKABLE QVariant getDataForDate(QDate date); Q_INVOKABLE QVariant getTodayData(); Q_INVOKABLE void triggerDaemonRecording(); + Q_INVOKABLE void addDataPoint(qreal value); private: QDBusInterface *m_iface; }; |