Calculate and show how many shots over/under score is
[scorecard] / src / table-model.h
index dc3832b..b984fc5 100644 (file)
@@ -23,7 +23,7 @@ class ScoreTableModel : public QAbstractTableModel
 public:
     ScoreTableModel(QObject *parent = 0);
 
-    void set(Score *, Course *);
+    void set(Score *, Course *, int handicap = -1);
     int rowCount(const QModelIndex & parent) const;
     int columnCount(const QModelIndex & parent) const;
     QVariant data(const QModelIndex & index, int role) const;
@@ -48,6 +48,9 @@ private:
     Score *score;
     Club *club;
     Course *course;
+
+    // Current handicap
+    int handicap;
 };
 
 class CourseTableModel : public QAbstractTableModel