add setters

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2025-06-20 14:34:15 +02:00
parent aa61cc14b9
commit f1d1578554
4 changed files with 54 additions and 0 deletions
+35
View File
@@ -50,6 +50,41 @@ QList<Step> 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();