From 6087e0b0dd7a5246aca9024ef777b62080d35834 Mon Sep 17 00:00:00 2001 From: Arseniy-Movshev Date: Thu, 8 Jun 2023 10:59:36 +0100 Subject: StepsDataLoader: Add a way to get the full day's data additionally, this renames the current data access function to 'getTotalForDate()' while the new function gets the old name of 'getDataForDate()'. This naming seems more appropriate. This should allow apps using the QML interface to implement their own graphs --- qmlplugin/stepsDataLoader.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'qmlplugin/stepsDataLoader.h') diff --git a/qmlplugin/stepsDataLoader.h b/qmlplugin/stepsDataLoader.h index 869b434..fa551a3 100644 --- a/qmlplugin/stepsDataLoader.h +++ b/qmlplugin/stepsDataLoader.h @@ -13,6 +13,7 @@ #include #include +#include class StepsDataLoader : public QObject { @@ -20,8 +21,10 @@ class StepsDataLoader : public QObject public: explicit StepsDataLoader(); - Q_INVOKABLE int getDataForDate(QDate date); - Q_INVOKABLE int getTodayData(); + Q_INVOKABLE int getTotalForDate(QDate date); + Q_INVOKABLE int getTodayTotal(); + Q_INVOKABLE QList getDataForDate(QDate date); + Q_INVOKABLE QList getTodayData(); Q_INVOKABLE void triggerDaemonRecording(); private: QDBusInterface *m_iface; -- cgit v1.2.3-54-g00ecf