summaryrefslogtreecommitdiff
path: root/qmlplugin/hrDataLoader.h
diff options
context:
space:
mode:
authorArseniy-Movshev <dodoradio@outlook.com>2023-07-21 11:51:27 +0100
committerArseniy-Movshev <dodoradio@outlook.com>2023-07-21 13:44:08 +0100
commitd69ab590c71fabc0135b2b07a8859a80e556cdf5 (patch)
treee1e7d9dd5a7f869628cad5d17576c13fb3ce2037 /qmlplugin/hrDataLoader.h
parent439c082257448309073c312f008888568628323b (diff)
Add filesystem watchers to hrdataloader to update when new data comes in
When data for a specific file is requested, that file is added to the watch list. Currently these files aren't ever removed from the watch list, hopefully we won't be loading enough files to cause problems, at least for now
Diffstat (limited to '')
-rw-r--r--qmlplugin/hrDataLoader.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/qmlplugin/hrDataLoader.h b/qmlplugin/hrDataLoader.h
index 78ac571..f14eacf 100644
--- a/qmlplugin/hrDataLoader.h
+++ b/qmlplugin/hrDataLoader.h
@@ -15,6 +15,7 @@
#include <QDBusInterface>
#include <QPointF>
#include <QDate>
+#include <QFileSystemWatcher>
class HrDataLoader : public QObject
{
@@ -27,8 +28,11 @@ public:
Q_INVOKABLE void triggerDaemonRecording();
Q_INVOKABLE QVariant getDataFromTo(QDate date1, QDate date2);
QList<QPointF> getRawDataForDate(QDate date);
+signals:
+ void dataChanged();
private:
QDBusInterface *m_iface;
+ QFileSystemWatcher *m_fileWatcher;
};
#endif // HRDATALOADER_H