modif export + automatisation + fonction qui centralise tout les exports

This commit is contained in:
p2405951
2025-06-20 16:08:32 +02:00
parent 0ca9c535c5
commit 105f1a6918
13 changed files with 624 additions and 122 deletions
+1 -31
View File
@@ -9,39 +9,9 @@ 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();
w.loadAndExportPaths();
Web u(w.getPath());
u.siteHtml();
delete p;
delete p2;
return a.exec();
}