48 lines
1016 B
C++
48 lines
1016 B
C++
#include "mainwindow.h"
|
|
#include "path.h"
|
|
#include <QApplication>
|
|
#include <step.h>
|
|
#include <QFile>
|
|
#include <web.h>
|
|
using namespace std;
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
MainWindow w;
|
|
QFile file1("data/parcours1.json");
|
|
if (!file1.open(QIODevice::ReadOnly)) {
|
|
qWarning() << "Impossible d'ouvrir le fichier data/parcours1.json";
|
|
return -1;
|
|
}
|
|
Path* p = new Path(&file1);
|
|
file1.close();
|
|
|
|
QFile file2("data/parcours1.json");
|
|
if (!file2.open(QIODevice::ReadOnly)) {
|
|
qWarning() << "Impossible d'ouvrir le fichier data/parcours2.json";
|
|
delete p;
|
|
return -1;
|
|
}
|
|
Path* p2 = new Path(&file2);
|
|
file2.close();
|
|
|
|
QList<Path*> paths = w.getPath();
|
|
paths.append(p);
|
|
paths.append(p2);
|
|
w.setPath(paths);
|
|
|
|
w.setCurrentPath(p);
|
|
w.exportHTMLMap();
|
|
|
|
w.setCurrentPath(p2);
|
|
w.exportHTMLMap();
|
|
|
|
Web u(w.getPath());
|
|
u.siteHtml();
|
|
|
|
delete p;
|
|
delete p2;
|
|
|
|
return a.exec();
|
|
}
|