Merge branch 'feature/Path' into 'feature/step'
# Conflicts: # sae201.pro
This commit is contained in:
commit
1063962e61
2
main.cpp
2
main.cpp
@ -1,5 +1,7 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
#include "path.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <step.h>
|
#include <step.h>
|
||||||
|
|
||||||
|
|||||||
13
path.cpp
Normal file
13
path.cpp
Normal 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
23
path.h
Normal 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
|
||||||
@ -11,11 +11,13 @@ CONFIG += c++17
|
|||||||
SOURCES += \
|
SOURCES += \
|
||||||
main.cpp \
|
main.cpp \
|
||||||
mainwindow.cpp \
|
mainwindow.cpp \
|
||||||
step.cpp
|
step.cpp \
|
||||||
|
path.cpp \
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
mainwindow.h \
|
mainwindow.h \
|
||||||
step.h
|
step.h \
|
||||||
|
path.h \
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
mainwindow.ui
|
mainwindow.ui
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user