Merge branch 'feature/step' of https://iutbg-gitlab.iutbourg.univ-lyon1.fr/p2406187/sae201 into feature/step

This commit is contained in:
p2405951 2025-06-19 09:57:16 +02:00
commit 2383b88846
4 changed files with 42 additions and 2 deletions

View File

@ -1,5 +1,7 @@
#include "mainwindow.h"
#include "path.h"
#include <QApplication>
#include <step.h>
#include <QFile>

13
path.cpp Normal file
View File

@ -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(){
}

23
path.h Normal file
View File

@ -0,0 +1,23 @@
#ifndef PATH_H
#define PATH_H
#include <QMainWindow>
class Path
{
private:
QString city;
int departement;
QString name;
unsigned int difficulty;
float duration;
float length;
QString image;
QList<Step> step;
public:
Path();
Path(QFile *file);
void addStep();
};
#endif // PATH_H

View File

@ -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