diff --git a/mainwindow.cpp b/mainwindow.cpp
index 5570c48..da5eacc 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -257,6 +257,7 @@ void MainWindow::on_actionEditCut_triggered()
void MainWindow::on_pathNumber_valueChanged(int arg1)
{
this->loadPath(path.at(ui->pathNumber->value()-1));
+ currentPath = path.at(arg1-1);
}
@@ -265,3 +266,19 @@ void MainWindow::on_stepNumber_valueChanged(int arg1)
this->loadStep(currentPath->getStep().at(arg1-1));
}
+
+void MainWindow::on_validateBtn_clicked()
+{
+ currentPath->setName(ui->titleEdit->text());
+ currentPath->setCity(ui->locEdit->text());
+ currentPath->setImage(ui->imagePath->text());
+ currentPath->setLength(ui->lengthSpin->value());
+ currentPath->setDifficulty(ui->diffSpin->value());
+ currentPath->setDuration(ui->durationSpin->value());
+
+ Step currentStep = currentPath->getStep().at(ui->stepNumber->value()-1);
+
+ currentStep.setTitle(ui->stepTitle->text());
+ currentStep.setResponse(ui->responseSpin->value());
+}
+
diff --git a/mainwindow.h b/mainwindow.h
index 7b9cccc..3baae80 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -38,7 +38,6 @@ private slots:
void on_actionopenFile_triggered();
-
void on_actionEditCopy_triggered();
void on_actionEditPaste_triggered();
@@ -49,6 +48,8 @@ private slots:
void on_stepNumber_valueChanged(int arg1);
+ void on_validateBtn_clicked();
+
private:
Ui::MainWindow *ui;
QString currentFile;
diff --git a/mainwindow.ui b/mainwindow.ui
index eef97a1..2ef38bb 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -7,7 +7,7 @@
0
0
800
- 598
+ 693
@@ -69,221 +69,222 @@
QFrame::Shadow::Raised
-
-
-
- 10
- 20
- 45
- 27
-
-
-
- 1
-
-
- 1
-
-
-
-
-
- 60
- 20
- 391
- 26
-
-
-
-
-
-
- 10
- 60
- 441
- 45
-
-
-
-
- 0
-
-
- 0
-
- -
-
-
- Localisation
-
-
-
- -
-
-
- -
-
-
-
-
-
-
-
- 470
- 20
- 281
- 191
-
-
-
-
-
-
- true
-
-
-
-
-
- 0
- 110
- 451
- 63
-
-
-
-
- 0
-
-
- 0
-
- -
-
-
-
-
-
-
- Difficulty
+
+
-
+
+
+
-
+
+
+
-
+
+
+ 1
+
+
+ 1
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+ 0
-
-
- -
-
-
- /5
+
+ 0
-
- 5
+
-
+
+
+ Localisation
+
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+ 0
-
-
-
-
-
- -
-
-
-
-
-
-
- Duration
+
+ 0
-
-
- -
-
-
- h
+
-
+
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Difficulty
+
+
+
+ -
+
+
+ /5
+
+
+ 5
+
+
+
+
+
+
+ -
+
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Duration
+
+
+
+ -
+
+
+ h
+
+
+ 1
+
+
+ 0.100000000000000
+
+
+
+
+
+
+ -
+
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Length
+
+
+
+ -
+
+
+ Km
+
+
+ 1
+
+
+ 500.000000000000000
+
+
+ 0.100000000000000
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ 9
-
- 1
+
+ 0
-
- 0.100000000000000
-
-
-
-
-
-
- -
-
-
-
-
-
-
- Length
-
-
-
- -
-
-
- Km
-
-
- 1
-
-
- 500.000000000000000
-
-
- 0.100000000000000
-
-
-
-
-
-
-
-
-
-
-
- 0
- 180
- 451
- 44
-
-
-
-
- 9
-
-
- 0
-
- -
-
-
- Image
-
-
-
- -
-
-
- -
-
-
- ...
-
-
-
- :/data/images/data/images/add.png:/data/images/data/images/add.png
-
-
-
- -
-
-
- Select Image File
-
-
-
-
-
+ -
+
+
+ Image
+
+
+
+ -
+
+
+ -
+
+
+ ...
+
+
+
+ :/data/images/data/images/add.png:/data/images/data/images/add.png
+
+
+
+ -
+
+
+ Select Image File
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ 300
+ 0
+
+
+
+
+
+
+ true
+
+
+
+
-
@@ -316,135 +317,129 @@
QFrame::Shadow::Raised
-
-
-
- 0
- 10
- 781
- 45
-
-
-
-
-
-
-
- 1
-
-
-
- -
-
-
- -
-
-
- ...
-
-
-
- :/data/images/data/images/add.png:/data/images/data/images/add.png
-
-
-
-
-
-
-
-
- 0
- 60
- 781
- 63
-
-
-
- -
-
-
-
-
-
-
- Latitude
-
-
- Qt::AlignmentFlag::AlignCenter
-
-
-
- -
-
-
- 6
-
-
- 90.000000000000000
-
-
-
-
-
-
- -
-
-
-
-
-
-
- Longitude
-
-
- Qt::AlignmentFlag::AlignCenter
-
-
-
- -
-
-
- 6
-
-
- -180.000000000000000
-
-
- 180.000000000000000
-
-
-
-
-
-
- -
-
-
-
-
-
-
- Response
-
-
- Qt::AlignmentFlag::AlignCenter
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- 10
- 130
- 761
- 81
-
-
-
+
+ -
+
+
+
-
+
+
+ 1
+
+
+
+ -
+
+
+ -
+
+
+ ...
+
+
+
+ :/data/images/data/images/add.png:/data/images/data/images/add.png
+
+
+
+
+
+
+ -
+
+
+
-
+
+
+
-
+
+
+ Latitude
+
+
+ Qt::AlignmentFlag::AlignCenter
+
+
+
+ -
+
+
+ 6
+
+
+ 90.000000000000000
+
+
+
+
+
+
+ -
+
+
+
-
+
+
+ Longitude
+
+
+ Qt::AlignmentFlag::AlignCenter
+
+
+
+ -
+
+
+ 6
+
+
+ -180.000000000000000
+
+
+ 180.000000000000000
+
+
+
+
+
+
+ -
+
+
+
-
+
+
+ Response
+
+
+ Qt::AlignmentFlag::AlignCenter
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ -
+
+
+ Valider
+
+
+
+
@@ -466,13 +461,7 @@
-
-