Fix issues
This commit is contained in:
parent
d14bd80a23
commit
1011a9f123
@ -47,7 +47,7 @@
|
|||||||
<h1>Liste des parcours</h1>
|
<h1>Liste des parcours</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="./pages/parcours1.html">parcous1</a></li>
|
<li><a href="./pages/parcours1.html">parcous1</a></li>
|
||||||
<li><a href="./pages/parcours2.html">parcours2</a></li>
|
<li><a href="./pages/parcours2.html">Chemin des</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
5
main.cpp
5
main.cpp
@ -9,9 +9,12 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
w.loadAndExportPaths();
|
QStringList fichiers = {"data/parcours1.json", "data/parcours2.json"};
|
||||||
|
w.loadAndExportPaths(fichiers);
|
||||||
Web u(w.getPath());
|
Web u(w.getPath());
|
||||||
u.siteHtml();
|
u.siteHtml();
|
||||||
|
|
||||||
|
w.show();
|
||||||
|
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -403,7 +403,6 @@ void MainWindow::on_toolButton_clicked()
|
|||||||
loadImage(fileName);
|
loadImage(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< mainwindow.cpp
|
|
||||||
int MainWindow::getIndexPath() const
|
int MainWindow::getIndexPath() const
|
||||||
{
|
{
|
||||||
return indexPath;
|
return indexPath;
|
||||||
@ -442,7 +441,7 @@ Path *MainWindow::getCurrentPath() const
|
|||||||
void MainWindow::setCurrentPath(Path *newCurrentPath)
|
void MainWindow::setCurrentPath(Path *newCurrentPath)
|
||||||
{
|
{
|
||||||
currentPath = newCurrentPath;
|
currentPath = newCurrentPath;
|
||||||
=======
|
}
|
||||||
|
|
||||||
void MainWindow::saveFile(){
|
void MainWindow::saveFile(){
|
||||||
QString fileName;
|
QString fileName;
|
||||||
@ -571,3 +570,19 @@ void MainWindow::on_validateBtn_clicked()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::loadAndExportPaths(QStringList fichiers) {
|
||||||
|
|
||||||
|
|
||||||
|
for (const QString& nomFichier : fichiers) {
|
||||||
|
QFile* f = new QFile(nomFichier);
|
||||||
|
|
||||||
|
Path* p = new Path(f);
|
||||||
|
path.append(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
int exportIndex = 1;
|
||||||
|
for (Path* p : path) {
|
||||||
|
currentPath = p;
|
||||||
|
exportHTMLMap(exportIndex++);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@ public:
|
|||||||
void addNewPath();
|
void addNewPath();
|
||||||
void addNewStep();
|
void addNewStep();
|
||||||
void exportHTMLMap(int index);
|
void exportHTMLMap(int index);
|
||||||
void loadAndExportPaths();
|
void loadAndExportPaths(QStringList fichiers);
|
||||||
QString getCurrentFile() const;
|
QString getCurrentFile() const;
|
||||||
void setCurrentFile(const QString &newCurrentFile);
|
void setCurrentFile(const QString &newCurrentFile);
|
||||||
QList<Path *> getPath() const;
|
QList<Path *> getPath() const;
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
}
|
}
|
||||||
#fiche {
|
#fiche {
|
||||||
padding-right:20px;
|
padding-right:20px;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
max-height: 600px;
|
max-height: 600px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@ -42,10 +42,10 @@ padding-right:20px;
|
|||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#fiche li {
|
#fiche li {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
body h1 {
|
body h1 {
|
||||||
display:flex;
|
display:flex;
|
||||||
align-items:center;
|
align-items:center;
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
}
|
}
|
||||||
#fiche {
|
#fiche {
|
||||||
padding-right:20px;
|
padding-right:20px;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
max-height: 600px;
|
max-height: 600px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@ -42,10 +42,10 @@ padding-right:20px;
|
|||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#fiche li {
|
#fiche li {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
body h1 {
|
body h1 {
|
||||||
display:flex;
|
display:flex;
|
||||||
align-items:center;
|
align-items:center;
|
||||||
@ -74,30 +74,48 @@ padding-right:20px;
|
|||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
<div id="fiche">
|
<div id="fiche">
|
||||||
<h2>parcours2</h2>
|
<h2>Chemin des</h2>
|
||||||
<p><strong>Ville :</strong> Paris</p>
|
<p><strong>Ville :</strong> Bourg en Bresse</p>
|
||||||
<p><strong>Département :</strong> 1</p>
|
<p><strong>Département :</strong> 0</p>
|
||||||
<p><strong>Difficulté :</strong> 2</p>
|
<p><strong>Difficulté :</strong> 3</p>
|
||||||
<p><strong>Durée (heures) :</strong> 2.3</p>
|
<p><strong>Durée (heures) :</strong> 3.8</p>
|
||||||
<p><strong>Longueur (km) :</strong> 17.3</p>
|
<p><strong>Longueur (km) :</strong> 24.6</p>
|
||||||
<img src="../data/parcours1.png">
|
<img src="data/parcours1.png">
|
||||||
<h3>Étape 1</h3>
|
<h3>Étape 1</h3>
|
||||||
<p><strong>Personnages :</strong></p>
|
<p><strong>Personnages :</strong></p>
|
||||||
<ul><li>Quentin</li>
|
<ul><li>Clémentine</li>
|
||||||
<li>Malo</li>
|
<li>Léo</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><strong>Dialogues :</strong></p>
|
<p><strong>Dialogues :</strong></p>
|
||||||
<ul><li>ligne de dialogue 1 HJDDDZJJJJJJJJJJJJJJJJJJJDBJBDJZBZJDBJ</li>
|
<ul><li>Bienvenue à tous, voici le centre historique !</li>
|
||||||
<li>ligne de dialogue 2BDJJHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHBDHDBHBZHVZDHVHVHEDHJVHVDHEDJD</li>
|
<li>Regardez cette magnifique horloge, elle date du XIXe siècle !</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3>Étape 2</h3>
|
<h3>Étape 2</h3>
|
||||||
<p><strong>Personnages :</strong></p>
|
<p><strong>Personnages :</strong></p>
|
||||||
<ul><li>Antoine</li>
|
<ul><li>Aurélie</li>
|
||||||
<li>Giovanni</li>
|
<li>Sami</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><strong>Dialogues :</strong></p>
|
<p><strong>Dialogues :</strong></p>
|
||||||
<ul><li>ligne de dialogue 1</li>
|
<ul><li>Ici, on trouve les meilleurs fromages de la région !</li>
|
||||||
<li>ligne de dialogue 2</li>
|
<li>Combien de colonnes vois-tu à l'entrée ?</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Étape 3</h3>
|
||||||
|
<p><strong>Personnages :</strong></p>
|
||||||
|
<ul><li>Juliette</li>
|
||||||
|
<li>Marc</li>
|
||||||
|
</ul>
|
||||||
|
<p><strong>Dialogues :</strong></p>
|
||||||
|
<ul><li>La Reyssouze apporte de la fraîcheur en été.</li>
|
||||||
|
<li>Regarde cette inscription ancienne sur la pierre, tu arrives à la lire ?</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Étape 4</h3>
|
||||||
|
<p><strong>Personnages :</strong></p>
|
||||||
|
<ul><li>Claire</li>
|
||||||
|
<li>Nathalie</li>
|
||||||
|
</ul>
|
||||||
|
<p><strong>Dialogues :</strong></p>
|
||||||
|
<ul><li>Voilà l'abbaye ! Admire l'architecture.</li>
|
||||||
|
<li>C'est ici la dernière étape. Observez bien la date !</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
11
step.cpp
11
step.cpp
@ -63,17 +63,6 @@ Step::Step() {
|
|||||||
response = 0;
|
response = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QList<QString> Step::getPersonnage() const
|
|
||||||
{
|
|
||||||
return personnage;
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<QString> Step::getTexte() const
|
|
||||||
{
|
|
||||||
return texte;
|
|
||||||
}
|
|
||||||
|
|
||||||
Step::Step( QJsonObject &in)
|
Step::Step( QJsonObject &in)
|
||||||
{
|
{
|
||||||
title = in["title"].toString();
|
title = in["title"].toString();
|
||||||
|
|||||||
1
step.h
1
step.h
@ -32,6 +32,7 @@ public:
|
|||||||
void setResponse(int newResponse);
|
void setResponse(int newResponse);
|
||||||
void setPersonnage(const QList<QString> &newPersonnage);
|
void setPersonnage(const QList<QString> &newPersonnage);
|
||||||
void setTexte(const QList<QString> &newTexte);
|
void setTexte(const QList<QString> &newTexte);
|
||||||
|
QString toGPSFormat();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // STEP_H
|
#endif // STEP_H
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user