1 #include <QAbstractTableModel>
10 void setYear(QString &year) { m_year = year.toInt(); }
11 int year() { return m_year; }
13 void setRounds(int n) { m_rounds = n; }
14 int rounds() { return m_rounds; }
16 void setAverage(int n) { m_average = n; }
17 int average() { return m_average; }
19 void setMin(int n) { m_min = n; }
20 int min() { return m_min; }
22 void setMax(int n) { m_max = n; }
23 int max() { return m_max; }
38 class StatModel : public QAbstractTableModel
43 StatModel(QList<Club *> &clubList, QList<Score *> &scoreList);
45 int rowCount(const QModelIndex & parent) const;
46 int columnCount(const QModelIndex & parent) const;
47 QVariant data(const QModelIndex & index, int role) const;
48 QVariant headerData(int section, Qt::Orientation orientation, int role) const;
53 enum { ROWS = 8, COLS = 4 };
54 enum { ROW_ROUNDS = 0,
64 COL_1ST_YEAR, // Latest year
65 COL_2ND_YEAR, // One before latest
66 COL_3RD_YEAR // Two before latest
70 QList<Club *> &clubList;
71 QList<Score *> &scoreList;
73 QList<StatItem *> stat;