holeList << iHole;
}
-QString Score::getScore(int i) {
+QString Score::getScore(int i) const
+{
if (i >= 0 && i < holeList.size())
return holeList.at(i)->getShots();
else
return QString("-");
}
-QString Score::getTotal(int what) {
+QString Score::getTotal(int what) const
+{
int tot = 0;
if (what == Total)
return QString("%1").arg(tot);
}
-QString& Score::getClubName() {
+const QString& Score::getClubName() const
+{
return club;
}
-QString& Score::getCourseName() {
+const QString& Score::getCourseName() const
+{
return course;
}
-QString& Score::getDate() {
+const QString& Score::getDate() const
+{
return date;
}
-void Score::dump() {
+void Score::dump()
+{
qDebug() << club << " " << course << " " << date ;
for (int i=0; i<holeList.size(); i++)
holeList.at(i)->dump();
return courseList.at(pos);
}
-Course *Club::getCourse(QString &courseName)
+Course *Club::getCourse(const QString &courseName)
{
QListIterator<Course *> i(courseList);
Course *c = 0;