4 #include <QAbstractListModel>
9 class StatsModel
: public QAbstractListModel
14 TitleRole
= Qt::UserRole
+ 1,
23 QHash
<int, QByteArray
> roleNames() const;
25 StatsModel(QObject
*parent
= 0);
27 void addStats(Stats
&stats
);
29 int rowCount(const QModelIndex
& parent
= QModelIndex()) const;
31 QVariant
data(const QModelIndex
& index
, int role
= Qt::DisplayRole
) const;
35 Q_INVOKABLE
void updateAll();
38 QHash
<int, QByteArray
> roles
;
42 #endif // STATSMODEL_H