GPLv2 license
[scorecard] / src / data.h
index e71bb50..580581b 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2009 Sakari Poussa
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 2.
+ */
+
 #ifndef __SCORE_DATA_H
 #define __SCORE_DATA_H
 
@@ -18,8 +26,11 @@ class Hole {
   Hole(int num, QString &par, QString &hcp);
   QDomElement toElement(QDomDocument doc);
   QString getShots();
+  void setShots(QString& shots);
   QString getHcp();
+  void setHcp(QString& shots);
   QString getPar();
+  void setPar(QString& shots);
   void dump();
 
  private:
@@ -40,6 +51,7 @@ class Score {
   }
 
   QDomElement toElement(QDomDocument doc);
+  int update(QVector<QString> &scores);
   void addHole(Hole *iHole);
   QString getScore(int i) const;
   QString getTotal(int what) const;
@@ -59,6 +71,7 @@ class Course {
   Course(const QDomElement node);
   Course(QString &name, QVector<QString> &, QVector<QString> &);
   QDomElement toElement(QDomDocument doc);
+  int update(QVector<QString> &, QVector<QString> &, QVector<QString> &);
   void addHole(Hole *iHole);
   QString getPar(int i);
   QString getHcp(int i);
@@ -69,7 +82,6 @@ class Course {
  private:
   QList <Hole *> holeList;
   QString name;
-
 };
 
 class Club {