diff --git a/main.cpp b/main.cpp index 4b6acc2..2c8cdf2 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,7 @@ #include "mainwindow.h" +#include "path.h" + #include #include diff --git a/path.cpp b/path.cpp new file mode 100644 index 0000000..ab0fdfb --- /dev/null +++ b/path.cpp @@ -0,0 +1,13 @@ +#include "path.h" + + +Path::Path(QFile *file){ + QTextStream in(&file); + QString text = in.readAll(); + ui->textEdit->setText(text); + file.close(); +} +void Path::addStep(){ + +} + diff --git a/path.h b/path.h new file mode 100644 index 0000000..52ec154 --- /dev/null +++ b/path.h @@ -0,0 +1,23 @@ +#ifndef PATH_H +#define PATH_H + +#include + +class Path +{ +private: + QString city; + int departement; + QString name; + unsigned int difficulty; + float duration; + float length; + QString image; + QList step; +public: + Path(); + Path(QFile *file); + void addStep(); +}; + +#endif // PATH_H diff --git a/sae201.pro b/sae201.pro index 1e37e62..2019663 100644 --- a/sae201.pro +++ b/sae201.pro @@ -11,11 +11,13 @@ CONFIG += c++17 SOURCES += \ main.cpp \ mainwindow.cpp \ - step.cpp + step.cpp \ + path.cpp \ HEADERS += \ mainwindow.h \ - step.h + step.h \ + path.h \ FORMS += \ mainwindow.ui