2 * Copyright (C) 2009 Sakari Poussa
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, version 2.
10 #include <QAbstractListModel>
14 class ScoreListModel : public QAbstractListModel
20 ScoreListModel(QList<Score *> &sList, QList<Club *> &cList, QObject *parent = 0)
21 : QAbstractListModel(parent), scoreList(sList), clubList(cList) {}
23 QVariant data(const QModelIndex & index, int role) const;
24 int rowCount(const QModelIndex & parent) const;
26 void update(QList<Score *> &list);
29 QList<Score *> scoreList;
30 QList<Club *> clubList;
33 class CourseListModel : public QAbstractListModel
39 CourseListModel(QList<Club *> &list, QObject *parent = 0);
41 int rowCount(const QModelIndex & parent) const;
42 QVariant data(const QModelIndex & index, int role) const;
43 void update(QList<Club *> &list);
47 QList<Club *> clubList;
48 QList<QString *> clubAndCourseList;