diff --git a/path.cpp b/path.cpp index 26a2558..75f4687 100644 --- a/path.cpp +++ b/path.cpp @@ -50,6 +50,41 @@ QList Path::getStep() const return step; } +void Path::setCity(const QString &newCity) +{ + city = newCity; +} + +void Path::setDepartement(int newDepartement) +{ + departement = newDepartement; +} + +void Path::setName(const QString &newName) +{ + name = newName; +} + +void Path::setDifficulty(unsigned int newDifficulty) +{ + difficulty = newDifficulty; +} + +void Path::setDuration(float newDuration) +{ + duration = newDuration; +} + +void Path::setLength(float newLength) +{ + length = newLength; +} + +void Path::setImage(const QString &newImage) +{ + image = newImage; +} + Path::Path(QFile *file){ if (!file->open(QIODevice::ReadOnly)) { qWarning() << "Could not open file:" << file->errorString(); diff --git a/path.h b/path.h index 7eb9315..919a89a 100644 --- a/path.h +++ b/path.h @@ -29,6 +29,13 @@ public: float getLength() const; QString getImage() const; QList getStep() const; + void setCity(const QString &newCity); + void setDepartement(int newDepartement); + void setName(const QString &newName); + void setDifficulty(unsigned int newDifficulty); + void setDuration(float newDuration); + void setLength(float newLength); + void setImage(const QString &newImage); }; #endif // PATH_H diff --git a/step.cpp b/step.cpp index 1398647..fd7813c 100644 --- a/step.cpp +++ b/step.cpp @@ -27,6 +27,16 @@ int Step::getResponse() const return response; } +void Step::setTitle(const QString &newTitle) +{ + title = newTitle; +} + +void Step::setResponse(int newResponse) +{ + response = newResponse; +} + Step::Step() { latitude = 0.0; longitude = 0.0; diff --git a/step.h b/step.h index 1607679..3f711c1 100644 --- a/step.h +++ b/step.h @@ -28,6 +28,8 @@ public: int getResponse() const; QList getPersonnage() const; QList getTexte() const; + void setTitle(const QString &newTitle); + void setResponse(int newResponse); }; #endif // STEP_H