Save step info
This commit is contained in:
parent
c591f2dbdb
commit
992874a603
@ -131,6 +131,7 @@ void MainWindow::loadStep(Step s) {
|
|||||||
ui->stepTitle->setText(s.getTitle());
|
ui->stepTitle->setText(s.getTitle());
|
||||||
ui->LatitudeSpin->setValue(s.getLatitude());
|
ui->LatitudeSpin->setValue(s.getLatitude());
|
||||||
ui->longitudeSpin->setValue(s.getLongitude());
|
ui->longitudeSpin->setValue(s.getLongitude());
|
||||||
|
ui->responseSpin->setValue(s.getResponse());
|
||||||
|
|
||||||
for(int i = 0; i < s.getTexte().length(); i++) {
|
for(int i = 0; i < s.getTexte().length(); i++) {
|
||||||
QString q = s.getPersonnage().at(i) + ": " + s.getTexte().at(i);
|
QString q = s.getPersonnage().at(i) + ": " + s.getTexte().at(i);
|
||||||
@ -276,9 +277,8 @@ void MainWindow::on_validateBtn_clicked()
|
|||||||
currentPath->setDifficulty(ui->diffSpin->value());
|
currentPath->setDifficulty(ui->diffSpin->value());
|
||||||
currentPath->setDuration(ui->durationSpin->value());
|
currentPath->setDuration(ui->durationSpin->value());
|
||||||
|
|
||||||
Step currentStep = currentPath->getStep().at(ui->stepNumber->value()-1);
|
currentPath->getStep()[ui->stepNumber->value()-1].setTitle(ui->stepTitle->text());
|
||||||
|
currentPath->getStep()[ui->stepNumber->value()-1].setResponse(ui->responseSpin->value());
|
||||||
|
|
||||||
currentStep.setTitle(ui->stepTitle->text());
|
|
||||||
currentStep.setResponse(ui->responseSpin->value());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
path.cpp
2
path.cpp
@ -45,7 +45,7 @@ QString Path::getImage() const
|
|||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Step> Path::getStep() const
|
QList<Step>& Path::getStep()
|
||||||
{
|
{
|
||||||
return step;
|
return step;
|
||||||
}
|
}
|
||||||
|
|||||||
2
path.h
2
path.h
@ -28,7 +28,7 @@ public:
|
|||||||
float getDuration() const;
|
float getDuration() const;
|
||||||
float getLength() const;
|
float getLength() const;
|
||||||
QString getImage() const;
|
QString getImage() const;
|
||||||
QList<Step> getStep() const;
|
QList<Step>& getStep();
|
||||||
void setCity(const QString &newCity);
|
void setCity(const QString &newCity);
|
||||||
void setDepartement(int newDepartement);
|
void setDepartement(int newDepartement);
|
||||||
void setName(const QString &newName);
|
void setName(const QString &newName);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user