Q_OBJECT
public:
enum StatsRoles {
- ValuesRole = Qt::UserRole + 1,
- LabelsRole
+ TitleRole = Qt::UserRole + 1,
+ BarValuesRole,
+ LineValuesRole,
+ 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;
void clear();
+ Q_INVOKABLE void updateAll();
+
private:
QHash<int, QByteArray> roles;
- QList<Stats> stats;
+ QList<Stats *> stats;
+ int visibleIndex;
};
#endif // STATSMODEL_H