2 #include <QAbstractTableModel>
9 // TODO: change name to ScoreTableModel
10 class ScoreTableModel : public QAbstractTableModel
17 ScoreTableModel(QObject *parent = 0) : QAbstractTableModel(parent)
24 Qt::ItemFlags flags ( const QModelIndex & index );
25 void setScore(QList<Score *> &sList, Score *score = 0);
26 void setClub(QList<Club *> &cList);
27 Course *findCourse(const QString &clubName, const QString &courseName);
28 int rowCount(const QModelIndex & parent) const;
29 int columnCount(const QModelIndex & parent) const;
30 QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
31 QVariant data(const QModelIndex & index, int role) const;
32 QVariant headerData(int section, Qt::Orientation orientation, int role) const;
34 int setItem(int row, int col, int data);
36 QString getInfoText();
37 QString getCountText();
45 QList<Score *> scoreList;
46 QList<Club *> clubList;
50 // Current data pointers