4 #include <QAbstractListModel>
9 class StatsModel
: public QAbstractListModel
14 TitleRole
= Qt::UserRole
+ 1,
24 QHash
<int, QByteArray
> roleNames() const;
26 StatsModel(QObject
*parent
= 0);
28 void addStats(Stats
&stats
);
30 int rowCount(const QModelIndex
& parent
= QModelIndex()) const;
32 QVariant
data(const QModelIndex
& index
, int role
= Qt::DisplayRole
) const;
36 Q_INVOKABLE
void updateAll();
39 QHash
<int, QByteArray
> roles
;
44 #endif // STATSMODEL_H