Add graphs generated from journey data
[harbour-pedalo.git] / src / statsmodel.h
index 2c9991a..662cf79 100644 (file)
@@ -11,15 +11,20 @@ class StatsModel : public QAbstractListModel
     Q_OBJECT
 public:
     enum StatsRoles {
-        ValuesRole = Qt::UserRole + 1,
-        LabelsRole
+        TitleRole = Qt::UserRole + 1,
+        ValuesRole,
+        LabelsRole,
+        UnitsRole,
+        MinValRole,
+        MaxValRole,
+        StepRole
     };
 
     QHash<int, QByteArray> roleNames() const;
 
     StatsModel(QObject *parent = 0);
 
-    void addStats(const Stats &stats);
+    void addStats(Stats &stats);
 
     int rowCount(const QModelIndex & parent = QModelIndex()) const;
 
@@ -27,9 +32,11 @@ public:
 
     void clear();
 
+    Q_INVOKABLE void updateAll();
+
 private:
     QHash<int, QByteArray> roles;
-    QList<Stats> stats;
+    QList<Stats *> stats;
 };
 
 #endif // STATSMODEL_H