Save loc on validation and stop validation when stepNumber value is changed
This commit is contained in:
parent
f15583020d
commit
c8e264fe18
@ -660,14 +660,12 @@ void MainWindow::on_pathNumber_valueChanged(int arg1)
|
|||||||
|
|
||||||
void MainWindow::on_stepNumber_valueChanged(int arg1)
|
void MainWindow::on_stepNumber_valueChanged(int arg1)
|
||||||
{
|
{
|
||||||
on_validateBtn_clicked();
|
|
||||||
this->loadStep(currentPath->getStep().at(arg1-1));
|
this->loadStep(currentPath->getStep().at(arg1-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_validateBtn_clicked()
|
void MainWindow::on_validateBtn_clicked()
|
||||||
{
|
{
|
||||||
std::cout << "ok" << std::endl;
|
|
||||||
this->currentPath->setName(ui->titleEdit->text());
|
this->currentPath->setName(ui->titleEdit->text());
|
||||||
this->currentPath->setCity(ui->locEdit->text());
|
this->currentPath->setCity(ui->locEdit->text());
|
||||||
this->currentPath->setImage(ui->imagePath->text());
|
this->currentPath->setImage(ui->imagePath->text());
|
||||||
@ -676,6 +674,8 @@ void MainWindow::on_validateBtn_clicked()
|
|||||||
this->currentPath->setDuration(ui->durationSpin->value());
|
this->currentPath->setDuration(ui->durationSpin->value());
|
||||||
this->currentPath->getStep()[ui->stepNumber->value()-1].setTitle(ui->stepTitle->text());
|
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].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].clearPersonnages();
|
||||||
this->currentPath->getStep()[ui->stepNumber->value()-1].clearTextes();
|
this->currentPath->getStep()[ui->stepNumber->value()-1].clearTextes();
|
||||||
extractDialogue();
|
extractDialogue();
|
||||||
|
|||||||
8
step.cpp
8
step.cpp
@ -106,11 +106,15 @@ Step::Step( QJsonObject &in)
|
|||||||
texte.append(textes);
|
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)
|
void Step::setLatitude(int degree, float minute, QChar NS)
|
||||||
|
|||||||
2
step.h
2
step.h
@ -22,6 +22,8 @@ public:
|
|||||||
Step(QJsonObject &in);
|
Step(QJsonObject &in);
|
||||||
void setLatitude(int degree,float minute,QChar NS);
|
void setLatitude(int degree,float minute,QChar NS);
|
||||||
void setLongitude(int degree,float minute,QChar EW);
|
void setLongitude(int degree,float minute,QChar EW);
|
||||||
|
void setLatitude(float lat);
|
||||||
|
void setLongitude(float lon);
|
||||||
QString getTitle() const;
|
QString getTitle() const;
|
||||||
float getLatitude() const;
|
float getLatitude() const;
|
||||||
float getLongitude() const;
|
float getLongitude() const;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user