constructeur step

This commit is contained in:
p2405951 2025-06-18 15:07:36 +02:00
parent fd004988d6
commit 5f2bb19da9
2 changed files with 17 additions and 1 deletions

View File

@ -1,11 +1,14 @@
#include "mainwindow.h"
#include <QApplication>
#include <step.h>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}

View File

@ -7,7 +7,20 @@ Step::Step() {
}
Step::Step(QTextStream &in)
{}
{
int stepNumber;
in >> stepNumber;
in.readLine();
title = in.readLine();
QChar latDir, lonDir;
int latDeg, lonDeg;
float latMin, lonMin;
in >> latDir >> latDeg >> latMin >> lonDir >> lonDeg >> lonMin;
setLatitude(latDeg, latMin, latDir);
setLongitude(lonDeg, lonMin, lonDir);
in >> response;
in.readLine();
}
void Step::setLatitude(int degree, float minute, QChar NS)
{
latitude = degree + minute / 60.0;