diff --git a/mainwindow.cpp b/mainwindow.cpp index cc5c82f..2d18474 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -675,6 +675,8 @@ void MainWindow::on_validateBtn_clicked() this->currentPath->setDuration(ui->durationSpin->value()); this->currentPath->getStep()[ui->stepNumber->value()-1].setTitle(ui->stepTitle->text()); this->currentPath->getStep()[ui->stepNumber->value()-1].setResponse(ui->responseSpin->value()); + this->currentPath->getStep()[ui->stepNumber->value()-1].setLongitude(ui->longitudeSpin->value()); + this->currentPath->getStep()[ui->stepNumber->value()-1].setLatitude(ui->LatitudeSpin->value()); this->currentPath->getStep()[ui->stepNumber->value()-1].clearPersonnages(); this->currentPath->getStep()[ui->stepNumber->value()-1].clearTextes(); extractDialogue(); diff --git a/step.cpp b/step.cpp index 18c87b5..f178f4d 100644 --- a/step.cpp +++ b/step.cpp @@ -106,11 +106,15 @@ Step::Step( QJsonObject &in) texte.append(textes); } } - - } +void Step::setLatitude(float lat) { + latitude = lat; +} +void Step::setLongitude(float lon) { + longitude = lon; +} void Step::setLatitude(int degree, float minute, QChar NS) diff --git a/step.h b/step.h index 6746ed9..31787ad 100644 --- a/step.h +++ b/step.h @@ -22,6 +22,8 @@ public: Step(QJsonObject &in); void setLatitude(int degree,float minute,QChar NS); void setLongitude(int degree,float minute,QChar EW); + void setLatitude(float lat); + void setLongitude(float lon); QString getTitle() const; float getLatitude() const; float getLongitude() const;