constructeur step
This commit is contained in:
parent
fd004988d6
commit
5f2bb19da9
3
main.cpp
3
main.cpp
@ -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();
|
||||
}
|
||||
|
||||
15
step.cpp
15
step.cpp
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user