From aed27c2483c68856f98c5fde49487ec81da28171 Mon Sep 17 00:00:00 2001 From: T'JAMPENS QUENTIN p2406187 Date: Fri, 20 Jun 2025 09:16:07 +0200 Subject: [PATCH] Display coordinates --- mainwindow.cpp | 2 ++ mainwindow.ui | 9 +++++++++ step.cpp | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 582913c..867ab0e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -99,6 +99,8 @@ void MainWindow::loadPath() if(!steps.isEmpty()) { ui->stepTitle->setText(p->getStep().first().getTitle()); + ui->LatitudeSpin->setValue(p->getStep().first().getLatitude()); + ui->longitudeSpin->setValue(p->getStep().first().getLongitude()); } int pathCount = path.length(); diff --git a/mainwindow.ui b/mainwindow.ui index 759d4d5..a380958 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -353,6 +353,9 @@ 6 + + 90.000000000000000 + @@ -376,6 +379,12 @@ 6 + + -180.000000000000000 + + + 180.000000000000000 + diff --git a/step.cpp b/step.cpp index 861f414..491ab22 100644 --- a/step.cpp +++ b/step.cpp @@ -41,7 +41,7 @@ Step::Step( QJsonObject &in) QString gps = in["GPS"].toString(); QStringList parts = gps.split(" ", Qt::SkipEmptyParts); - QChar latDir = parts[0][0]; // c'est le premier QChar du QString t'as capté + QChar latDir = parts[0][0]; int latDeg = parts[1].toInt(); float latMin = parts[2].toFloat(); setLatitude(latDeg, latMin, latDir);