[debian-edu-commits] debian-edu/ 01/07: New upstream version 1.0.1+dfsg

David Prévot taffit at moszumanska.debian.org
Thu Aug 3 14:47:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository algobox.

commit 606b0d876188e0165d3027d40d643ee69e64a769
Author: David Prévot <david at tilapin.org>
Date:   Thu Aug 3 09:06:00 2017 -0400

    New upstream version 1.0.1+dfsg
---
 Info.plist                              |    6 +-
 affectationdialog.cpp                   |    4 +-
 affectationdialog.h                     |    2 +-
 affichercalculdialog.cpp                |    2 +-
 affichercalculdialog.h                  |    2 +-
 afficherdialog.cpp                      |    4 +-
 afficherdialog.h                        |    2 +-
 algobox.cpp                             | 2014 ++++++++++++++++++++++++++++---
 algobox.h                               |   25 +-
 algobox.icns                            |  Bin 47859 -> 73670 bytes
 algobox.ico                             |  Bin 15086 -> 370070 bytes
 algobox.pro                             |  105 +-
 algobox.qrc                             |    6 +
 algobox.ui                              |  257 +++-
 algoconsole.cpp                         |   16 +-
 algoconsole.h                           |    2 +-
 algoeditor.cpp                          |    2 +-
 algoeditor.h                            |    2 +-
 algoeditorview.cpp                      |    2 +-
 algoeditorview.h                        |    2 +-
 algohighlighter.cpp                     |   20 +-
 algohighlighter.h                       |    6 +-
 algowebpage.cpp                         |   12 +-
 algowebpage.h                           |   12 +-
 algowebview.cpp                         |   63 +-
 algowebview.h                           |   23 +-
 animatedlabel.cpp                       |    2 +-
 animatedlabel.h                         |    2 +-
 configdialog.cpp => appeldialog.cpp     |    8 +-
 configdialog.h => appeldialog.h         |   16 +-
 appeldialog.ui                          |   85 ++
 aproposdialog.cpp                       |   21 +-
 aproposdialog.h                         |    2 +-
 blockdata.cpp                           |    2 +-
 blockdata.h                             |    2 +-
 browser.cpp                             |   54 +-
 browser.h                               |   13 +-
 browserdialog.cpp                       |   74 +-
 browserdialog.h                         |    5 +-
 browserdialog.ui                        |   28 +-
 commentairedialog.cpp                   |    2 +-
 commentairedialog.h                     |    2 +-
 conditiondialog.cpp                     |    2 +-
 conditiondialog.h                       |    2 +-
 configdialog.cpp                        |    2 +-
 configdialog.h                          |    2 +-
 configdialog.ui                         |   87 +-
 consoledialog.cpp                       |    2 +-
 consoledialog.h                         |    2 +-
 consolehighlighter.cpp                  |    2 +-
 consolehighlighter.h                    |    2 +-
 debian/changelog                        |    5 +
 debian/compat                           |    1 +
 debian/control                          |   11 +
 debian/copyright                        |   29 +
 debian/docs                             |    2 +
 debian/rules                            |   17 +
 debian/source/format                    |    1 +
 documents/completion.txt                |    7 +-
 documents/interdits.txt                 |    5 +
 documents/modeleexportweb.txt           |   16 +-
 documents/modelelatex.txt               |    8 +-
 documents/modelepageweb.txt             |  440 ++++++-
 documents/modelepagewebmac.txt          |  448 ++++++-
 findwidget.cpp                          |    2 +-
 findwidget.h                            |    2 +-
 consoledialog.cpp => fonctiondialog.cpp |    9 +-
 aproposdialog.h => fonctiondialog.h     |   16 +-
 fonctiondialog.ui                       |  103 ++
 geticon.cpp                             |    7 +-
 geticon.h                               |    3 +-
 images/aide.png                         |  Bin 784 -> 548 bytes
 images/aide at 2x.png                      |  Bin 1865 -> 1121 bytes
 images/ajouter.png                      |  Bin 520 -> 192 bytes
 images/ajouter at 2x.png                   |  Bin 696 -> 224 bytes
 images/algobox128.png                   |  Bin 8877 -> 5025 bytes
 images/algobox128 at 2x.png                |  Bin 22008 -> 10252 bytes
 images/algobox22.png                    |  Bin 1208 -> 933 bytes
 images/algobox22 at 2x.png                 |  Bin 2791 -> 1799 bytes
 images/coller.png                       |  Bin 558 -> 201 bytes
 images/coller22.png                     |  Bin 752 -> 434 bytes
 images/coller22 at 2x.png                  |  Bin 1497 -> 479 bytes
 images/coller at 2x.png                    |  Bin 1049 -> 247 bytes
 images/copier.png                       |  Bin 671 -> 227 bytes
 images/copier22.png                     |  Bin 710 -> 452 bytes
 images/copier22 at 2x.png                  |  Bin 1566 -> 493 bytes
 images/copier at 2x.png                    |  Bin 1328 -> 271 bytes
 images/couper.png                       |  Bin 748 -> 410 bytes
 images/couper22.png                     |  Bin 1101 -> 708 bytes
 images/couper22 at 2x.png                  |  Bin 2884 -> 1430 bytes
 images/couper at 2x.png                    |  Bin 1844 -> 903 bytes
 images/executer.png                     |  Bin 645 -> 318 bytes
 images/executer22.png                   |  Bin 848 -> 360 bytes
 images/executer22 at 2x.png                |  Bin 1826 -> 492 bytes
 images/executer at 2x.png                  |  Bin 1266 -> 422 bytes
 images/fermer.png                       |  Bin 837 -> 533 bytes
 images/fermer at 2x.png                    |  Bin 2053 -> 1062 bytes
 images/go-next.png                      |  Bin 0 -> 467 bytes
 images/go-next at 2x.png                   |  Bin 0 -> 947 bytes
 images/go-previous.png                  |  Bin 0 -> 478 bytes
 images/go-previous at 2x.png               |  Bin 0 -> 942 bytes
 images/home.png                         |  Bin 970 -> 532 bytes
 images/home at 2x.png                      |  Bin 970 -> 797 bytes
 images/imprimer.png                     |  Bin 695 -> 219 bytes
 images/imprimer at 2x.png                  |  Bin 1334 -> 256 bytes
 images/modifier.png                     |  Bin 367 -> 173 bytes
 images/modifier at 2x.png                  |  Bin 455 -> 186 bytes
 images/nouveau.png                      |  Bin 506 -> 207 bytes
 images/nouveau22.png                    |  Bin 631 -> 347 bytes
 images/nouveau22 at 2x.png                 |  Bin 1087 -> 399 bytes
 images/nouveau at 2x.png                   |  Bin 941 -> 243 bytes
 images/nouvelleligne.png                |  Bin 432 -> 266 bytes
 images/nouvelleligne at 2x.png             |  Bin 626 -> 422 bytes
 images/ouvrir.png                       |  Bin 809 -> 296 bytes
 images/ouvrir22.png                     |  Bin 1109 -> 240 bytes
 images/ouvrir22 at 2x.png                  |  Bin 2429 -> 298 bytes
 images/ouvrir at 2x.png                    |  Bin 1667 -> 396 bytes
 images/pdf.png                          |  Bin 787 -> 459 bytes
 images/pdf at 2x.png                       |  Bin 1885 -> 923 bytes
 images/redo22.png                       |  Bin 903 -> 579 bytes
 images/redo22 at 2x.png                    |  Bin 2015 -> 1011 bytes
 images/sauver.png                       |  Bin 888 -> 275 bytes
 images/sauver22.png                     |  Bin 1275 -> 479 bytes
 images/sauver22 at 2x.png                  |  Bin 2915 -> 605 bytes
 images/sauver at 2x.png                    |  Bin 2163 -> 357 bytes
 images/sauversous.png                   |  Bin 899 -> 358 bytes
 images/sauversous at 2x.png                |  Bin 2057 -> 550 bytes
 images/splash.png                       |  Bin 0 -> 32049 bytes
 images/splash at 2x.png                    |  Bin 0 -> 72233 bytes
 images/stop.png                         |  Bin 813 -> 488 bytes
 images/stop at 2x.png                      |  Bin 1901 -> 892 bytes
 images/supprimer.png                    |  Bin 241 -> 195 bytes
 images/supprimer at 2x.png                 |  Bin 276 -> 231 bytes
 images/undo22.png                       |  Bin 890 -> 563 bytes
 images/undo22 at 2x.png                    |  Bin 1966 -> 1037 bytes
 jseditor.cpp                            |    2 +-
 jseditor.h                              |    2 +-
 jseditorview.cpp                        |    2 +-
 jseditorview.h                          |    2 +-
 jsfindwidget.cpp                        |    2 +-
 jsfindwidget.h                          |    2 +-
 jshighlighter.cpp                       |    2 +-
 jshighlighter.h                         |    2 +-
 jslinenumberwidget.cpp                  |    2 +-
 jslinenumberwidget.h                    |    2 +-
 jsmainwindow.cpp                        |    2 +-
 jsmainwindow.h                          |    2 +-
 jsreplacedialog.cpp                     |    2 +-
 jsreplacedialog.h                       |    2 +-
 latexhighlighter.cpp                    |    3 +-
 latexhighlighter.h                      |    3 +-
 latexviewdialog.cpp                     |    4 +-
 latexviewdialog.h                       |    2 +-
 license.txt                             |  441 +++++++
 linenumberwidget.cpp                    |    2 +-
 linenumberwidget.h                      |    2 +-
 liredialog.cpp                          |    4 +-
 liredialog.h                            |    2 +-
 loghighlighter.cpp                      |    2 +-
 loghighlighter.h                        |    2 +-
 main.cpp                                |   50 +-
 messagedialog.cpp                       |    2 +-
 messagedialog.h                         |    2 +-
 modifierlignedialog.cpp                 |    2 +-
 modifierlignedialog.h                   |    2 +-
 pointdialog.cpp                         |    2 +-
 pointdialog.h                           |    2 +-
 pourdialog.cpp                          |    2 +-
 pourdialog.h                            |    2 +-
 pourlineedit.cpp                        |    2 +-
 pourlineedit.h                          |    4 +-
 consoledialog.cpp => renvoyerdialog.cpp |    9 +-
 aproposdialog.h => renvoyerdialog.h     |   16 +-
 renvoyerdialog.ui                       |   85 ++
 replacedialog.cpp                       |    2 +-
 replacedialog.h                         |    2 +-
 ressources/aidealgobox.html             |   19 +-
 ressources/prof_pgcd_recursif.alg       |   45 +-
 segmentdialog.cpp                       |    2 +-
 segmentdialog.h                         |    2 +-
 tantquedialog.cpp                       |    2 +-
 tantquedialog.h                         |    2 +-
 toolbox.cpp                             |    2 +-
 toolbox.h                               |    2 +-
 treedelegate.cpp                        |    2 +-
 treedelegate.h                          |    2 +-
 uic_wrapper.sh                          |    6 +
 utilities/CHANGELOG.txt                 |   17 +-
 utilities/algobox.desktop               |    4 +-
 utilities/algobox.png                   |  Bin 2887 -> 10252 bytes
 utilities/algobox.spec                  |  100 +-
 utilities/algobox.svg                   |  375 ++----
 utilities/algobox128.png                |  Bin 8877 -> 5025 bytes
 utilities/algobox16.png                 |  Bin 796 -> 682 bytes
 utilities/algobox22.png                 |  Bin 1208 -> 933 bytes
 utilities/x-algobox.xml                 |    8 +
 variabledialog.cpp                      |    2 +-
 variabledialog.h                        |    2 +-
 verifdialog.cpp                         |    2 +-
 verifdialog.h                           |    2 +-
 x11fontdialog.cpp                       |    2 +-
 x11fontdialog.h                         |    2 +-
 202 files changed, 4531 insertions(+), 896 deletions(-)

diff --git a/Info.plist b/Info.plist
index 77fb861..c1d2f31 100755
--- a/Info.plist
+++ b/Info.plist
@@ -29,15 +29,15 @@
 	<key>CFBundleExecutable</key>
 	<string>algobox</string>
 	<key>CFBundleGetInfoString</key>
-	<string>Copyright (c) 2009-2013, Pascal Brachet</string>
+	<string>Copyright (c) 2009-2017, Pascal Brachet</string>
 	<key>CFBundleIdentifier</key>
 	<string>algobox</string>
 	<key>CFBundleName</key>
 	<string>algobox</string>
 	<key>CFBundleShortVersionString</key>
-	<string>0.9</string>
+	<string>1.0.1</string>
 	<key>CFBundleVersion</key>
-	<string>0.9</string>
+	<string>1.0.1</string>
 	<key>NSPrincipalClass</key>
 	<string>NSApplication</string>
         <key>NSHighResolutionCapable</key>
diff --git a/affectationdialog.cpp b/affectationdialog.cpp
index 8367d6b..332f3cf 100644
--- a/affectationdialog.cpp
+++ b/affectationdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -356,4 +356,4 @@ if (item && item->font().bold())
     ui.lineEditAffectation->setCursorPosition(pos+dx);
     ui.lineEditAffectation->setFocus();
     }
-}
\ No newline at end of file
+}
diff --git a/affectationdialog.h b/affectationdialog.h
index ab8e8a1..3a907ec 100644
--- a/affectationdialog.h
+++ b/affectationdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/affichercalculdialog.cpp b/affichercalculdialog.cpp
index aae521f..a6c8d90 100644
--- a/affichercalculdialog.cpp
+++ b/affichercalculdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/affichercalculdialog.h b/affichercalculdialog.h
index b69afeb..f53bc91 100644
--- a/affichercalculdialog.h
+++ b/affichercalculdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/afficherdialog.cpp b/afficherdialog.cpp
index 7ac2b35..ff35bb0 100644
--- a/afficherdialog.cpp
+++ b/afficherdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -53,4 +53,4 @@ else
     ui.labelAfficher2->setEnabled(false);
     ui.lineEditAfficher->setEnabled(false);
     }
-}
\ No newline at end of file
+}
diff --git a/afficherdialog.h b/afficherdialog.h
index ec71e9e..7b6f3ac 100644
--- a/afficherdialog.h
+++ b/afficherdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/algobox.cpp b/algobox.cpp
index 8ee0d7f..a6aa90a 100644
--- a/algobox.cpp
+++ b/algobox.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2012 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -31,6 +31,9 @@
 #include "configdialog.h"
 #include "treedelegate.h"
 #include "geticon.h"
+#include "fonctiondialog.h"
+#include "renvoyerdialog.h"
+#include "appeldialog.h"
 
 #include <QSettings>
 #include <QAction>
@@ -65,13 +68,20 @@
 #include <QTextCharFormat>
 #include <QAbstractItemModel>
 
+#define STRINGIFY_INTERNAL(x) #x
+#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
+
+#define VERSION_STR STRINGIFY(ALGOBOXVERSION)
+
 MainWindow::MainWindow(QWidget *parent)
     :QMainWindow( parent)
 {
 ui.setupUi(this);
+ui.stackedWidget->removeWidget(ui.stackedWidget->findChild<QWidget *>("page")); 
 #ifndef VERSION_MINIPC
 ui.textEditTip->setPlainText(QString::fromUtf8("- Pour utiliser une variable, il faut d'abord la déclarer (bouton \"Déclarer nouvelle variable\").\n- Pour ajouter un nouvel élément à l'algorithme, il faut d'abord insérer une nouvelle ligne (bouton \"Nouvelle Ligne\"), puis cliquer sur un des boutons disponibles dans les panneaux disponibles en bas de la fenêtre."));
 ui.textEditTipEditeur->setPlainText(QString::fromUtf8("- La \"syntaxe AlgoBox\" doit être pleinement respectée sous peine de non-reconnaissance du code.\n- Une ligne ne doit comporter qu'une seule instruction.\n- Lors de l'utilisation de l'auto-complétion et des commandes du panneau inférieur, le symbole • représente un champ à compléter : pour passer au champ suivant, il suffit d'utiliser la touche Tab.\n- Un clic-droit permet d'accéder aux commandes du menu spécial \"éditeur\".\n- Le s [...]
+ui.textEditTipFonction->setPlainText(QString::fromUtf8("- Pour créer une nouvelle fonction locale, se placer sur FONCTIONS_UTILISEES, cliquer sur \"Nouvelle ligne\" puis sur \"Déclarer nouvelle fonction\".\n- Pour déclarer une variable locale nécessaire à une fonction, se placer sur la ligne \"VARIABLES_FONCTION\" correspondant à la fonction et cliquer sur \"Déclarer variable locale\".\n- Le bouton \"Ajouter RENVOYER valeur\" permet de définir ce que renverra la fonction.\n- Le bouton \" [...]
 #else
 ui.textEditTip->hide();
 ui.textEditTipEditeur->hide();
@@ -320,6 +330,14 @@ connect(ui.pushButtonExecuter, SIGNAL(clicked()), this, SLOT(JavascriptExport())
 
 connect(ui.pushButtonCommentaire, SIGNAL(clicked()), this, SLOT(AjouterCommentaire()));
 
+connect(ui.pushButtonNelleFct, SIGNAL(clicked()), this, SLOT(AjouterFonction()));
+
+connect(ui.pushButtonVariableFct, SIGNAL(clicked()), this, SLOT(AjouterVariableLocale()));
+
+connect(ui.pushButtonRetourFct, SIGNAL(clicked()), this, SLOT(AjouterRenvoyer()));
+
+connect(ui.pushButtonAppelFonction, SIGNAL(clicked()), this, SLOT(AjouterAppelerFct()));
+
 connect(ui.checkBoxFonction, SIGNAL(toggled(bool)),this, SLOT(ActiverFonction(bool)));
 
 connect(ui.checkBoxRepere, SIGNAL(toggled(bool)),this, SLOT(ActiverRepere(bool)));
@@ -434,18 +452,18 @@ actionCouper->setEnabled(false);
 
 modeMenu=editMenu->addMenu(QString::fromUtf8("Mode &Edition"));
 modeGroup=new QActionGroup(this);
-Act = new QAction(QString::fromUtf8("Mode &normal"), this);
-Act->setCheckable(true);
-connect(Act, SIGNAL(triggered()), this, SLOT(ActualiserMode()));
-modeGroup->addAction(Act);
-modeMenu->addAction(Act);
-if (modeNormal) Act->setChecked(true);
-Act = new QAction(QString::fromUtf8("Mode éditeur &texte"), this);
-Act->setCheckable(true);
-connect(Act, SIGNAL(triggered()), this, SLOT(ActualiserMode()));
-modeGroup->addAction(Act);
-modeMenu->addAction(Act);
-if (!modeNormal) Act->setChecked(true);
+actionModeNormal = new QAction(QString::fromUtf8("Mode &normal"), this);
+actionModeNormal->setCheckable(true);
+connect(actionModeNormal, SIGNAL(triggered()), this, SLOT(ActualiserMode()));
+modeGroup->addAction(actionModeNormal);
+modeMenu->addAction(actionModeNormal);
+if (modeNormal) actionModeNormal->setChecked(true);
+actionModeTexte = new QAction(QString::fromUtf8("Mode éditeur &texte"), this);
+actionModeTexte->setCheckable(true);
+connect(actionModeTexte, SIGNAL(triggered()), this, SLOT(ActualiserMode()));
+modeGroup->addAction(actionModeTexte);
+modeMenu->addAction(actionModeTexte);
+if (!modeNormal) actionModeTexte->setChecked(true);
 
 tutoMenu = menuBar()->addMenu(QString::fromUtf8("&Tutoriel"));
 Act = new QAction(QString::fromUtf8("&Initiation en ligne à l'algorithmique"), this);
@@ -481,6 +499,26 @@ connect(Act, SIGNAL(triggered()), this, SLOT(JavascriptExport()));
 fileToolBar->addAction(Act);
 
 affichageMenu->addAction(fileToolBar->toggleViewAction());
+
+QFrame* toolbarFrame=new QFrame(fileToolBar);
+buttonModeNormal = new QPushButton(QString::fromUtf8("Mode normal"),toolbarFrame);
+connect(buttonModeNormal, SIGNAL(clicked()), this, SLOT(ActualiserModeButton()));
+buttonModeTexte = new QPushButton(QString::fromUtf8("Mode éditeur texte") , toolbarFrame);
+connect(buttonModeTexte, SIGNAL(clicked()), this, SLOT(ActualiserModeButton()));
+buttonModeNormal->setCheckable(true);
+buttonModeTexte->setCheckable(true);
+QHBoxLayout* layout = new QHBoxLayout(toolbarFrame);
+QSpacerItem * spacer = new QSpacerItem(1,1, QSizePolicy::Expanding, QSizePolicy::Fixed);
+layout->addSpacerItem(spacer);
+layout->addWidget(buttonModeNormal);
+layout->addWidget(buttonModeTexte);
+QButtonGroup* group = new QButtonGroup(toolbarFrame);
+group->addButton(buttonModeNormal);
+group->addButton(buttonModeTexte);
+group->setExclusive(true);
+fileToolBar->addWidget(toolbarFrame);
+if (modeNormal) buttonModeNormal->setChecked(true);
+else buttonModeTexte->setChecked(true);
 #endif
 
 ToggleAct = new QAction(this);
@@ -512,11 +550,14 @@ Act = new QAction(QString::fromUtf8("&Ecrire/modifier une extension"), this);
 connect(Act, SIGNAL(triggered()), this, SLOT(LancerJSEditeur()));
 extensionMenu->addAction(Act);
 
+
 optionsMenu = menuBar()->addMenu(QString::fromUtf8("Option&s"));
 Act = new QAction(QString::fromUtf8("Con&figurer exécution des algorithmes"), this);
 connect(Act, SIGNAL(triggered()), this, SLOT(Configurer()));
 optionsMenu->addAction(Act);
 
+connect(ui.pushButtonParam, SIGNAL(clicked()), this, SLOT(Configurer()));
+
 aideMenu = menuBar()->addMenu(QString::fromUtf8("&Aide"));
 Act = new QAction(getIcon(":/images/aide.png"),QString::fromUtf8("A&ide"), this);
 connect(Act, SIGNAL(triggered()), this, SLOT(Aide()));
@@ -563,7 +604,7 @@ if (interditsfile.open(QFile::ReadOnly))
 estVierge=true;
 estModifie=false;
 nomFichier="sanstitre";
-setWindowTitle(QString("AlgoBox ")+QLatin1String(ALGOBOXVERSION)+QString(" : ")+nomFichier);
+setWindowTitle(QString("AlgoBox ")+QLatin1String(VERSION_STR)+QString(" : ")+nomFichier);
 AnnulerExtension();
 Init();
 DesactiverBoutons();
@@ -664,9 +705,17 @@ ActualiserStatut();
 
 void MainWindow::NouvelleLigne(QTreeWidgetItem *item)
 {
+if (!item) return;
 QTreeWidgetItem *newItem = 0;
 QTreeWidgetItem *nextItem = 0;
-if (item->text(0)=="DEBUT_ALGORITHME")
+if (item->text(0)=="FONCTIONS_UTILISEES")
+    {
+    newItem=new QTreeWidgetItem(QStringList(QString("")));
+    newItem->setData(0,Qt::UserRole,QString("103#commentaire"));
+    fctsItem->insertChild(0,newItem);
+    ui.treeWidget->setCurrentItem(newItem);
+    }
+else if (item->text(0)=="DEBUT_ALGORITHME")
     {
     newItem=new QTreeWidgetItem(QStringList(QString("")));
     newItem->setData(0,Qt::UserRole,QString("103#commentaire"));
@@ -682,6 +731,16 @@ else if ((item->text(0).left(3)=="FIN") ||(item->text(0)=="SINON") )
 	NouvelleLigne(item->parent());
 	}
     }
+else if (item->text(0)=="DEBUT_FONCTION")
+    {
+    newItem=new QTreeWidgetItem(QStringList(QString("")));
+    newItem->setData(0,Qt::UserRole,QString("103#commentaire"));
+    if (item->parent())
+	{
+	item->parent()->insertChild(2,newItem);
+	ui.treeWidget->setCurrentItem(newItem);	
+	}
+    }
 else if (item->text(0).left(5)=="DEBUT")
     {
     newItem=new QTreeWidgetItem(QStringList(QString("")));
@@ -763,6 +822,9 @@ else if (type_para==15) ModifierTantque();
 else if (type_para==19) ModifierCommentaire();
 else if (type_para==50) ModifierPoint();
 else if (type_para==51) ModifierSegment();
+else if (type_para==201) ModifierFonction();
+else if (type_para==205) ModifierRenvoyer();
+else if (type_para==206) ModifierAppelerFct();
 ActualiserArbre();
 ActualiserStatut();
 }
@@ -777,6 +839,8 @@ if (modeNormal)
   bool canCopyline=false;
   bool canPasteline=false;
   bool canCutline=false;
+  bool canAddFct=false;
+  bool canAddVariableFct=false;
   QTreeWidgetItem *current = ui.treeWidget->currentItem();
   QTreeWidgetItem *next = 0;
   if (current) 
@@ -795,6 +859,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 2: //LIRE
@@ -806,6 +872,8 @@ if (modeNormal)
 			  canCopyline=true;
 			  canPasteline=false;
 			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 3: //AFFICHER
@@ -817,6 +885,8 @@ if (modeNormal)
 			  canCopyline=true;
 			  canPasteline=false;
 			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 4: //MESSAGE
@@ -828,6 +898,8 @@ if (modeNormal)
 			  canCopyline=true;
 			  canPasteline=false;
 			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 5: //AFFECTATION
@@ -839,6 +911,8 @@ if (modeNormal)
 			  canCopyline=true;
 			  canPasteline=false;
 			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 6: //SI
@@ -850,6 +924,8 @@ if (modeNormal)
 			  canCopyline=true;//false
 			  canPasteline=false;
 			  canCutline=true;//false
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 7: //DEBUT_SI
@@ -861,6 +937,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 8: //FIN_SI
@@ -886,6 +964,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 9: //SINON
@@ -897,6 +977,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 10: //DEBUT_SINON
@@ -908,6 +990,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 11: //FIN_SINON
@@ -919,6 +1003,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 12: //POUR
@@ -930,6 +1016,8 @@ if (modeNormal)
 			  canCopyline=true;//false
 			  canPasteline=false;
 			  canCutline=true;//false
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 13: //DEBUT_POUR
@@ -941,6 +1029,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 14: //FIN_POUR
@@ -952,6 +1042,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 15: //TANT_QUE
@@ -963,6 +1055,8 @@ if (modeNormal)
 			  canCopyline=true;//false
 			  canPasteline=false;
 			  canCutline=true;//false
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 16: //DEBUT_TANT_QUE
@@ -974,6 +1068,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 17: //FIN_TANT_QUE
@@ -985,6 +1081,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 18: //PAUSE
@@ -996,6 +1094,8 @@ if (modeNormal)
 			  canCopyline=true;
 			  canPasteline=false;
 			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 19: //COMMENTAIRE
@@ -1007,6 +1107,8 @@ if (modeNormal)
 			  canCopyline=true;
 			  canPasteline=false;
 			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 50: //POINT
@@ -1018,6 +1120,8 @@ if (modeNormal)
 			  canCopyline=true;
 			  canPasteline=false;
 			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 51: //SEGMENT
@@ -1029,6 +1133,8 @@ if (modeNormal)
 			  canCopyline=true;
 			  canPasteline=false;
 			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 52: //EFFACER
@@ -1040,6 +1146,8 @@ if (modeNormal)
 			  canCopyline=true;
 			  canPasteline=false;
 			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 100: //DECLARATIONS VARIABLES
@@ -1051,6 +1159,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 101: //DEBUT_ALGO
@@ -1062,6 +1172,8 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
 	      case 102: //FIN_ALGO
@@ -1073,8 +1185,101 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
+			  }
+		      break;
+	      case 200: //FONCTIONS_UTILISEES
+		      if (parametres.count()==2)
+			  {
+			  canRemoveline=false;
+			  canAddline = true;
+			  canModifyline=false;
+			  canCopyline=false;
+			  canPasteline=false;
+			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
+			  }
+		      break;
+	      case 201: //FONCTION
+		      if (parametres.count()==3)
+			  {
+			  canRemoveline=true;
+			  canAddline = false;
+			  canModifyline=true;
+			  canCopyline=false;
+			  canPasteline=false;
+			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
+			  }
+		      break;
+	      case 202: //VARIABLES_FONCTION
+		      if (parametres.count()==2)
+			  {
+			  canRemoveline=false;
+			  canAddline = false;
+			  canModifyline=false;
+			  canCopyline=false;
+			  canPasteline=false;
+			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=true;
+			  }
+		      break;
+	      case 203: //DEBUT_FONCTION
+		      if (parametres.count()==2)
+			  {
+			  canRemoveline=false;
+			  canAddline = true;
+			  canModifyline=false;
+			  canCopyline=false;
+			  canPasteline=false;
+			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
+			  }
+		      break;
+	      case 204: //FIN_FONCTION
+		      if (parametres.count()==2)
+			  {
+			  canRemoveline=false;
+			  canAddline = false;
+			  canModifyline=false;
+			  canCopyline=false;
+			  canPasteline=false;
+			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
+			  }
+		      break;
+	      case 205: //RENVOYER
+		      if (parametres.count()==2)
+			  {
+			  canRemoveline=true;
+			  canAddline = true;
+			  canModifyline=true;
+			  canCopyline=true;
+			  canPasteline=false;
+			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
 			  }
 		      break;
+	      case 206: //APPELER_FONCTION
+		      if (parametres.count()==2)
+			  {
+			  canRemoveline=true;
+			  canAddline = true;
+			  canModifyline=true;
+			  canCopyline=true;
+			  canPasteline=false;
+			  canCutline=true;
+              canAddFct=false;
+              canAddVariableFct=false;
+			  }
+		      break;                        
 	      case 103: //autres
 	      default:
 		      if (parametres.count()==2)
@@ -1085,16 +1290,27 @@ if (modeNormal)
 			  canCopyline=false;
 			  canPasteline=false;
 			  canCutline=false;
+              canAddFct=false;
+              canAddVariableFct=false;
+              if (current->parent())
+                {
+                if (current->parent()->text(0)=="FONCTIONS_UTILISEES") canAddFct=true;
+                }
 			  }
 		      break;
 	      }
 	  if (current->text(0).isEmpty()) 
 	      {
-	      ActiverBoutons();
+              ActiverBoutons();
+              if (current->parent())
+                {
+                if (current->parent()->text(0)=="FONCTIONS_UTILISEES") DesactiverBoutons();
+                }              
+	      
 	      if (clipboardItem) 
-		{
-		if (!clipboardItem->text(0).isEmpty()) canPasteline=true;
-		}
+                {
+                if (!clipboardItem->text(0).isEmpty()) canPasteline=true;
+                }
 	      }
 	  else DesactiverBoutons();
 	  }
@@ -1108,6 +1324,9 @@ if (modeNormal)
   ui.pushButtonSupprimerLigne->setEnabled(canRemoveline);
   ui.pushButtonModifierLigne->setEnabled(canModifyline);
 
+  ui.pushButtonNelleFct->setEnabled(canAddFct);
+  ui.pushButtonVariableFct->setEnabled(canAddVariableFct);
+  
   actionCopier->setEnabled(canCopyline);
   actionColler->setEnabled(canPasteline);
   actionCouper->setEnabled(canCutline);
@@ -1128,6 +1347,7 @@ void MainWindow::ActualiserVariables()
 {
 ListeNomsVariables.clear();
 ListeTypesVariables.clear();
+QTreeWidgetItem *item, *varitem;
 QString code;
 QRegExp rxvar("(.*) EST_DU_TYPE (.*)");
 for (int i = 0; i < variablesItem->childCount(); i++) 
@@ -1139,6 +1359,26 @@ for (int i = 0; i < variablesItem->childCount(); i++)
 	ListeTypesVariables.append(rxvar.cap(2));
 	}
     }
+for (int i = 0; i < fctsItem->childCount(); i++) 
+    {
+    item=fctsItem->child(i);
+    for (int j = 0; j < item->childCount(); j++)  
+        {
+        if (item->child(j)->text(0)=="VARIABLES_FONCTION")
+            {
+            varitem=item->child(j);
+            for (int k = 0; k < varitem->childCount(); k++) 
+                {
+                    code=varitem->child(k)->text(0);
+                    if (rxvar.indexIn(code)>-1)
+                    {
+                    ListeNomsVariables.append(rxvar.cap(1));
+                    ListeTypesVariables.append(rxvar.cap(2));
+                    }
+                }
+            }
+        }
+    }
 }
 //*************************
 void MainWindow::AjouterVariable()
@@ -1761,6 +2001,170 @@ else
   ui.EditorView->editor->insertTag(QString::fromUtf8("//"),2,0);
   }
 }
+
+void MainWindow::AjouterFonction()
+{
+if (modeNormal)
+  {
+  QTreeWidgetItem *curItem = ui.treeWidget->currentItem();
+  if (!curItem || !curItem->parent()) return;
+  FonctionDialog *fonctionDialog = new FonctionDialog(this);
+  if (fonctionDialog->exec())
+      {
+      QString nom=fonctionDialog->ui.lineEditNom->text();
+      nom.remove("#");
+      QString param=fonctionDialog->ui.lineEditParam->text();
+      param.remove("#");
+      //commentaire.remove("\"");
+      QString code="";
+      QTreeWidgetItem *newItem;
+      if (!nom.isEmpty())
+	  {
+        if (param.isEmpty()) param=QString(" ");  
+        curItem->setText(0,"FONCTION "+nom+"("+param+")");
+        ui.treeWidget->setItemExpanded (curItem,true);
+        code="201#"+nom+"#"+param;
+        curItem->setData(0,Qt::UserRole,QString(code));
+        newItem = new QTreeWidgetItem(curItem);
+        newItem->setText(0,QString::fromUtf8("VARIABLES_FONCTION"));
+        newItem->setData(0,Qt::UserRole,QString("202#declarationsvariablesfonction"));
+        ui.treeWidget->setItemExpanded (newItem,true);
+        newItem = new QTreeWidgetItem(curItem);
+        newItem->setText(0,QString::fromUtf8("DEBUT_FONCTION"));
+        newItem->setData(0,Qt::UserRole,QString("203#debutfonction"));
+        newItem = new QTreeWidgetItem(curItem);
+        ui.treeWidget->setCurrentItem(newItem);
+        newItem = new QTreeWidgetItem(curItem);
+        newItem->setText(0,QString::fromUtf8("FIN_FONCTION"));
+        newItem->setData(0,Qt::UserRole,QString("204#finfonction"));
+        ActualiserStatut();
+	  }
+      else
+	  {
+	  QMessageBox::warning( this,QString::fromUtf8("Erreur"),QString::fromUtf8("Fonction non valide"));
+	  }
+      }
+  ActualiserArbre();
+  }
+else
+  {
+  QTextCursor cur=ui.EditorView->editor->textCursor();
+  int pos=cur.position();
+  ui.EditorView->editor->insertPlainText(QString::fromUtf8("FONCTION •(•)"));
+  ui.EditorView->editor->insertNewLine();
+  ui.EditorView->editor->insertPlainText(QString::fromUtf8("VARIABLES_FONCTION"));
+  ui.EditorView->editor->insertNewLine();
+  ui.EditorView->editor->insertPlainText(QString::fromUtf8("\tDEBUT_FONCTION"));
+  ui.EditorView->editor->insertNewLine();
+  ui.EditorView->editor->insertNewLine();
+  ui.EditorView->editor->insertPlainText(QString::fromUtf8("FIN_FONCTION"));    
+  cur.setPosition(pos,QTextCursor::MoveAnchor);
+  ui.EditorView->editor->setTextCursor(cur);
+  ui.EditorView->editor->setFocus();
+  ui.EditorView->editor->search(QString(0x2022) ,true,true,true,true);
+  }
+}
+
+void MainWindow::AjouterVariableLocale()
+{
+if (modeNormal)
+  {
+  QTreeWidgetItem *curItem = ui.treeWidget->currentItem();
+  VariableDialog *variableDialog = new VariableDialog(this);
+  if (variableDialog->exec())
+      {
+      QString nomvariable=variableDialog->ui.lineEditVariable->text();
+      nomvariable=FiltreNomVariable(nomvariable);
+      QString type=variableDialog->ui.comboBoxVariable->currentText();
+      QString code="";
+      if (NomInterdit(nomvariable))
+	  {
+	  QMessageBox::warning( this,QString::fromUtf8("Erreur"),QString::fromUtf8("Nom de variable interdit"));
+	  }
+      else
+	  {
+	  QTreeWidgetItem *newItem =new QTreeWidgetItem(curItem);
+	  newItem->setText(0,nomvariable+" EST_DU_TYPE "+type);
+	  code="1#"+type+"#"+nomvariable;
+	  newItem->setData(0,Qt::UserRole,QString(code));
+	  if ((curItem)) ui.treeWidget->setCurrentItem(curItem);
+	  ActualiserStatut();
+	  }
+      }
+  ActualiserArbre();
+  }
+else
+  {
+  ui.EditorView->editor->insertTag(QString::fromUtf8("• EST_DU_TYPE •"),0,0);
+  ui.EditorView->editor->search(QString(0x2022) ,true,true,true,true);
+  }
+}
+
+void MainWindow::AjouterRenvoyer()
+{
+if (modeNormal)
+  {
+  QTreeWidgetItem *curItem = ui.treeWidget->currentItem();
+  if (!curItem || !curItem->parent()) return;
+  RenvoyerDialog *renvoyerDialog = new RenvoyerDialog(this);
+  if (renvoyerDialog->exec())
+      {
+      QString retour=renvoyerDialog->ui.lineEdit->text();
+      retour.remove("#");
+      QString code="";
+      if (!retour.isEmpty())
+	  {
+		  curItem->setText(0,"RENVOYER "+retour);
+		  code="205#"+retour;
+		  curItem->setData(0,Qt::UserRole,QString(code));
+		  ui.treeWidget->setCurrentItem(curItem);
+		  ActualiserStatut();
+	  }
+      else
+	  {
+	  QMessageBox::warning( this,QString::fromUtf8("Erreur"),QString::fromUtf8("Retour vide"));
+	  }
+      }
+  ActualiserArbre();
+  }
+else
+  {
+  ui.EditorView->editor->insertTag(QString::fromUtf8("RENVOYER •"),2,0);
+  }
+}
+
+void MainWindow::AjouterAppelerFct()
+{
+if (modeNormal)
+  {
+  QTreeWidgetItem *curItem = ui.treeWidget->currentItem();
+  if (!curItem || !curItem->parent()) return;
+  AppelDialog *appelDialog = new AppelDialog(this);
+  if (appelDialog->exec())
+      {
+      QString fct=appelDialog->ui.lineEdit->text();
+      fct.remove("#");
+      QString code="";
+      if (!fct.isEmpty())
+	  {
+		  curItem->setText(0,"APPELER_FONCTION "+fct);
+		  code="206#"+fct;
+		  curItem->setData(0,Qt::UserRole,QString(code));
+		  ui.treeWidget->setCurrentItem(curItem);
+		  ActualiserStatut();
+	  }
+      else
+	  {
+	  QMessageBox::warning( this,QString::fromUtf8("Erreur"),QString::fromUtf8("Retour vide"));
+	  }
+      }
+  ActualiserArbre();
+  }
+else
+  {
+  ui.EditorView->editor->insertTag(QString::fromUtf8("APPELER_FONCTION •"),2,0);
+  }
+}
 //***********************************************
 void MainWindow::ModifierLire()
 {
@@ -2336,40 +2740,156 @@ if (parametres.count()==2)
     ActualiserArbre();
     }
 }
-//***********************************************
-void MainWindow::LireConfig()
-{
-#ifdef USB_VERSION
-QSettings *config=new QSettings(QCoreApplication::applicationDirPath()+"/algobox.ini",QSettings::IniFormat);
-#else
-QSettings *config=new QSettings(QSettings::IniFormat,QSettings::UserScope,"xm1","algobox");
-#endif
-config->beginGroup( "algobox" );
-dernierRepertoire=config->value("dernier repertoire",QDir::homePath()).toString();
-QRect screen = QApplication::desktop()->screenGeometry();
-int w= config->value( "Geometries/MainwindowWidth",900).toInt();
-int h= config->value( "Geometries/MainwindowHeight",screen.height()-200).toInt() ;
-int x= config->value( "Geometries/MainwindowX",10).toInt();
-int y= config->value( "Geometries/MainwindowY",10).toInt() ;
-resize(w,h);
-move(x,y);
-windowstate=config->value("MainWindowState").toByteArray();
-afficheCadrePresentation=config->value("Presentation",true).toBool();
-modeNormal=config->value("Edition normale",true).toBool();
-blackconsole=config->value("Black Console",true).toBool();
-if (!afficheCadrePresentation)	ui.groupBoxDescription->hide();
-browserwidth=config->value( "Geometries/BrowserWidth",850).toInt();
-browserheight=config->value( "Geometries/BrowserHeight",540).toInt();
 
-arrondiAuto=config->value("Options/Arrondi",true).toBool();
-maxBoucle=config->value("Options/MaxBoucle",500000).toInt();
-totalBoucles=config->value("Options/TotalBoucles",5000000).toInt();
-totalAffichages=config->value("Options/TotalAffichages",1000).toInt();
+void MainWindow::ModifierFonction()
+{
+QTreeWidgetItem *curItem = ui.treeWidget->currentItem();
+if (!curItem || !curItem->parent()) return;
+QString excode=curItem->data(0,Qt::UserRole).toString();
+QStringList parametres=excode.split("#");
+if (parametres.count()==3)
+    {
+    QString nom=parametres.at(1);
+    QString param=parametres.at(2);
+    FonctionDialog *fonctionDialog = new FonctionDialog(this);
+    fonctionDialog->ui.lineEditNom->setText(nom);
+    fonctionDialog->ui.lineEditParam->setText(param);
+  if (fonctionDialog->exec())
+      {
+      QString nouveau_nom=fonctionDialog->ui.lineEditNom->text();
+      nouveau_nom.remove("#");
+      QString nouveau_param=fonctionDialog->ui.lineEditParam->text();
+      nouveau_param.remove("#");
+      QString code="";
+      QTreeWidgetItem *newItem;
+      if (!nouveau_nom.isEmpty())
+	  {
+        if (nouveau_param.isEmpty()) nouveau_param=QString(" ");
+        curItem->setText(0,"FONCTION "+nouveau_nom+"("+nouveau_param+")");
+        ui.treeWidget->setItemExpanded (curItem,true);
+        code="201#"+nouveau_nom+"#"+nouveau_param;
+        curItem->setData(0,Qt::UserRole,QString(code));
+        ActualiserStatut();
+	  }
+      else
+	  {
+	  QMessageBox::warning( this,QString::fromUtf8("Erreur"),QString::fromUtf8("Fonction non valide"));
+	  }
+      }
+	}
+    ActualiserArbre();
+}
 
-QFontDatabase fdb;
-QStringList xf = fdb.families();
-QString deft;
-if (xf.contains("DejaVu Sans",Qt::CaseInsensitive)) deft="DejaVu Sans";
+void MainWindow::ModifierRenvoyer()
+{
+QTreeWidgetItem *curItem = ui.treeWidget->currentItem();
+if (!curItem || !curItem->parent()) return;
+QString excode=curItem->data(0,Qt::UserRole).toString();
+QStringList parametres=excode.split("#");
+if (parametres.count()==2)
+    {
+    QString exretour=parametres.at(1);
+    RenvoyerDialog *renvoyerDialog = new RenvoyerDialog(this);
+    renvoyerDialog->ui.lineEdit->setText(exretour);
+    if (renvoyerDialog->exec())
+	{
+	QString retour=renvoyerDialog->ui.lineEdit->text();
+	retour.remove("#");
+	QString code="";
+	if (!retour.isEmpty())
+	    {
+		    curItem->setText(0,"RENVOYER "+retour);
+		    code="205#"+retour;
+		    curItem->setData(0,Qt::UserRole,QString(code));
+		    ui.treeWidget->setCurrentItem(curItem);
+		    ActualiserStatut();
+	    }
+	else
+	    {
+	    QMessageBox::warning( this,QString::fromUtf8("Erreur"),QString::fromUtf8("Retour vide"));
+	    }
+	}
+    ActualiserArbre();
+    }
+}
+void MainWindow::ModifierAppelerFct()
+{
+QTreeWidgetItem *curItem = ui.treeWidget->currentItem();
+if (!curItem || !curItem->parent()) return;
+QString excode=curItem->data(0,Qt::UserRole).toString();
+QStringList parametres=excode.split("#");
+if (parametres.count()==2)
+    {
+    QString exfct=parametres.at(1);
+    AppelDialog *appelDialog = new AppelDialog(this);
+    appelDialog->ui.lineEdit->setText(exfct);
+    if (appelDialog->exec())
+	{
+	QString fct=appelDialog->ui.lineEdit->text();
+	fct.remove("#");
+	QString code="";
+	if (!fct.isEmpty())
+	    {
+		    curItem->setText(0,"APPELER_FONCTION "+fct);
+		    code="206#"+fct;
+		    curItem->setData(0,Qt::UserRole,QString(code));
+		    ui.treeWidget->setCurrentItem(curItem);
+		    ActualiserStatut();
+	    }
+	else
+	    {
+	    QMessageBox::warning( this,QString::fromUtf8("Erreur"),QString::fromUtf8("Retour vide"));
+	    }
+	}
+    ActualiserArbre();
+    }
+}
+//***********************************************
+void MainWindow::LireConfig()
+{
+#ifdef USB_VERSION
+QSettings *config=new QSettings(QCoreApplication::applicationDirPath()+"/algobox.ini",QSettings::IniFormat);
+#else
+QSettings *config=new QSettings(QSettings::IniFormat,QSettings::UserScope,"xm1","algobox");
+#endif
+config->beginGroup( "algobox" );
+dernierRepertoire=config->value("dernier repertoire",QDir::homePath()).toString();
+QRect screen = QApplication::desktop()->screenGeometry();
+int w= config->value( "Geometries/MainwindowWidth",900).toInt();
+int h= config->value( "Geometries/MainwindowHeight",screen.height()-200).toInt() ;
+int x= config->value( "Geometries/MainwindowX",10).toInt();
+int y= config->value( "Geometries/MainwindowY",10).toInt() ;
+resize(w,h);
+move(x,y);
+windowstate=config->value("MainWindowState").toByteArray();
+afficheCadrePresentation=config->value("Presentation",true).toBool();
+modeNormal=config->value("Edition normale",true).toBool();
+blackconsole=config->value("Black Console",true).toBool();
+if (!afficheCadrePresentation)	ui.frameDescription->hide();
+browserwidth=config->value( "Geometries/BrowserWidth",850).toInt();
+browserheight=config->value( "Geometries/BrowserHeight",540).toInt();
+
+arrondiAuto=config->value("Options/Arrondi",true).toBool();
+maxBoucle=config->value("Options/MaxBoucle",500000).toInt();
+totalBoucles=config->value("Options/TotalBoucles",5000000).toInt();
+totalAffichages=config->value("Options/TotalAffichages",1000).toInt();
+
+epaisseurLigne=config->value("Options/EpaisseurLigne",2).toInt();
+epaisseurPoint=config->value("Options/EpaisseurPoint",2).toInt();
+nbDecimales=config->value("Options/NbDecimales",8).toInt();
+
+arrondiAutoAlgo=arrondiAuto;
+maxBoucleAlgo=maxBoucle;
+totalBouclesAlgo=totalBoucles;
+totalAffichagesAlgo=totalAffichages;
+epaisseurLigneAlgo=epaisseurLigne;
+epaisseurPointAlgo=epaisseurPoint;
+nbDecimalesAlgo=nbDecimales;
+
+QFontDatabase fdb;
+QStringList xf = fdb.families();
+QString deft;
+if (xf.contains("DejaVu Sans",Qt::CaseInsensitive)) deft="DejaVu Sans";
 else if (xf.contains("DejaVu Sans LGC",Qt::CaseInsensitive)) deft="DejaVu Sans LGC";
 else if (xf.contains("Bitstream Vera Sans",Qt::CaseInsensitive)) deft="Bitstream Vera Sans";
 else if (xf.contains("Luxi Sans",Qt::CaseInsensitive)) deft="Luxi Sans";
@@ -2386,19 +2906,16 @@ QString kdesession= ::getenv("KDE_FULL_SESSION");
 QString kdeversion= ::getenv("KDE_SESSION_VERSION");
 if (!kdesession.isEmpty()) desktop_env=2;
 if (!kdeversion.isEmpty()) desktop_env=3;
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-QApplication::setStyle(QStyleFactory::create("fusion"));
-#else
-if (desktop_env ==1) //no-kde
-    {
-    if (styles.contains("GTK+")) QApplication::setStyle(QStyleFactory::create("GTK+"));//gtkstyle
-    else QApplication::setStyle(QStyleFactory::create("Cleanlooks"));
-    }
-else if ((desktop_env ==3) && (styles.contains("Oxygen"))) QApplication::setStyle(QStyleFactory::create("Oxygen")); //kde4+oxygen
-else QApplication::setStyle(QStyleFactory::create("Plastique")); //others
-QString baseStyleName = qApp->style()->objectName(); //fallback
-if (baseStyleName == QLatin1String("Windows")) QApplication::setStyle(QStyleFactory::create("Plastique")); 
-#endif
+
+if(desktop_env == 1)
+{
+if (styles.contains("GTK+")) qApp->setStyle(QLatin1String("gtkstyle"));
+else if (styles.contains("Breeze")) qApp->setStyle(QLatin1String("breeze"));
+else qApp->setStyle(QLatin1String("fusion"));    
+}
+else if (styles.contains("Breeze")) qApp->setStyle(QLatin1String("breeze"));
+else qApp->setStyle(QLatin1String("fusion"));
+
 
 #ifdef STATIC_VERSION
 QPalette pal = QApplication::palette();
@@ -2478,6 +2995,9 @@ config.setValue("Options/Arrondi",arrondiAuto);
 config.setValue("Options/MaxBoucle",maxBoucle);
 config.setValue("Options/TotalBoucles",totalBoucles);
 config.setValue("Options/TotalAffichages",totalAffichages);
+config.setValue("Options/EpaisseurLigne",epaisseurLigne);
+config.setValue("Options/EpaisseurPoint",epaisseurPoint);
+config.setValue("Options/NbDecimales",nbDecimales);
 
 
 config.setValue("X11/Font Family",x11fontfamily);
@@ -2529,6 +3049,7 @@ Init();
 
 void MainWindow::Init()
 {
+ui.tabWidget->removeTab(ui.tabWidget->indexOf(ui.tabWidget->findChild<QWidget *>("tab_4"))); 
 ui.treeWidget->clear();
 clipboardItem=new QTreeWidgetItem(QStringList(QString("")));
 ui.treeWidget->setColumnCount(1);
@@ -2536,17 +3057,21 @@ ui.treeWidget->header()->hide();
 ui.treeWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
 ui.treeWidget->header()->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
 //ui.treeWidget->header()->setResizeMode(0, QHeaderView::Stretch);
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
 ui.treeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
-#else
-ui.treeWidget->header()->setResizeMode(0, QHeaderView::ResizeToContents);
-#endif
 ui.treeWidget->header()->setStretchLastSection(false);
 ui.textEditDescription->clear();
+ui.comboBoxParam->clear();
 
 QFont titleFont = qApp->font();
 titleFont.setBold(true);
 
+fctsItem =new QTreeWidgetItem;
+fctsItem->setText(0,QString("FONCTIONS_UTILISEES"));
+fctsItem->setData(0,Qt::UserRole,QString("200#declarationfonctions"));
+fctsItem->setFont(0,titleFont);
+ui.treeWidget->addTopLevelItem(fctsItem);
+ui.treeWidget->setItemExpanded (fctsItem,true);
+
 variablesItem =new QTreeWidgetItem;
 variablesItem->setText(0,QString("VARIABLES"));
 variablesItem->setData(0,Qt::UserRole,QString("100#declarationsvariables"));
@@ -2605,11 +3130,21 @@ ui.lineEditGradX->setEnabled(false);
 ui.lineEditGradY->setEnabled(false);
 
 ui.EditorView->editor->clear();
-ui.EditorView->editor->insertTag(QString::fromUtf8("VARIABLES\n\nDEBUT_ALGORITHME\n\t\nFIN_ALGORITHME"),0,1);
+ui.EditorView->editor->insertTag(QString::fromUtf8("FONCTIONS_UTILISEES\n\nVARIABLES\n\nDEBUT_ALGORITHME\n\t\nFIN_ALGORITHME"),0,1);
 if (!modeNormal) ui.EditorView->editor->setFocus();
+else ui.treeWidget->setFocus();
 
 ActualiserVariables();  
 ui.tabWidget->setCurrentIndex(0);
+arrondiAutoAlgo=arrondiAuto;
+maxBoucleAlgo=maxBoucle;
+totalBouclesAlgo=totalBoucles;
+totalAffichagesAlgo=totalAffichages;
+epaisseurLigneAlgo=epaisseurLigne;
+epaisseurPointAlgo=epaisseurPoint;
+nbDecimalesAlgo=nbDecimales;
+ActualiserTexteParam();
+
 }
 
 void MainWindow::EffaceArbre()
@@ -2621,17 +3156,22 @@ ui.treeWidget->header()->hide();
 ui.treeWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
 ui.treeWidget->header()->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
 //ui.treeWidget->header()->setResizeMode(0, QHeaderView::Stretch);
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+
 ui.treeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
-#else
-ui.treeWidget->header()->setResizeMode(0, QHeaderView::ResizeToContents);
-#endif
+
 
 ui.treeWidget->header()->setStretchLastSection(false);
 
 QFont titleFont = qApp->font();
 titleFont.setBold(true);
 
+fctsItem =new QTreeWidgetItem;
+fctsItem->setText(0,QString("FONCTIONS_UTILISEES"));
+fctsItem->setData(0,Qt::UserRole,QString("200#declarationfonctions"));
+fctsItem->setFont(0,titleFont);
+ui.treeWidget->addTopLevelItem(fctsItem);
+ui.treeWidget->setItemExpanded (fctsItem,true);
+
 variablesItem =new QTreeWidgetItem;
 variablesItem->setText(0,QString("VARIABLES"));
 variablesItem->setData(0,Qt::UserRole,QString("100#declarationsvariables"));
@@ -2668,6 +3208,8 @@ ui.pushButtonCondition->setEnabled(true);
 ui.pushButtonBoucle->setEnabled(true);
 ui.pushButtonTantque->setEnabled(true);
 ui.pushButtonCommentaire->setEnabled(true);
+ui.pushButtonRetourFct->setEnabled(true);
+ui.pushButtonAppelFonction->setEnabled(true);
 if (ui.checkBoxRepere->isChecked())
     {
     ui.pushButtonPoint->setEnabled(true);
@@ -2691,6 +3233,8 @@ ui.pushButtonPoint->setEnabled(false);
 ui.pushButtonSegment->setEnabled(false);
 ui.pushButtonEfface->setEnabled(false);
 ui.pushButtonCommentaire->setEnabled(false);
+ui.pushButtonRetourFct->setEnabled(false);
+ui.pushButtonAppelFonction->setEnabled(false);
 }
 
 void MainWindow::ActiverFonction(bool etat)
@@ -2784,7 +3328,7 @@ while (!t.atEnd())
 	}
 modelefile.close();
 
-code.replace("#MAX_AFFICHAGES#",QString::number(totalAffichages));
+code.replace("#MAX_AFFICHAGES#",QString::number(totalAffichagesAlgo));
 
 QString variablescode="";
 for (int i = 0; i < ListeNomsVariables.count(); i++) 
@@ -2819,7 +3363,7 @@ for (int i = 0; i < ListeNomsVariables.count(); i++)
     }
 code.replace("#AFFICHE_VARIABLES#",variablescode);
 
-if (arrondiAuto) code.replace("#INSTRUCTION_ARRONDI#","else return parseFloat(nb.toPrecision(12));");
+if (arrondiAutoAlgo) code.replace("#INSTRUCTION_ARRONDI#","else return parseFloat(nb.toPrecision(12));");
 else code.replace("#INSTRUCTION_ARRONDI#","else return nb;");
 
 QString initcode="";
@@ -2865,6 +3409,7 @@ QString jscriptcode="";
 indent=0;
 idligne=0;
 //repereDefini=false;
+dansFct=false;
 for (int i = 0; i < nb_branches; i++) jscriptcode+=CodeNoeud(ui.treeWidget->topLevelItem(i),exporthtml);
 code.replace("#JAVASCRIPT#",extensioncode+jscriptcode);
 
@@ -2877,6 +3422,10 @@ else
 code.replace("#GRAPHIQUE#","");
 }
 
+code.replace("#LINEWIDTH#",QString::number(epaisseurLigneAlgo));
+code.replace("#POINTWIDTH#",QString::number(epaisseurPointAlgo));
+code.replace("#NB_DECIMALES_AFFICHEES#",QString::number(nbDecimalesAlgo));
+
 QFileInfo fic(nomFichier);
 if (nomFichier!="sanstitre") code.replace("#TITRE#","AlgoBox : "+fic.baseName());
 else code.replace("#TITRE#","AlgoBox : "+nomFichier);
@@ -2977,7 +3526,55 @@ if (parametres.count()>0)
   int type_para=parametres.at(0).toInt();
   switch (type_para)
     {
+    case 201: //FONCTION
+        dansFct=true;
+	    if (parametres.count()==3)
+		{
+		QString nom=parametres.at(1);
+		QString param=parametres.at(2);
+		if (param==" ") code="function "+nom+"()\n";
+        else code="function "+nom+"("+param+")\n";
+		}
+	    break;
+    case 202: //VARIABLES LOCALES FONCTION
+	    if (parametres.count()==3)
+		{
+		QString type=parametres.at(1);
+		QString nomvariable=parametres.at(2);
+		code="var ";
+		if (type=="NOMBRE") code+=nomvariable+"=new Number();\n";
+		else if (type=="CHAINE") code+=nomvariable+"=new String();\n";
+		else if (type=="LISTE") code+=nomvariable+"=new Array();\n";
+		}
+	    break;
+    case 203: //DEBUT_FONCTION
+	    if (parametres.count()==2)
+		{
+		code="{\n";
+		}
+	    break;
+    case 204: //FIN_FONCTION
+	    if (parametres.count()==2)
+		{
+		code="}\n";
+		}
+	    break;
+    case 205: //RENVOYER_FONCTION
+	    if (parametres.count()==2)
+		{
+		  QString calcul=FiltreCalcul(parametres.at(1));
+		  code="return ALGOBOX_ARRONDI("+calcul+");\n";  
+		}
+	    break;
+    case 206: //APPELER_FONCTION
+	    if (parametres.count()==2)
+		{
+         code="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\n";
+		 code+=parametres.at(1)+";\n";  
+		}
+	    break;
     case 1: //VARIABLES
+        dansFct=false;
 	    if (parametres.count()==3)
 		{
 		QString type=parametres.at(1);
@@ -3001,7 +3598,7 @@ if (parametres.count()>0)
 		    if (type=="CHAINE") 
 		      {
 		      code+=nomvariable+"=prompt(\"Entrer "+nomvariable+" :\");\n"+nomvariable+"="+nomvariable+".replace(new RegExp(\"\\\"\",\"g\"),\"\");\n";
-		      if (!exporthtml) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}";
+		      if (!exporthtml && !dansFct) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}";
 		      }
 		    else if (type=="NOMBRE") 
 		      {
@@ -3009,7 +3606,7 @@ if (parametres.count()>0)
 		      code+="if (!"+nomvariable+"_temp) {throw(\"erreur_input\");}\n";
 		      code+="if (ALGOBOX_CALCULER_EXPRESSION("+nomvariable+"_temp)==\"Erreur\") {throw(\"erreur_calcul\");}\n";
 		      code+=nomvariable+"=ALGOBOX_CALCULER_EXPRESSION("+nomvariable+"_temp);\n";
-		      if (!exporthtml) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}";
+		      if (!exporthtml && !dansFct) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}";
 		      }
 		    else if (type=="LISTE") 
 		      {
@@ -3023,7 +3620,7 @@ if (parametres.count()>0)
 //		      code+="if (!"+nomvariable+"_temp) {throw(\"erreur_input\");}\n";
 //		      code+="if (ALGOBOX_CALCULER_EXPRESSION("+nomvariable+"_temp)==\"Erreur\") {throw(\"erreur_calcul\");}\n";
 		      //code+=nomvariable+"["+rang+"]=ALGOBOX_CALCULER_EXPRESSION("+nomvariable+"_temp);\n";
-		      if (!exporthtml) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}";
+		      if (!exporthtml && !dansFct) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}";
 		      }
 		    }
 		}
@@ -3078,7 +3675,7 @@ if (parametres.count()>0)
 		    if (type=="LISTE") 
 		      {
 		      //code+=nomvariable+"["+rang+"]=ALGOBOX_ARRONDI("+contenu+");\n";
-		     // if (!exporthtml) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}\n";
+		     // if (!exporthtml && !dansFct) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}\n";
 		      code+=nomvariable+"_temp_tab=\""+contenu+"\".split(new RegExp(\"[:]+\", \"g\"));\n";
 		      code+="for ("+nomvariable+"_temp_tab_compteur=0;"+nomvariable+"_temp_tab_compteur<"+nomvariable+"_temp_tab.length;"+nomvariable+"_temp_tab_compteur++)\n{\n";
 		      code+="if (ALGOBOX_ARRONDI(eval("+nomvariable+"_temp_tab["+nomvariable+"_temp_tab_compteur]))==\"Erreur\") {throw(\"erreur_calcul\");}\n";
@@ -3086,20 +3683,20 @@ if (parametres.count()>0)
 		      code+="while ("+nomvariable+"_temp_tab.length>0) "+nomvariable+"_temp_tab.pop();\n";
 		      //code+="if (ALGOBOX_ARRONDI("+contenu+")==\"Erreur\") {throw(\"erreur_calcul\");}\n";
 		      //code+=nomvariable+"["+rang+"]=ALGOBOX_ARRONDI("+contenu+");\n";
-		      if (!exporthtml) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}\n";
+		      if (!exporthtml && !dansFct) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}\n";
 		      }
 		    else if (type=="NOMBRE") 
 		      {
 		      //code+=nomvariable+"=ALGOBOX_ARRONDI("+contenu+");\n";
-		      //if (!exporthtml) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}\n";
+		      //if (!exporthtml && !dansFct) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}\n";
 		      code+="if (ALGOBOX_ARRONDI("+contenu+")==\"Erreur\") {throw(\"erreur_calcul\");}\n";
 		      code+=nomvariable+"=ALGOBOX_ARRONDI("+contenu+");\n";
-		      if (!exporthtml) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}\n";
+		      if (!exporthtml && !dansFct) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}\n";
 		      }
 		    else 
 		      {
 		      code+=nomvariable+"="+contenu+";\n";
-		      if (!exporthtml) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}";
+		      if (!exporthtml && !dansFct) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}";
 		      }
 		    }
 		}
@@ -3122,7 +3719,7 @@ if (parametres.count()>0)
 		  code+="ALGOBOX_REPERE("+FiltreCalcul(ui.lineEditXmin->text())+","+FiltreCalcul(ui.lineEditXmax->text())+","+FiltreCalcul(ui.lineEditYmin->text())+","+FiltreCalcul(ui.lineEditYmax->text())+","+FiltreCalcul(ui.lineEditGradX->text())+","+FiltreCalcul(ui.lineEditGradY->text())+");\n";
 		  repereDefini=true;
 		  }*/
-		if (!exporthtml)
+		if (!exporthtml && !dansFct)
 		  {
 		  code+="\nif (ALGOBOX_PAS_A_PAS)\n";
 		  code+="{\n";
@@ -3138,14 +3735,14 @@ if (parametres.count()>0)
 		{
 		code="{\n";
 		code+="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\nif (ALGOBOX_EMERGENCY_STOP) {throw(\"erreur_emergency\");}\n";
-		if (!exporthtml) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Entrée dans le bloc DEBUT_SI/FIN_SI")+"\")) {throw(\"erreur_pause\");}}";
+		if (!exporthtml && !dansFct) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Entrée dans le bloc DEBUT_SI/FIN_SI")+"\")) {throw(\"erreur_pause\");}}";
 		}
 	    break;
     case 8: //FIN_SI
 	    if (parametres.count()==2)
 		{
 		code="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\nif (ALGOBOX_EMERGENCY_STOP) {throw(\"erreur_emergency\");}\n";
-		if (!exporthtml) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Sortie du bloc DEBUT_SI/FIN_SI")+"\")) {throw(\"erreur_pause\");}}";
+		if (!exporthtml && !dansFct) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Sortie du bloc DEBUT_SI/FIN_SI")+"\")) {throw(\"erreur_pause\");}}";
 		code+="}";
 		}
 	    break;
@@ -3160,14 +3757,14 @@ if (parametres.count()>0)
 		{
 		code="{\n";
 		code+="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\nif (ALGOBOX_EMERGENCY_STOP) {throw(\"erreur_emergency\");}\n";
-	    	if (!exporthtml) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Entrée dans le bloc DEBUT_SINON/FIN_SINON")+"\")) {throw(\"erreur_pause\");}}";
+	    	if (!exporthtml && !dansFct) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Entrée dans le bloc DEBUT_SINON/FIN_SINON")+"\")) {throw(\"erreur_pause\");}}";
 		}
 	    break;
     case 11: //FIN_SINON
 	    if (parametres.count()==2)
 		{
 		code="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\nif (ALGOBOX_EMERGENCY_STOP) {throw(\"erreur_emergency\");}\n";
-	    	if (!exporthtml) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Sortie du bloc DEBUT_SINON/FIN_SINON")+"\")) {throw(\"erreur_pause\");}}";
+	    	if (!exporthtml && !dansFct) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Sortie du bloc DEBUT_SINON/FIN_SINON")+"\")) {throw(\"erreur_pause\");}}";
 		code+="}";
 		}
 	    break;
@@ -3202,7 +3799,7 @@ if (parametres.count()>0)
 		code="{\n"+varboucle+"++;\n";
 		code+="ALGOBOX_COMPTEUR_BOUCLE_GLOBAL++;\n";
 	        code+="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\nif (ALGOBOX_EMERGENCY_STOP) {throw(\"erreur_emergency\");}\n";
-	    	if (!exporthtml) code+="if (ALGOBOX_PAS_A_PAS) {ALGOBOX_AFFICHE_PASAPAS(\""+QString::fromUtf8("Entrée dans le bloc DEBUT_POUR/FIN_POUR")+" (ligne "+QString::number(id)+")\",true); if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}";
+	    	if (!exporthtml && !dansFct) code+="if (ALGOBOX_PAS_A_PAS) {ALGOBOX_AFFICHE_PASAPAS(\""+QString::fromUtf8("Entrée dans le bloc DEBUT_POUR/FIN_POUR")+" (ligne "+QString::number(id)+")\",true); if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}";
 		}
 	    break;
     case 14: //FIN_POUR
@@ -3210,11 +3807,11 @@ if (parametres.count()>0)
 		{
 		varboucle="ALGOBOX_SECURITE_BOUCLE"+QString::number(indent-1);
 	        code="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\nif (ALGOBOX_EMERGENCY_STOP) {throw(\"erreur_emergency\");}\n";
-		if (!exporthtml) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Sortie du bloc DEBUT_POUR/FIN_POUR")+"\")) {throw(\"erreur_pause\");}}";
+		if (!exporthtml && !dansFct) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Sortie du bloc DEBUT_POUR/FIN_POUR")+"\")) {throw(\"erreur_pause\");}}";
 		code+="if (ALGOBOX_DEPASSEMENT_AFFICHAGE) {throw(\"erreur_affiche\"); break;}\n";
-		code+="if ("+varboucle+">"+QString::number(maxBoucle)+") {throw(\"erreur_boucle\"); break;}\n";
-	    	if (!exporthtml) code+="if (ALGOBOX_COMPTEUR_BOUCLE_GLOBAL%10000==0) ALGOBOX_PING_OUTPUT();\n";
-	    	code+="if (ALGOBOX_COMPTEUR_BOUCLE_GLOBAL>"+QString::number(totalBoucles)+") {throw(\"erreur_boucle\"); break;}\n}";
+		code+="if ("+varboucle+">"+QString::number(maxBoucleAlgo)+") {throw(\"erreur_boucle\"); break;}\n";
+	    	if (!exporthtml && !dansFct) code+="if (ALGOBOX_COMPTEUR_BOUCLE_GLOBAL%10000==0) ALGOBOX_PING_OUTPUT();\n";
+	    	code+="if (ALGOBOX_COMPTEUR_BOUCLE_GLOBAL>"+QString::number(totalBouclesAlgo)+") {throw(\"erreur_boucle\"); break;}\n}";
 		}
 	    break;
     case 15: //TANT_QUE
@@ -3225,7 +3822,7 @@ if (parametres.count()>0)
 		varboucle="ALGOBOX_SECURITE_BOUCLE"+QString::number(indent);
 		code=varboucle+"=0;\n";
 		code+="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\nif (ALGOBOX_EMERGENCY_STOP) {throw(\"erreur_emergency\");}\n";
-// 		if (!exporthtml)
+// 		if (!exporthtml && !dansFct)
 // 		  {
 // 		  code+="\nif (ALGOBOX_PAS_A_PAS)\n";
 // 		  code+="{\n";
@@ -3255,7 +3852,7 @@ if (parametres.count()>0)
 		code="{\n"+varboucle+"++;\n";
 	    	code+="ALGOBOX_COMPTEUR_BOUCLE_GLOBAL++;";
 	        code+="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\nif (ALGOBOX_EMERGENCY_STOP) {throw(\"erreur_emergency\");}\n";
-		if (!exporthtml) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Entrée dans le bloc DEBUT_TANT_QUE/FIN_TANT_QUE : condition vérifiée")+"\")) {throw(\"erreur_pause\");}}";
+		if (!exporthtml && !dansFct) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Entrée dans le bloc DEBUT_TANT_QUE/FIN_TANT_QUE : condition vérifiée")+"\")) {throw(\"erreur_pause\");}}";
 		}
 	    break;
     case 17: //FIN_TANT_QUE
@@ -3263,11 +3860,11 @@ if (parametres.count()>0)
 		{
 		varboucle="ALGOBOX_SECURITE_BOUCLE"+QString::number(indent-1);
 		code="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\nif (ALGOBOX_EMERGENCY_STOP) {throw(\"erreur_emergency\");}\n";
-		if (!exporthtml) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Sortie du bloc DEBUT_TANT_QUE/FIN_TANT_QUE")+"\")) {throw(\"erreur_pause\");}}";
+		if (!exporthtml && !dansFct) code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Sortie du bloc DEBUT_TANT_QUE/FIN_TANT_QUE")+"\")) {throw(\"erreur_pause\");}}";
 	    	code+="if (ALGOBOX_DEPASSEMENT_AFFICHAGE) {throw(\"erreur_affiche\"); break;}\n";
 		code+="if ("+varboucle+">"+QString::number(maxBoucle)+") {throw(\"erreur_boucle\"); break;}\n";
-	    	if (!exporthtml) code+="if (ALGOBOX_COMPTEUR_BOUCLE_GLOBAL%10000==0) ALGOBOX_PING_OUTPUT();\n";
-	    	code+="if (ALGOBOX_COMPTEUR_BOUCLE_GLOBAL>"+QString::number(totalBoucles)+") {throw(\"erreur_boucle\"); break;}\n}";
+	    	if (!exporthtml && !dansFct) code+="if (ALGOBOX_COMPTEUR_BOUCLE_GLOBAL%10000==0) ALGOBOX_PING_OUTPUT();\n";
+	    	code+="if (ALGOBOX_COMPTEUR_BOUCLE_GLOBAL>"+QString::number(totalBouclesAlgo)+") {throw(\"erreur_boucle\"); break;}\n}";
 		}
 	    break;
     case 18: //PAUSE
@@ -3292,7 +3889,7 @@ if (parametres.count()>0)
 		  code="ALGOBOX_LIGNE_COURANTE="+QString::number(id)+";\nif (ALGOBOX_EMERGENCY_STOP) {throw(\"erreur_emergency\");}\n";
 		  code+="if (ALGOBOX_ARRONDI("+calcul+")==\"Erreur\") {throw(\"erreur_calcul\");}\n";
 		  code+="algobox_temp_affichcalcul=ALGOBOX_ARRONDI("+calcul+");\n";
-		  if (!exporthtml) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}\n";
+		  if (!exporthtml && !dansFct) code+="if (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_PAUSE_PAS_A_PAS("+QString::number(id)+")) {throw(\"erreur_pause\");}}\n";
 		  if (retourligne=="1") code+="ALGOBOX_AJOUTE_OUTPUT(ALGOBOX_FORMAT_TEXTE(algobox_temp_affichcalcul),true);";
 		  else code+="ALGOBOX_AJOUTE_OUTPUT(ALGOBOX_FORMAT_TEXTE(algobox_temp_affichcalcul),false);";	  
 		}
@@ -3323,7 +3920,7 @@ if (parametres.count()>0)
 		else if (parametres.at(3)=="Blanc") col="9";
 		code+="if (ALGOBOX_ARRONDI("+x+")==\"Erreur\") {throw(\"erreur_calcul\");}\n";
 		code+="if (ALGOBOX_ARRONDI("+y+")==\"Erreur\") {throw(\"erreur_calcul\");}\n";
-		if (!exporthtml) 
+		if (!exporthtml && !dansFct) 
 		  {
 		  code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Tracé du point (")+"\"";
 		  code+="+ALGOBOX_ARRONDI("+x+")+\",\"";
@@ -3363,7 +3960,7 @@ if (parametres.count()>0)
 		code+="if (ALGOBOX_ARRONDI("+ydep+")==\"Erreur\") {throw(\"erreur_calcul\");}\n";
 		code+="if (ALGOBOX_ARRONDI("+xfin+")==\"Erreur\") {throw(\"erreur_calcul\");}\n";
 		code+="if (ALGOBOX_ARRONDI("+yfin+")==\"Erreur\") {throw(\"erreur_calcul\");}\n";
-		if (!exporthtml) 
+		if (!exporthtml && !dansFct) 
 		  {
 		  code+="\nif (ALGOBOX_PAS_A_PAS) {if (!ALGOBOX_INFO_PAS_A_PAS("+QString::number(id)+",\""+QString::fromUtf8("Tracé du segment (")+"\"";
 		  code+="+ALGOBOX_ARRONDI("+xdep+")+\",\"";
@@ -3452,7 +4049,7 @@ if (parametres.count()>0)
 		    code+="ALGOBOX_contexte.clearRect(0, 0, ALGOBOX_canevas.width,ALGOBOX_canevas.height);\n";
 		    code+="\n}\n";
 		    }
-		if (!exporthtml) code+="browserDialog.scriptLaunched();\n";
+		if (!exporthtml && !dansFct) code+="browserDialog.scriptLaunched();\n";
 		code+="if (ALGOBOX_PAS_A_PAS) ALGOBOX_AJOUTE_OUTPUT(\""+QString::fromUtf8("***Algorithme lancé en mode pas à pas***")+"\",true);\nelse ALGOBOX_AJOUTE_OUTPUT(\""+QString::fromUtf8("***Algorithme lancé***")+"\",true);\n";    
 		code+="try\n{";
 		}
@@ -3461,7 +4058,7 @@ if (parametres.count()>0)
 	    if (parametres.count()==2)
 		{
 		  code="ALGOBOX_AJOUTE_OUTPUT(\" \",true);\nALGOBOX_AJOUTE_OUTPUT(\""+QString::fromUtf8("***Algorithme terminé***")+"\",false);\n";
-		  if (!exporthtml) code+="browserDialog.scriptFinished();\n";
+		  if (!exporthtml && !dansFct) code+="browserDialog.scriptFinished();\n";
 		  code+="}\ncatch(ALGOBOX_MESSAGE)\n{\n";
 		  //erreur_input
 		  code+="if (ALGOBOX_MESSAGE==\"erreur_input\")\n{\n";
@@ -3506,7 +4103,7 @@ if (parametres.count()>0)
 		  //
 		  code+="ALGOBOX_ACTIVER_LIGNE(ALGOBOX_LIGNE_COURANTE);\n";
 		  code+="window.location.href = \"#\"+ALGOBOX_LIGNE_COURANTE;\n";
-		  if (!exporthtml) code+="\nbrowserDialog.scriptFinished();\n";
+		  if (!exporthtml && !dansFct) code+="\nbrowserDialog.scriptFinished();\n";
 		  code+="\n}\n}";		  
 		}
 	    break;
@@ -3547,7 +4144,6 @@ for (int i = 0; i < motcle.count(); i++)
       result=result.replace(motcle.at(i),"Math."+motcle.at(i),Qt::CaseInsensitive);
       }
     }
-//qDebug() << orig << result;
 QStringList motclebis=QString("cos(,sin(,tan(").split(",");
 int leftPos;
 for (int i = 0; i < motclebis.count(); i++)
@@ -3568,7 +4164,6 @@ for (int i = 0; i < motclebis.count(); i++)
       else leftPos = result.indexOf(motclebis.at(i), leftPos+1,Qt::CaseInsensitive );
       }
     }
-//qDebug() << orig << result;
 return result;
 }
 
@@ -3851,9 +4446,7 @@ else if (xf.contains("Courier New",Qt::CaseInsensitive)) deft="Courier New";
 #endif
 else deft=qApp->font().family();
 QTextCharFormat output_format;
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
 output_format.setFont(QFont(deft,9));  //bug Qt 4.5
-#endif
 output_format.setFontFamily(deft);
 QTextDocument *document =new QTextDocument(this);
 document->setDefaultFont(QFont(deft,9));
@@ -3972,6 +4565,7 @@ QString date=CurrDate.toString("dd.MM.yyyy");
 QString code="";
 int nb_branches=ui.treeWidget->topLevelItemCount();
 QString item;
+QRegExp fctreg("FONCTION (.*)");
 QRegExp pourreg("POUR (.*) ALLANT_DE (.*) A (.*)");
 QRegExp sireg("SI (.*) ALORS");
 QRegExp tantquereg("TANT_QUE (.*) FAIRE");
@@ -4009,6 +4603,14 @@ for(int j=0;j<lignes.count();j++)
 	  if (tantquereg.exactMatch(item))  element="\\Tantque{"+tantquereg.cap(1)+"}\n";
 	  else if (item!="") element+="\\Ligne "+item+"\n";
 	  }
+	else if (item.startsWith("FONCTION "))
+	  {
+	  if (fctreg.exactMatch(item))  element="\\Fct{"+fctreg.cap(1)+"}\n";
+	  else if (item!="") element+="\\Ligne "+item+"\n";
+	  }
+	else if (item=="FONCTIONS_UTILISEES") element="\\Fonctions\n";
+    else if (item=="DEBUT_FONCTION") element="\\DebutFonction\n";
+    else if (item=="FIN_FONCTION") element="\\FinFonction\n";
 	else if (item=="VARIABLES") element="\\Variables\n";
 	else if (item=="DEBUT_ALGORITHME") element="\\DebutAlgo\n";
 	else if (item=="DEBUT_SINON") element="\\DebutSinon\n";
@@ -4270,7 +4872,7 @@ ActualiserArbre();
 estVierge=true;
 estModifie=false;
 nomFichier="sanstitre";
-setWindowTitle(QString("AlgoBox "ALGOBOXVERSION" : ")+nomFichier);
+setWindowTitle(QString("AlgoBox ")+QString(VERSION_STR)+QString(" : ")+nomFichier);
 ui.EditorView->editor->document()->setModified(false);
 }
 
@@ -4389,6 +4991,17 @@ else
     else code+="2";
     element.setAttribute("repcode",code);
     root.appendChild(element);
+    
+    element=doc.createElement("param");
+    if (arrondiAutoAlgo) element.setAttribute("arrondiAuto","vrai");
+    else element.setAttribute("arrondiAuto","faux");
+    element.setAttribute("maxBoucle",QString::number(maxBoucleAlgo));
+    element.setAttribute("totalBoucles",QString::number(totalBouclesAlgo));
+    element.setAttribute("totalAffichages",QString::number(totalAffichagesAlgo));
+    element.setAttribute("epaisseurLigne",QString::number(epaisseurLigneAlgo));
+    element.setAttribute("epaisseurPoint",QString::number(epaisseurPointAlgo));
+    element.setAttribute("nbDecimales",QString::number(nbDecimalesAlgo));
+    root.appendChild(element);
 
     for (int i = 0; i < nb_branches; i++) ItemVersXml(ui.treeWidget->topLevelItem(i),doc,root);
     QTextStream out (&fichier);
@@ -4399,7 +5012,7 @@ else
     estModifie=false;
     AddRecentFile(nomFichier);
     }
-setWindowTitle(QString("AlgoBox "ALGOBOXVERSION" : ")+nomFichier);
+setWindowTitle(QString("AlgoBox ")+QString(VERSION_STR)+QString(" : ")+nomFichier);
 }
 
 void MainWindow::SauverSousAlgo()
@@ -4423,7 +5036,7 @@ if (!nouveauFichier.isEmpty())
 //     {
 //     QMessageBox::warning( this,QString::fromUtf8("Erreur"),QString::fromUtf8("Impossible d'enregistrer le fichier"));
 //     }
-setWindowTitle(QString("AlgoBox "ALGOBOXVERSION" : ")+nomFichier);
+setWindowTitle(QString("AlgoBox ")+QString(VERSION_STR)+QString(" : ")+nomFichier);
 }
 
 void MainWindow::XmlVersItem(QTreeWidgetItem *parentItem, QDomElement element)
@@ -4438,7 +5051,11 @@ progressCompteur++;
 if (progressDialog) {progressDialog->setValue(progressCompteur);/*qApp->processEvents();*/}
 QTreeWidgetItem *newItem;
 QString texte=element.attribute("algoitem");
-if (texte=="VARIABLES")
+if (texte=="FONCTIONS_UTILISEES")
+    {
+    newItem=fctsItem;
+    }
+else if (texte=="VARIABLES")
     {
     newItem=variablesItem;
     }
@@ -4457,6 +5074,7 @@ else
   newItem->setText(0,element.attribute("algoitem"));
   newItem->setData(0,Qt::UserRole,QString(element.attribute("code")));
   if (newItem->text(0).startsWith("//",Qt::CaseInsensitive)) newItem->setFont(0,commentFont);
+  newItem->setExpanded(true);
   }
 ui.treeWidget->setCurrentItem(newItem);
 //ActualiserArbre();
@@ -4570,6 +5188,18 @@ while (!enfant.isNull())
 		ui.lineEditGradY->setText(parametres.at(5));
 		}
 	    }
+	else if (enfant.hasAttribute("arrondiAuto"))
+        {
+        if (enfant.attribute("arrondiAuto")=="vrai") arrondiAutoAlgo=true;
+        else arrondiAutoAlgo=false;
+        if (enfant.hasAttribute("maxBoucle")) maxBoucleAlgo=enfant.attribute("maxBoucle").toInt();
+        if (enfant.hasAttribute("totalBoucles")) totalBouclesAlgo=enfant.attribute("totalBoucles").toInt();
+        if (enfant.hasAttribute("totalAffichages")) totalAffichagesAlgo=enfant.attribute("totalAffichages").toInt();
+        if (enfant.hasAttribute("epaisseurLigne")) epaisseurLigneAlgo=enfant.attribute("epaisseurLigne").toInt();
+        if (enfant.hasAttribute("epaisseurPoint")) epaisseurPointAlgo=enfant.attribute("epaisseurPoint").toInt();
+        if (enfant.hasAttribute("nbDecimales")) nbDecimalesAlgo=enfant.attribute("nbDecimales").toInt();
+        }
+
 	else 
 	{
 	XmlVersItem(0,enfant);
@@ -4578,8 +5208,9 @@ while (!enfant.isNull())
 	}
 estVierge=false;
 estModifie=false;
-setWindowTitle(QString("AlgoBox "ALGOBOXVERSION" : ")+nomFichier);
+setWindowTitle(QString("AlgoBox ")+QString(VERSION_STR)+QString(" : ")+nomFichier);
 AddRecentFile(nouveauFichier);
+
 if (!courant.isEmpty()) 
     {
     QList<QTreeWidgetItem *> listItems=ui.treeWidget->findItems(courant,Qt::MatchRecursive,0);
@@ -4595,7 +5226,9 @@ if (!modeNormal)
     EffaceArbre();
     }
 QApplication::restoreOverrideCursor();
-	    
+
+
+
 if (avecExtension) 
   {
   QMessageBox::warning( this,"Attention",QString::fromUtf8("Cet algorithme utilise une extension nommée '")+nomExtension+"'\n"+QString::fromUtf8("Cette extension doit-être chargée pour un bon fonctionnement de l'algorithme."));
@@ -4608,7 +5241,7 @@ if (avecExtension)
 	    if (fic.fileName()!=nomExtension) ActualiserStatut();
 	    fichier_extension=nouveauFichier;
 	    annulerExtensionAct->setEnabled(true);
-	    ui.groupBoxArbre->setTitle(QString::fromUtf8("Code de l'algorithme - Extension : ")+fic.fileName());
+	    ui.lineEditExtension->setText(fic.fileName());
 	    }
     }
   else 
@@ -4616,7 +5249,7 @@ if (avecExtension)
     AnnulerExtension();
     }
   }
-	    
+ActualiserTexteParam();	    
 }
 
 void MainWindow::ChargerAlgo()
@@ -4673,7 +5306,7 @@ void MainWindow::ActualiserStatut()
 {
 estVierge=false;
 estModifie=true;
-setWindowTitle(QString("AlgoBox "ALGOBOXVERSION" ")+QString::fromUtf8("[modifié]")+" : "+nomFichier);
+setWindowTitle(QString("AlgoBox ")+QString(VERSION_STR)+QString::fromUtf8(" [modifié]")+" : "+nomFichier);
 }
 
 void MainWindow::NouveauStatut(bool m)
@@ -4683,7 +5316,7 @@ else
   {
 //  estVierge=false;
   estModifie=false;
-  setWindowTitle(QString("AlgoBox "ALGOBOXVERSION" : ")+nomFichier);
+  setWindowTitle(QString("AlgoBox ")+QString(VERSION_STR)+QString(" : ")+nomFichier);
   }
 }
 //************************
@@ -4711,9 +5344,9 @@ if (fic.exists() && fic.isReadable() )
           browserWindow->close();
           }
 	browserWindow=new Browser("file:///"+docfile, 0);
+
 	browserWindow->raise();
 	browserWindow->show();
-	//QDesktopServices::openUrl("file:///"+docfile);
 	}
 else { QMessageBox::warning( this,"Erreur",QString::fromUtf8("Fichier d'aide non trouvé"));}
 }
@@ -4893,37 +5526,80 @@ void MainWindow::ToggleCadrePresentation()
 if (!afficheCadrePresentation)
 	{
 	afficheCadrePresentation=true;
-	ui.groupBoxDescription->show();
+	ui.frameDescription->show();
 	}
 else 
   	{
 	afficheCadrePresentation=false;
-	ui.groupBoxDescription->hide();
+	ui.frameDescription->hide();
 	}
 ToggleAct->setChecked(afficheCadrePresentation);
 }
 
+void MainWindow::ActualiserModeButton()
+{
+if (buttonModeNormal->isChecked())
+	{
+    QString rep_analyse=EditeurVersArbre();
+    if (rep_analyse!="ok")
+        {
+        QMessageBox::warning( this,QString::fromUtf8("Erreur"),QString::fromUtf8("Le code n'est pas valide. Impossible de créer l'arbre de l'algorithme.\nErreur détectée : ")+rep_analyse);
+        modeNormal=false;
+        buttonModeTexte->setChecked(true);
+        actionModeTexte->setChecked(true);
+        return;
+        }
+	modeNormal=true;
+	ui.stackedWidget->setCurrentWidget(ui.page_arbre);
+    ActualiserStatut();
+	}
+else 
+  	{
+	modeNormal=false;
+	ui.stackedWidget->setCurrentWidget(ui.page_editeur);
+    ui.EditorView->editor->setPlainText(ArbreVersCodeTexte());
+    ui.EditorView->editor->document()->setModified(true);
+	}
+if (modeNormal) actionModeNormal->setChecked(true);
+else actionModeTexte->setChecked(true);
+ActualiserArbre();
+}
+
 void MainWindow::ActualiserMode()
 {
 QAction *action = qobject_cast<QAction *>(sender());
 QString choix=action->text();
 int query=1;
-if (!estVierge)
-  {
-  query =QMessageBox::warning(this, "AlgoBox", QString::fromUtf8("Le changement de mode d'édition n'est possible qu'à partir d'un nouvel algorithme vierge."),QString::fromUtf8("Créer un nouvel algorithme vierge"), QString::fromUtf8("Abandonner") );
-  if (query==1) return;
-  NouvelAlgo();
-  }
+// if (!estVierge)
+//   {
+//   query =QMessageBox::warning(this, "AlgoBox", QString::fromUtf8("Le changement de mode d'édition n'est possible qu'à partir d'un nouvel algorithme vierge."),QString::fromUtf8("Créer un nouvel algorithme vierge"), QString::fromUtf8("Abandonner") );
+//   if (query==1) return;
+//   NouvelAlgo();
+//   }
 if (choix=="Mode &normal")
 	{
+    QString rep_analyse=EditeurVersArbre();
+    if (rep_analyse!="ok")
+        {
+        QMessageBox::warning( this,QString::fromUtf8("Erreur"),QString::fromUtf8("Le code n'est pas valide. Impossible de créer l'arbre de l'algorithme.\nErreur détectée : ")+rep_analyse);
+        modeNormal=false;
+        buttonModeTexte->setChecked(true);
+        actionModeTexte->setChecked(true);
+        return;
+        }
 	modeNormal=true;
 	ui.stackedWidget->setCurrentWidget(ui.page_arbre);
+    ActualiserStatut();
 	}
 else 
   	{
 	modeNormal=false;
 	ui.stackedWidget->setCurrentWidget(ui.page_editeur);
+    ui.EditorView->editor->setPlainText(ArbreVersCodeTexte());
+    ui.EditorView->editor->document()->setModified(true);
 	}
+if (modeNormal) buttonModeNormal->setChecked(true);
+else buttonModeTexte->setChecked(true);
 ActualiserArbre();
 }
 //**********************************
@@ -5007,7 +5683,7 @@ QString ligne,nomvariable,type,rang,message,calcul,contenu,x,y,couleur,xdep,ydep
 int i=0;
 QRegExp rxnumline("^([0-9]+)");
 QRegExp rxvar("(.*)\\s+EST_DU_TYPE\\s+(.*)",Qt::CaseInsensitive);
-QRegExp rxfixe("^(VARIABLES|DEBUT_ALGORITHME|FIN_ALGORITHME)",Qt::CaseInsensitive);
+QRegExp rxfixe("^(FONCTIONS_UTILISEES|VARIABLES|DEBUT_ALGORITHME|FIN_ALGORITHME)(?!_)",Qt::CaseInsensitive);
 QRegExp rxpause("^PAUSE",Qt::CaseInsensitive);
 QRegExp rxcommentaire("^//(.*)");
 QRegExp rxlire("^LIRE\\s+(.+)",Qt::CaseInsensitive);
@@ -5036,6 +5712,23 @@ QRegExp rxfinsi("^FIN_SI",Qt::CaseInsensitive);
 QRegExp rxsinon("^SINON",Qt::CaseInsensitive);
 QRegExp rxdebutsinon("^DEBUT_SINON",Qt::CaseInsensitive);
 QRegExp rxfinsinon("^FIN_SINON",Qt::CaseInsensitive);
+
+QRegExp rxdebutvar("^VARIABLES(?!_)",Qt::CaseInsensitive);
+QRegExp rxdebut("^DEBUT_ALGORITHME",Qt::CaseInsensitive);
+QRegExp rxfin("^FIN_ALGORITHME",Qt::CaseInsensitive);
+
+QRegExp rxvarfcts("^VARIABLES_FONCTION",Qt::CaseInsensitive);
+QRegExp rxfonction("^FONCTION\\s+(.*)\\((.*)\\)",Qt::CaseInsensitive);
+QRegExp rxdebutfonction("^DEBUT_FONCTION",Qt::CaseInsensitive);
+QRegExp rxfinfonction("^FIN_FONCTION",Qt::CaseInsensitive);
+QRegExp rxrenvoyer("^RENVOYER\\s+(.*)",Qt::CaseInsensitive);
+QRegExp rxappelfct("^APPELER_FONCTION\\s+(.*)",Qt::CaseInsensitive);
+
+QRegExp rxerreurligne("ligne ([0-9]+)");
+
+QTreeWidgetItem *curItem=0;
+QTreeWidgetItem *newItem=0;
+
 while (!in.atEnd()) 
   {
   ligne=in.readLine();
@@ -5048,6 +5741,21 @@ while (!in.atEnd())
     message_erreur=QString::fromUtf8("Le code contient un champ • non complété")+" (ligne "+QString::number(i)+")";
     break;    
     }
+  else if (/*(rxfixe.indexIn(ligne)<0) &&*/ (!ligne.isEmpty())) 
+    {
+    liste_Lignes.append(ligne);
+    num_Lignes.append(QString::number(i));
+    }
+  }
+int numligne=0;
+while (numligne < liste_Lignes.count() && (rxdebutvar.indexIn(ligne)<0))
+{
+ligne=liste_Lignes.at(numligne);
+numligne++;    
+}
+while (numligne < liste_Lignes.count() && (rxfin.indexIn(ligne)<0))
+{ 
+ligne=liste_Lignes.at(numligne);
   if (rxvar.indexIn(ligne)>-1)
     {
     nomvariable=rxvar.cap(1);
@@ -5065,17 +5773,13 @@ while (!in.atEnd())
 	message_erreur=QString::fromUtf8("Type de variable non reconnu")+" (ligne "+QString::number(i)+")";
 	break;
 	}
-    QTreeWidgetItem *newItem =new QTreeWidgetItem(variablesItem);
+    newItem =new QTreeWidgetItem(variablesItem);
     newItem->setText(0,nomvariable+" EST_DU_TYPE "+type);
     code="1#"+type+"#"+nomvariable;
     newItem->setData(0,Qt::UserRole,QString(code));
     }
-  else if ((rxfixe.indexIn(ligne)<0) && (!ligne.isEmpty())) 
-    {
-    liste_Lignes.append(ligne);
-    num_Lignes.append(QString::number(i));
-    }
-  }
+numligne++;
+}
 if (erreur)
   {
   EffaceArbre();
@@ -5083,15 +5787,52 @@ if (erreur)
   return message_erreur;
   }
 ActualiserVariables();
-ui.treeWidget->setCurrentItem(debutItem);
-QTreeWidgetItem *curItem = ui.treeWidget->currentItem();
-QTreeWidgetItem *newItem;
+/*****************************************/
+
+numligne=0;
 QFont commentFont = qApp->font();
-commentFont.setItalic(true);
-for (int numligne = 0; numligne < liste_Lignes.count(); numligne++)
-  {
-  ligne=liste_Lignes.at(numligne);
-  if (rxpause.indexIn(ligne)>-1) //PAUSE
+commentFont.setItalic(true);  
+
+ui.treeWidget->setCurrentItem(fctsItem);
+curItem = ui.treeWidget->currentItem();  
+
+QTreeWidgetItem *curFonctionItem=0;
+while (numligne < liste_Lignes.count() && (rxdebutvar.indexIn(ligne)<0))
+{
+ligne=liste_Lignes.at(numligne);
+if ((rxfixe.indexIn(ligne)<0))
+{
+  if (rxvar.indexIn(ligne)>-1)
+    {
+    nomvariable=rxvar.cap(1);
+    type=rxvar.cap(2);
+    nomvariable=FiltreNomVariable(nomvariable);
+    if (NomInterdit(nomvariable))
+	{
+	erreur=true;
+	message_erreur=QString::fromUtf8("Nom de variable interdit")+" (ligne "+QString::number(i)+")";
+	break;
+	}
+    if ((type!="NOMBRE") && (type!="CHAINE") && (type!="LISTE"))
+	{
+	erreur=true;
+	message_erreur=QString::fromUtf8("Type de variable non reconnu")+" (ligne "+QString::number(i)+")";
+	break;
+	}
+    curItem = ui.treeWidget->currentItem();
+    if (curItem && curItem->parent())
+      {
+      newItem = new QTreeWidgetItem(curItem);
+      newItem->setText(0,nomvariable+" EST_DU_TYPE "+type);
+      code="1#"+type+"#"+nomvariable;
+      newItem->setData(0,Qt::UserRole,QString(code));
+    ui.treeWidget->setItemExpanded (curItem,true);
+      ui.treeWidget->setCurrentItem(newItem);
+      ActualiserVariables();
+      ActualiserArbre();
+      }	
+    }
+  else if (rxpause.indexIn(ligne)>-1) //PAUSE
     {
     NouvelleLigne(ui.treeWidget->currentItem());
     curItem = ui.treeWidget->currentItem();
@@ -5104,6 +5845,20 @@ for (int numligne = 0; numligne < liste_Lignes.count(); numligne++)
       ActualiserArbre();
       }
     }
+  else if (rxvarfcts.indexIn(ligne)>-1) //VARIABLES_FONCTION
+    {
+    
+    curItem = ui.treeWidget->currentItem();
+    if (curItem && curItem->parent())
+      {
+      newItem = new QTreeWidgetItem(curItem);
+      code="202#declarationsvariablesfonction";
+      newItem->setText(0,QString::fromUtf8("VARIABLES_FONCTION"));
+      newItem->setData(0,Qt::UserRole,QString(code));
+      ui.treeWidget->setCurrentItem(newItem);
+      ActualiserArbre();
+      }
+    }
     else if (rxcommentaire.indexIn(ligne)>-1) //COMMENTAIRE
       {
       NouvelleLigne(ui.treeWidget->currentItem());
@@ -5123,6 +5878,42 @@ for (int numligne = 0; numligne < liste_Lignes.count(); numligne++)
 	  }
 	}  
       }
+    else if (rxrenvoyer.indexIn(ligne)>-1) //RENVOYER
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	QString retour=rxrenvoyer.cap(1);
+	retour.remove("#");
+	if (!retour.isEmpty())
+	  {
+	  curItem->setText(0,"RENVOYER "+retour);
+	  code="205#"+retour;
+	  curItem->setData(0,Qt::UserRole,QString(code));
+	  ui.treeWidget->setCurrentItem(curItem);
+	  ActualiserArbre();
+	  }
+	}  
+      }
+    else if (rxappelfct.indexIn(ligne)>-1) //APPELER_FONCTION
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	QString fct=rxappelfct.cap(1);
+	fct.remove("#");
+	if (!fct.isEmpty())
+	  {
+	  curItem->setText(0,"APPELER_FONCTION "+fct);
+	  code="206#"+fct;
+	  curItem->setData(0,Qt::UserRole,QString(code));
+	  ui.treeWidget->setCurrentItem(curItem);
+	  ActualiserArbre();
+	  }
+	}  
+      }      
     else if (rxlire.indexIn(ligne)>-1) //LIRE
       {
       NouvelleLigne(ui.treeWidget->currentItem());
@@ -5418,7 +6209,7 @@ for (int numligne = 0; numligne < liste_Lignes.count(); numligne++)
       NouvelleLigne(ui.treeWidget->currentItem());
       curItem = ui.treeWidget->currentItem();
       if (curItem && curItem->parent())
-	{   
+	{
 	if (ListeNomsVariables.isEmpty())
 	    {
 	    erreur=true;
@@ -5462,6 +6253,7 @@ for (int numligne = 0; numligne < liste_Lignes.count(); numligne++)
 		    message_erreur=QString::fromUtf8("Variable non déclarée.")+" (ligne "+num_Lignes.at(numligne)+")";
 		    break;
 		    }
+		                 
 		ui.treeWidget->setCurrentItem(curItem);
 		ActualiserArbre();
 		}
@@ -5814,22 +6606,858 @@ for (int numligne = 0; numligne < liste_Lignes.count(); numligne++)
 	ActualiserArbre();
 	}
       }
-    else
+else if (rxfonction.indexIn(ligne)>-1) //FONCTION
       {
-      erreur=true;
-      message_erreur=QString::fromUtf8("Instruction non reconnue")+" (ligne "+num_Lignes.at(numligne)+")";
-      break;      
-      }
-  }
-QRegExp rxerreurligne("ligne ([0-9]+)");
-int erreurligne=1;
-if (erreur)
-  {
-  EffaceArbre();
-  if (rxerreurligne.indexIn(message_erreur)>-1) erreurligne=rxerreurligne.cap(1).toInt();
-  ui.EditorView->editor->setCursorPosition(erreurligne-1 , 0);
-  }
-return message_erreur;
+    QString nomfct=rxfonction.cap(1);
+    QString paramfct=rxfonction.cap(2);
+	if (!nomfct.isEmpty())
+	    {
+        if (paramfct.isEmpty()) paramfct=QString(" ");
+        newItem =new QTreeWidgetItem(fctsItem);
+        newItem->setText(0,QString::fromUtf8("FONCTION ")+nomfct+"("+paramfct+")");
+	    code="201#"+nomfct+"#"+paramfct;
+	    newItem->setData(0,Qt::UserRole,QString(code));
+	    ui.treeWidget->setCurrentItem(newItem);
+        curFonctionItem=newItem;
+//        ui.treeWidget->setItemExpanded (newItem,true);
+	    ActualiserArbre();
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Déclaration de fonction incomplète")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+    else if (rxdebutfonction.indexIn(ligne)>-1) //DEBUT_FONCTION
+      {
+      if (curFonctionItem)
+        {
+        newItem =new QTreeWidgetItem(curFonctionItem);
+        newItem->setText(0,QString::fromUtf8("DEBUT_FONCTION"));
+        newItem->setData(0,Qt::UserRole,QString("203#debutfonction"));
+        ui.treeWidget->setCurrentItem(newItem);
+        ui.treeWidget->setItemExpanded (curFonctionItem,true);
+        ActualiserArbre();
+        }
+      else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Pas de fonction correspondante")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+      }
+    else if (rxfinfonction.indexIn(ligne)>-1) //FIN_FONCTION
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+        {
+        curItem->setText(0,QString::fromUtf8("FIN_FONCTION"));
+        curItem->setData(0,Qt::UserRole,QString("204#finfonction"));
+        ActualiserArbre();
+        }
+      }
+
+    else
+      {
+      erreur=true;
+      message_erreur=QString::fromUtf8("Instruction non reconnue")+" (ligne "+num_Lignes.at(numligne)+")";
+      break;      
+      }        
+}
+numligne++;
+}
+/*****************************************/
+ui.treeWidget->setCurrentItem(debutItem);
+curItem = ui.treeWidget->currentItem();
+
+while (numligne < liste_Lignes.count() && (rxdebut.indexIn(ligne)<0))
+{
+ligne=liste_Lignes.at(numligne);
+numligne++;    
+}
+while (numligne < liste_Lignes.count() && (rxfin.indexIn(ligne)<0))
+{ 
+ligne=liste_Lignes.at(numligne);
+if ((rxfixe.indexIn(ligne)<0) /*&& (rxvar.indexIn(ligne)<0)*/ )
+{
+  if (rxpause.indexIn(ligne)>-1) //PAUSE
+    {
+    NouvelleLigne(ui.treeWidget->currentItem());
+    curItem = ui.treeWidget->currentItem();
+    if (curItem && curItem->parent())
+      {
+      code="18#pause";
+      curItem->setText(0,QString::fromUtf8("PAUSE"));
+      curItem->setData(0,Qt::UserRole,QString(code));
+      ui.treeWidget->setCurrentItem(curItem);
+      ActualiserArbre();
+      }
+    }
+  else if (rxvarfcts.indexIn(ligne)>-1) //PAUSE
+    {
+    NouvelleLigne(ui.treeWidget->currentItem());
+    curItem = ui.treeWidget->currentItem();
+    if (curItem && curItem->parent())
+      {
+      code="202#declarationsvariablesfonction";
+      curItem->setText(0,QString::fromUtf8("VARIABLES_FONCTION"));
+      curItem->setData(0,Qt::UserRole,QString(code));
+      ui.treeWidget->setCurrentItem(curItem);
+      ActualiserArbre();
+      }
+    }
+    else if (rxcommentaire.indexIn(ligne)>-1) //COMMENTAIRE
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	QString commentaire=rxcommentaire.cap(1);
+	commentaire.remove("#");
+	if (!commentaire.isEmpty())
+	  {
+	  curItem->setText(0,"//"+commentaire);
+	  code="19#"+commentaire;
+	  curItem->setData(0,Qt::UserRole,QString(code));
+	  curItem->setFont(0,commentFont);
+	  ui.treeWidget->setCurrentItem(curItem);
+	  ActualiserArbre();
+	  }
+	}  
+      }
+    else if (rxappelfct.indexIn(ligne)>-1) //APPELER_FONCTION
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	QString fct=rxappelfct.cap(1);
+	fct.remove("#");
+	if (!fct.isEmpty())
+	  {
+	  curItem->setText(0,"APPELER_FONCTION "+fct);
+	  code="206#"+fct;
+	  curItem->setData(0,Qt::UserRole,QString(code));
+	  ui.treeWidget->setCurrentItem(curItem);
+	  ActualiserArbre();
+	  }
+	}  
+      }      
+    else if (rxlire.indexIn(ligne)>-1) //LIRE
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	nomvariable=rxlire.cap(1);
+	rang="";
+	if (rxliste.indexIn(nomvariable)>-1) 
+	  {
+	  rang=rxliste.cap(1);
+	  nomvariable.remove(rxliste);
+	  }
+	if (!nomvariable.isEmpty())
+	    {
+	    i=ListeNomsVariables.indexOf(nomvariable);
+	    if (i>-1)
+		{
+		type=ListeTypesVariables.at(i);
+		if ((type=="LISTE") && (!rang.isEmpty())) 
+		    {
+		    curItem->setText(0,QString::fromUtf8("LIRE ")+nomvariable+"["+rang+"]");
+		    code="2#"+nomvariable+"#"+rang;
+		    }
+		else 
+		    {
+		    curItem->setText(0,QString::fromUtf8("LIRE ")+nomvariable);
+		    code="2#"+nomvariable+"#pasliste";
+		    }
+		curItem->setData(0,Qt::UserRole,QString(code));
+		}
+	    else
+		{
+		erreur=true;
+		message_erreur=QString::fromUtf8("Variable non déclarée.")+" (ligne "+num_Lignes.at(numligne)+")";
+		break;
+		}
+	    ui.treeWidget->setCurrentItem(curItem);
+	    ActualiserArbre();
+	    }
+	  else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Nom de variable non reconnu.")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+      }
+    else if (rxaffichcalculnl.indexIn(ligne)>-1) //AFFICHER CALCUL NL
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{      
+	calcul=rxaffichcalculnl.cap(1);
+	calcul.remove("#");
+	//calcul.remove("\"");
+	code="";
+	if (!calcul.isEmpty())
+	    {
+		    curItem->setText(0,QString::fromUtf8("AFFICHERCALCUL ")+calcul);
+		    code="20#"+calcul+"#1";
+		    curItem->setData(0,Qt::UserRole,QString(code));
+		    ui.treeWidget->setCurrentItem(curItem);
+		    ActualiserArbre();
+	    }
+	else
+	    {
+ 	    erreur=true;
+ 	    message_erreur=QString::fromUtf8("Calcul vide.")+" (ligne "+num_Lignes.at(numligne)+")";
+ 	    break;
+	    }      
+      
+      
+// 	message.remove("#");
+// 	message.remove("\"");
+// 	code="";
+// 	if (!message.isEmpty())
+// 	    {
+// 	    curItem->setText(0,QString::fromUtf8("AFFICHER \"")+message+"\"");
+// 	    code="4#"+message+"#1";
+// 	    curItem->setData(0,Qt::UserRole,QString(code));
+// 	    ui.treeWidget->setCurrentItem(curItem);
+// 	    ActualiserArbre();
+// 	    }
+// 	else
+// 	    {
+// 	    erreur=true;
+// 	    message_erreur=QString::fromUtf8("Message vide.")+" (ligne "+num_Lignes.at(numligne)+")";
+// 	    break;
+// 	    }
+	}
+      }	  
+    else if (rxaffichcalcul.indexIn(ligne)>-1) //AFFICHER CALCUL
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	calcul=rxaffichcalcul.cap(1);
+
+	calcul.remove("#");
+	//calcul.remove("\"");
+	code="";
+	if (!calcul.isEmpty())
+	  {
+		  curItem->setText(0,QString::fromUtf8("AFFICHERCALCUL ")+calcul);
+		  code="20#"+calcul+"#0";
+		  curItem->setData(0,Qt::UserRole,QString(code));
+		  ui.treeWidget->setCurrentItem(curItem);
+		  ActualiserArbre();
+	  }
+	else
+	  {
+ 	    erreur=true;
+ 	    message_erreur=QString::fromUtf8("Calcul vide.")+" (ligne "+num_Lignes.at(numligne)+")";
+ 	    break;
+	  }      
+// 	message=rxaffichmessage.cap(1);
+// 	message.remove("#");
+// 	message.remove("\"");
+// 	code="";
+// 	if (!message.isEmpty())
+// 	    {
+// 	    curItem->setText(0,QString::fromUtf8("AFFICHER \"")+message+"\"");
+// 	    code="4#"+message+"#0";
+// 	    curItem->setData(0,Qt::UserRole,QString(code));
+// 	    ui.treeWidget->setCurrentItem(curItem);
+// 	    ActualiserArbre();
+// 	    }
+// 	else
+// 	    {
+// 	    erreur=true;
+// 	    message_erreur=QString::fromUtf8("Message vide.")+" (ligne "+num_Lignes.at(numligne)+")";
+// 	    break;
+// 	    }
+	}
+      }
+    else if (rxaffichmessagenl.indexIn(ligne)>-1) //AFFICHER MESSAGE NL
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{      
+	message=rxaffichmessagenl.cap(1);
+	message.remove("#");
+	message.remove("\"");
+	code="";
+	if (!message.isEmpty())
+	    {
+	    curItem->setText(0,QString::fromUtf8("AFFICHER \"")+message+"\"");
+	    code="4#"+message+"#1";
+	    curItem->setData(0,Qt::UserRole,QString(code));
+	    ui.treeWidget->setCurrentItem(curItem);
+	    ActualiserArbre();
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Message vide.")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+      }	  
+    else if (rxaffichmessage.indexIn(ligne)>-1) //AFFICHER MESSAGE
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{      
+	message=rxaffichmessage.cap(1);
+	message.remove("#");
+	message.remove("\"");
+	code="";
+	if (!message.isEmpty())
+	    {
+	    curItem->setText(0,QString::fromUtf8("AFFICHER \"")+message+"\"");
+	    code="4#"+message+"#0";
+	    curItem->setData(0,Qt::UserRole,QString(code));
+	    ui.treeWidget->setCurrentItem(curItem);
+	    ActualiserArbre();
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Message vide.")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+      }
+    else if (rxaffichvariablenl.indexIn(ligne)>-1) //AFFICHER VARIABLE NL
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{      
+	nomvariable=rxaffichvariablenl.cap(1);
+	rang="";
+	if (rxliste.indexIn(nomvariable)>-1) 
+	  {
+	  rang=rxliste.cap(1);
+	  nomvariable.remove(rxliste);
+	  }
+	code="";
+	if (!nomvariable.isEmpty())
+	    {
+	    i=ListeNomsVariables.indexOf(nomvariable);
+	    if (i>-1)
+		{
+		QString type=ListeTypesVariables.at(i);
+		code="3#"+nomvariable+"#1";
+		if ((type=="LISTE") && (!rang.isEmpty())) 
+		    {
+		    curItem->setText(0,QString::fromUtf8("AFFICHER ")+nomvariable+"["+rang+"]");
+		    code+="#"+rang;
+		    }
+		else 
+		    {
+		    curItem->setText(0,QString::fromUtf8("AFFICHER ")+nomvariable);
+		    code+="#pasliste";
+		    }
+		curItem->setData(0,Qt::UserRole,QString(code));
+		}
+	    else
+		{
+		erreur=true;
+		message_erreur=QString::fromUtf8("Variable non déclarée.")+" (ligne "+num_Lignes.at(numligne)+")";
+		break;
+		}
+	    ui.treeWidget->setCurrentItem(curItem);
+	    ActualiserArbre();
+	    }
+	  else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Nom de variable non reconnu.")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+      }	  
+    else if (rxaffichvariable.indexIn(ligne)>-1) //AFFICHER VARIABLE
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{      
+	nomvariable=rxaffichvariable.cap(1);
+	rang="";
+	if (rxliste.indexIn(nomvariable)>-1) 
+	  {
+	  rang=rxliste.cap(1);
+	  nomvariable.remove(rxliste);
+	  }
+	code="";
+	if (!nomvariable.isEmpty())
+	    {
+	    i=ListeNomsVariables.indexOf(nomvariable);
+	    if (i>-1)
+		{
+		QString type=ListeTypesVariables.at(i);
+		code="3#"+nomvariable+"#0";
+		if ((type=="LISTE") && (!rang.isEmpty())) 
+		    {
+		    curItem->setText(0,QString::fromUtf8("AFFICHER ")+nomvariable+"["+rang+"]");
+		    code+="#"+rang;
+		    }
+		else 
+		    {
+		    curItem->setText(0,QString::fromUtf8("AFFICHER ")+nomvariable);
+		    code+="#pasliste";
+		    }
+		curItem->setData(0,Qt::UserRole,QString(code));
+		}
+	    else
+		{
+		erreur=true;
+		message_erreur=QString::fromUtf8("Variable non déclarée.")+" (ligne "+num_Lignes.at(numligne)+")";
+		break;
+		}
+	    ui.treeWidget->setCurrentItem(curItem);
+	    ActualiserArbre();
+	    }
+	  else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Nom de variable non reconnu.")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+      }	  
+    else if (rxaffectation.indexIn(ligne)>-1) //AFFECTATION
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{   
+	if (ListeNomsVariables.isEmpty())
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Aucune variable n'a encore été définie.")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	nomvariable=rxaffectation.cap(1);
+	contenu=rxaffectation.cap(2);
+	rang="";
+	if (rxliste.indexIn(nomvariable)>-1) 
+	  {
+	  rang=rxliste.cap(1);
+	  nomvariable.remove(rxliste);
+	  }
+	contenu.remove("#");
+	code="";
+	if (!nomvariable.isEmpty())
+	    {
+	    if (!contenu.isEmpty())
+		{
+		i=ListeNomsVariables.indexOf(nomvariable);
+		if (i>-1)
+		    {
+		    type=ListeTypesVariables.at(i);
+		    code="5#"+nomvariable+"#"+contenu;
+		    if ((type=="LISTE") && (!rang.isEmpty())) 
+			{
+			curItem->setText(0,nomvariable+"["+rang+"]"+QString::fromUtf8(" PREND_LA_VALEUR ")+contenu);
+			code+="#"+rang;
+			}
+		    else 
+			{
+			curItem->setText(0,nomvariable+QString::fromUtf8(" PREND_LA_VALEUR ")+contenu);
+			code+="#pasliste";
+			}
+		    curItem->setData(0,Qt::UserRole,QString(code));
+		    }
+		else
+		    {
+		    erreur=true;
+		    message_erreur=QString::fromUtf8("Variable non déclarée.")+" (ligne "+num_Lignes.at(numligne)+")";
+		    break;
+		    }
+		ui.treeWidget->setCurrentItem(curItem);
+		ActualiserArbre();
+		}
+	    else
+		{
+		erreur=true;
+		message_erreur=QString::fromUtf8("Affectation vide")+" (ligne "+num_Lignes.at(numligne)+")";
+		break;
+		}
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Pas de variable définie")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }	  
+	}
+      }
+    else if (rxpointcouleur.indexIn(ligne)>-1) //POINT COULEUR
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	couleur=rxpointcouleur.cap(1);
+	x=rxpointcouleur.cap(2);
+	y=rxpointcouleur.cap(3);
+	couleur.remove("#");
+	x.remove("#");
+	y.remove("#");
+	if ((!x.isEmpty()) && (!y.isEmpty()))
+	    {
+	    curItem->setText(0,QString::fromUtf8("TRACER_POINT (")+x+","+y+")");
+	    code="50#"+x+"#"+y+"#"+couleur;
+	    curItem->setData(0,Qt::UserRole,QString(code));
+	    ui.treeWidget->setCurrentItem(curItem);
+	    ActualiserArbre();
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Au moins une des coordonnées n'est pas définie")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+      }
+    else if (rxpoint.indexIn(ligne)>-1) //POINT
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{   
+	x=rxpoint.cap(1);
+	y=rxpoint.cap(2);
+	couleur="Rouge"; 
+	x.remove("#");
+	y.remove("#");
+	if ((!x.isEmpty()) && (!y.isEmpty()))
+	    {
+	    curItem->setText(0,QString::fromUtf8("TRACER_POINT (")+x+","+y+")");
+	    code="50#"+x+"#"+y+"#"+couleur;
+	    curItem->setData(0,Qt::UserRole,QString(code));
+	    ui.treeWidget->setCurrentItem(curItem);
+	    ActualiserArbre();
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Au moins une des coordonnées n'est pas définie")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+      }
+    else if (rxsegmentcouleur.indexIn(ligne)>-1) //SEGMENT COULEUR
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	couleur=rxsegmentcouleur.cap(1);
+	xdep=rxsegmentcouleur.cap(2);
+	ydep=rxsegmentcouleur.cap(3);
+	xfin=rxsegmentcouleur.cap(4);
+	yfin=rxsegmentcouleur.cap(5);
+	couleur.remove("#");
+	xdep.remove("#");
+	ydep.remove("#");
+	xfin.remove("#");
+	yfin.remove("#");
+	if ((!xdep.isEmpty()) && (!ydep.isEmpty()) && (!xfin.isEmpty()) && (!yfin.isEmpty()))
+	    {
+	    curItem->setText(0,QString::fromUtf8("TRACER_SEGMENT (")+xdep+","+ydep+")->("+xfin+","+yfin+")");
+	    code="51#"+xdep+"#"+ydep+"#"+xfin+"#"+yfin+"#"+couleur;
+	    curItem->setData(0,Qt::UserRole,QString(code));
+	    ui.treeWidget->setCurrentItem(curItem);
+	    ActualiserArbre();
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Au moins une des coordonnées n'est pas définie")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }      
+	}
+      }
+    else if (rxsegment.indexIn(ligne)>-1) //SEGMENT
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{         
+	xdep=rxsegment.cap(1);
+	ydep=rxsegment.cap(2);
+	xfin=rxsegment.cap(3);
+	yfin=rxsegment.cap(4);
+	couleur="Rouge"; 
+	xdep.remove("#");
+	ydep.remove("#");
+	xfin.remove("#");
+	yfin.remove("#");
+	if ((!xdep.isEmpty()) && (!ydep.isEmpty()) && (!xfin.isEmpty()) && (!yfin.isEmpty()))
+	    {
+	    curItem->setText(0,QString::fromUtf8("TRACER_SEGMENT (")+xdep+","+ydep+")->("+xfin+","+yfin+")");
+	    code="51#"+xdep+"#"+ydep+"#"+xfin+"#"+yfin+"#"+couleur;
+	    curItem->setData(0,Qt::UserRole,QString(code));
+	    ui.treeWidget->setCurrentItem(curItem);
+	    ActualiserArbre();
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Au moins une des coordonnées n'est pas définie")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }      
+	}
+      }
+  else if (rxeffacer.indexIn(ligne)>-1) //EFFACER
+    {
+    NouvelleLigne(ui.treeWidget->currentItem());
+    curItem = ui.treeWidget->currentItem();
+    if (curItem && curItem->parent())
+      {
+      code="52#effacer";
+      curItem->setText(0,QString::fromUtf8("EFFACER_GRAPHIQUE"));
+      curItem->setData(0,Qt::UserRole,QString(code));
+      ui.treeWidget->setCurrentItem(curItem);
+      ActualiserArbre();
+      }
+    }
+    else if (rxtantque.indexIn(ligne)>-1) //TANT_QUE
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	condition=rxtantque.cap(1);
+	condition.remove("#");
+	code="";
+	if (!condition.isEmpty())
+	    {
+	    curItem->setText(0,QString::fromUtf8("TANT_QUE (")+condition+") "+QString::fromUtf8("FAIRE"));
+	    code="15#"+condition;
+	    curItem->setData(0,Qt::UserRole,QString(code));
+	    ActualiserArbre();
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Pas de condition définie")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+      }
+    else if (rxdebuttantque.indexIn(ligne)>-1) //DEBUT_TANT_QUE
+      {
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	newItem = new QTreeWidgetItem(curItem);
+	newItem->setText(0,QString::fromUtf8("DEBUT_TANT_QUE"));
+	newItem->setData(0,Qt::UserRole,QString("16#debuttantque"));
+	ui.treeWidget->setItemExpanded (curItem,true);
+	ui.treeWidget->setCurrentItem(newItem);
+	ActualiserArbre();
+	}
+      }
+    else if (rxfintantque.indexIn(ligne)>-1) //FIN_TANT_QUE
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	    curItem->setText(0,QString::fromUtf8("FIN_TANT_QUE"));
+	    curItem->setData(0,Qt::UserRole,QString("17#fintantque"));
+	    ActualiserArbre();
+	}
+      }
+    else if (rxpour.indexIn(ligne)>-1) //POUR
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	nomvariable=rxpour.cap(1);
+	debut=rxpour.cap(2);
+	debut.remove("#");
+	fin=rxpour.cap(3);
+	fin.remove("#");
+	code="";
+	if (!nomvariable.isEmpty())
+	    {
+	    if (!debut.isEmpty() && !fin.isEmpty())
+		{
+		i=ListeNomsVariables.indexOf(nomvariable);
+		if (i>-1)
+		    {
+		    curItem->setText(0,QString::fromUtf8("POUR ")+nomvariable+" ALLANT_DE "+debut+ " A "+fin);
+		    code="12#"+nomvariable+"#"+debut+"#"+fin;
+		    curItem->setData(0,Qt::UserRole,QString(code));
+		    }
+		else
+		    {
+		    erreur=true;
+		    message_erreur=QString::fromUtf8("Variable non déclarée.")+" (ligne "+num_Lignes.at(numligne)+")";
+		    break;
+		    }
+		ActualiserArbre();
+		}
+	    else
+		{
+		erreur=true;
+		message_erreur=QString::fromUtf8("Les valeurs minimales et maximales du compteur ne sont pas définies")+" (ligne "+num_Lignes.at(numligne)+")";
+		break;
+		}
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Pas de variable définie")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+      }
+    else if (rxdebutpour.indexIn(ligne)>-1) //DEBUT_POUR
+      {
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	newItem = new QTreeWidgetItem(curItem);
+	newItem->setText(0,QString::fromUtf8("DEBUT_POUR"));
+	newItem->setData(0,Qt::UserRole,QString("13#debutpour"));
+	ui.treeWidget->setItemExpanded (curItem,true);
+	ui.treeWidget->setCurrentItem(newItem);
+	ActualiserArbre();
+	}
+      }
+    else if (rxfinpour.indexIn(ligne)>-1) //FIN_POUR
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	    curItem->setText(0,QString::fromUtf8("FIN_POUR"));
+	    curItem->setData(0,Qt::UserRole,QString("14#finpour"));
+	    ActualiserArbre();
+	}
+      }
+    else if (rxsinon.indexIn(ligne)>-1) //SINON
+      {
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	  newItem = new QTreeWidgetItem(curItem->parent(), curItem);
+	  newItem->setText(0,QString::fromUtf8("SINON"));
+	  code="9#sinon";
+	  newItem->setData(0,Qt::UserRole,QString(code));
+	  ui.treeWidget->setCurrentItem(newItem);
+	  ActualiserArbre();
+	}
+      }
+    else if (rxdebutsinon.indexIn(ligne)>-1) //DEBUT_SINON
+      {
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	newItem = new QTreeWidgetItem(curItem);
+	newItem->setText(0,QString::fromUtf8("DEBUT_SINON"));
+	newItem->setData(0,Qt::UserRole,QString("10#debutsinon"));
+	ui.treeWidget->setItemExpanded (curItem,true);
+	ui.treeWidget->setCurrentItem(newItem);
+	ActualiserArbre();
+	}
+      }
+    else if (rxfinsinon.indexIn(ligne)>-1) //FIN_SINON
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	curItem->setText(0,QString::fromUtf8("FIN_SINON"));
+	curItem->setData(0,Qt::UserRole,QString("11#finsinon"));
+	ActualiserArbre();
+	}
+      }      
+    else if (rxsi.indexIn(ligne)>-1) //SI
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	condition=rxsi.cap(1);
+	condition.remove("#");
+	code="";
+	if (!condition.isEmpty())
+	    {
+	    curItem->setText(0,QString::fromUtf8("SI (")+condition+") "+QString::fromUtf8("ALORS"));
+	    code="6#"+condition;
+	    curItem->setData(0,Qt::UserRole,QString(code));
+	    ActualiserArbre();
+	    }
+	else
+	    {
+	    erreur=true;
+	    message_erreur=QString::fromUtf8("Pas de condition définie")+" (ligne "+num_Lignes.at(numligne)+")";
+	    break;
+	    }
+	}
+      }
+    else if (rxdebutsi.indexIn(ligne)>-1) //DEBUT_SI
+      {
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	newItem = new QTreeWidgetItem(curItem);
+	newItem->setText(0,QString::fromUtf8("DEBUT_SI"));
+	newItem->setData(0,Qt::UserRole,QString("7#debutsi"));
+	ui.treeWidget->setItemExpanded (curItem,true);
+	ui.treeWidget->setCurrentItem(newItem);
+	ActualiserArbre();
+	}
+      }
+    else if (rxfinsi.indexIn(ligne)>-1) //FIN_SI
+      {
+      NouvelleLigne(ui.treeWidget->currentItem());
+      curItem = ui.treeWidget->currentItem();
+      if (curItem && curItem->parent())
+	{
+	curItem->setText(0,QString::fromUtf8("FIN_SI"));
+	curItem->setData(0,Qt::UserRole,QString("8#finsi"));
+	ActualiserArbre();
+	}
+      }
+
+    else
+      {
+      erreur=true;
+      message_erreur=QString::fromUtf8("Instruction non reconnue")+" (ligne "+num_Lignes.at(numligne)+")";
+      break;      
+      }    
+}
+numligne++;
+}
+/*****************************************/
+
+
+
+int erreurligne=1;
+if (erreur)
+  {
+  EffaceArbre();
+  if (rxerreurligne.indexIn(message_erreur)>-1) erreurligne=rxerreurligne.cap(1).toInt();
+  ui.EditorView->editor->setCursorPosition(erreurligne-1 , 0);
+  }
+return message_erreur;
 }
 
 QString MainWindow::ArbreVersCodeTexte()
@@ -5994,7 +7622,7 @@ if (!nouveauFichier.isEmpty())
 	  if (nouveauFichier!=fichier_extension) ActualiserStatut();
 	  fichier_extension=nouveauFichier;
 	  annulerExtensionAct->setEnabled(true);
-	  ui.groupBoxArbre->setTitle(QString::fromUtf8("Code de l'algorithme - Extension : ")+fic.fileName());
+	  ui.lineEditExtension->setText(fic.fileName());
 	  }
   }
 else 
@@ -6007,7 +7635,7 @@ void MainWindow::AnnulerExtension()
 {
   fichier_extension="";
   annulerExtensionAct->setEnabled(false);
-  ui.groupBoxArbre->setTitle(QString::fromUtf8("Code de l'algorithme"));
+  ui.lineEditExtension->setText("");
   ActualiserStatut();
 }
 
@@ -6021,17 +7649,19 @@ jseditWindow->show();
 /**************************************************/
 QString MainWindow::highlightHtmlLine(const QString &text)
 {
-QString SpanComment, SpanBloc, SpanCommande, SpanSi, SpanTantQue, SpanPour, SpanFin;
-QStringList BlocWords,SiWords,TantQueWords,PourWords, CommandeWords;
+QString SpanComment, SpanBloc, SpanCommande, SpanSi, SpanTantQue, SpanPour, SpanFin, SpanFonction;
+QStringList BlocWords,SiWords,TantQueWords,PourWords, CommandeWords, FonctionWords;
 SpanComment = "<span style=\"color:#000000;\">";
 SpanBloc="<span style=\"color:#800000;font-weight:bold;\">";
 SpanCommande="<span style=\"color:#0000CC;\">";
 SpanSi="<span style=\"color:#800080;font-weight:bold;\">";
-SpanTantQue="<span style=\"color:#DD6F06;font-weight:bold;\">";QString("#DD6F06");
-SpanPour="<span style=\"color:#BB8800;font-weight:bold;\">";QString("#BB8800");
+SpanTantQue="<span style=\"color:#DD6F06;font-weight:bold;\">";
+SpanPour="<span style=\"color:#BB8800;font-weight:bold;\">";
 SpanFin="</span>";
+SpanFonction="<span style=\"color:#9A4D00;font-weight:bold;\">";
+FonctionWords=QString("\\bFONCTION\\b,\\bFONCTIONS_UTILISEES\\b,\\bDEBUT_FONCTION\\b,\\bFIN_FONCTION\\b,\\bVARIABLES_FONCTION\\b").split(",");
 BlocWords= QString("\\bVARIABLES\\b,\\bDEBUT_ALGORITHME\\b,\\bFIN_ALGORITHME\\b").split(",");
-CommandeWords= QString("\\bEST_DU_TYPE\\b,\\bPAUSE\\b,\\bLIRE\\b,\\bAFFICHERCALCUL\\b,\\bAFFICHER\\b,\\bPREND_LA_VALEUR\\b,\\bTRACER_POINT\\b,\\bTRACER_POINT_Rouge\\b,\\bTRACER_POINT_Vert\\b,\\bTRACER_POINT_Bleu\\b,\\bTRACER_POINT_Blanc\\b,\\bTRACER_SEGMENT\\b,\\bTRACER_SEGMENT_Rouge\\b,\\bTRACER_SEGMENT_Vert\\b,\\bTRACER_SEGMENT_Bleu\\b,\\bTRACER_SEGMENT_Blanc\\b").split(",");
+CommandeWords= QString("\\bEST_DU_TYPE\\b,\\bPAUSE\\b,\\bLIRE\\b,\\bAFFICHERCALCUL\\b,\\bAFFICHER\\b,\\bPREND_LA_VALEUR\\b,\\bTRACER_POINT\\b,\\bTRACER_POINT_Rouge\\b,\\bTRACER_POINT_Vert\\b,\\bTRACER_POINT_Bleu\\b,\\bTRACER_POINT_Blanc\\b,\\bTRACER_SEGMENT\\b,\\bTRACER_SEGMENT_Rouge\\b,\\bTRACER_SEGMENT_Vert\\b,\\bTRACER_SEGMENT_Bleu\\b,\\bTRACER_SEGMENT_Blanc\\b,\\bRENVOYER\\b,\\bAPPELER_FONCTION\\b").split(",");
 SiWords=QString("\\bSI\\b,\\bALORS\\b,\\bSINON\\b,\\bDEBUT_SI\\b,\\bFIN_SI\\b,\\bDEBUT_SINON\\b,\\bFIN_SINON\\b").split(",");
 TantQueWords=QString("\\bTANT_QUE\\b,\\bDEBUT_TANT_QUE\\b,\\bFIN_TANT_QUE\\b,\\bFAIRE\\b").split(",");
 PourWords=QString("\\bPOUR\\b,\\bALLANT_DE\\b,\\bDEBUT_POUR\\b,\\bFIN_POUR\\b").split(",");
@@ -6044,6 +7674,18 @@ if (buffer.contains("<i>//",Qt::CaseInsensitive)) return SpanComment+buffer+Span
 QList<int> code=detectChaine(buffer);
 if ( buffer.length() > 0 )
       {
+      for ( QStringList::Iterator it = FonctionWords.begin(); it != FonctionWords.end(); ++it ) 
+	      {
+	      QRegExp expression(( *it ),Qt::CaseInsensitive);
+	      int index = expression.indexIn(buffer);
+	      while (index >= 0) 
+		{
+		int length = expression.matchedLength();
+		if (index<code.count() && code[index]==0) buffer=buffer.left(index)+SpanFonction+ buffer.mid(index,length)+SpanFin+buffer.mid(index+length,buffer.length()-index-length);
+		code=detectChaine(buffer);
+		index = expression.indexIn(buffer, index + length+SpanFonction.length()+SpanFin.length());
+		}
+	      }
       for ( QStringList::Iterator it = BlocWords.begin(); it != BlocWords.end(); ++it ) 
 	      {
 	      QRegExp expression(( *it ),Qt::CaseInsensitive);
@@ -6161,13 +7803,41 @@ cfDialog->ui.checkBoxArrondi->setChecked(arrondiAuto);
 cfDialog->ui.spinBoxBoucle->setValue(maxBoucle);
 cfDialog->ui.spinBoxTotal->setValue(totalBoucles);
 cfDialog->ui.spinBoxAffichage->setValue(totalAffichages);
+cfDialog->ui.spinBoxLigne->setValue(epaisseurLigne);
+cfDialog->ui.spinBoxPoint->setValue(epaisseurPoint);
+cfDialog->ui.spinBoxDecimales->setValue(nbDecimales);
 if (cfDialog->exec())
-  {
-  arrondiAuto=cfDialog->ui.checkBoxArrondi->isChecked();
-  maxBoucle=cfDialog->ui.spinBoxBoucle->value();
-  totalBoucles=cfDialog->ui.spinBoxTotal->value();
-  totalAffichages=cfDialog->ui.spinBoxAffichage->value();
-  }
+    {
+    arrondiAuto=cfDialog->ui.checkBoxArrondi->isChecked();
+    maxBoucle=cfDialog->ui.spinBoxBoucle->value();
+    totalBoucles=cfDialog->ui.spinBoxTotal->value();
+    totalAffichages=cfDialog->ui.spinBoxAffichage->value();
+    epaisseurLigne=cfDialog->ui.spinBoxLigne->value();
+    epaisseurPoint=cfDialog->ui.spinBoxPoint->value();
+    nbDecimales=cfDialog->ui.spinBoxDecimales->value();
+
+    arrondiAutoAlgo=arrondiAuto;
+    maxBoucleAlgo=maxBoucle;
+    totalBouclesAlgo=totalBoucles;
+    totalAffichagesAlgo=totalAffichages;
+    epaisseurLigneAlgo=epaisseurLigne;
+    epaisseurPointAlgo=epaisseurPoint;
+    nbDecimalesAlgo=nbDecimales;
+    ActualiserTexteParam();
+    if (!estVierge) ActualiserStatut();
+    }
 
 }
 
+void  MainWindow::ActualiserTexteParam()
+{
+ui.comboBoxParam->clear();
+if (arrondiAutoAlgo) ui.comboBoxParam->addItem(QString::fromUtf8("Arrondi auto : vrai"));
+else ui.comboBoxParam->addItem(QString::fromUtf8("Arrondi auto : faux"));
+ui.comboBoxParam->addItem(QString::fromUtf8("max itérations par boucles :")+QString::number(maxBoucleAlgo));
+ui.comboBoxParam->addItem(QString::fromUtf8("max itérations pour l'algo :")+QString::number(totalBouclesAlgo));
+ui.comboBoxParam->addItem(QString::fromUtf8("max affichage console :")+QString::number(totalAffichagesAlgo));
+ui.comboBoxParam->addItem(QString::fromUtf8("épaisseur lignes :")+QString::number(epaisseurLigneAlgo));
+ui.comboBoxParam->addItem(QString::fromUtf8("épaisseur points :")+QString::number(epaisseurPointAlgo));
+ui.comboBoxParam->addItem(QString::fromUtf8("nb décimales affichées :")+QString::number(nbDecimalesAlgo));   
+}
diff --git a/algobox.h b/algobox.h
index f39e5eb..ad11f06 100644
--- a/algobox.h
+++ b/algobox.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -64,6 +64,10 @@ void AjouterPoint();
 void AjouterSegment();
 void AjouterEffacer();
 void AjouterCommentaire();
+void AjouterFonction();
+void AjouterVariableLocale();
+void AjouterRenvoyer();
+void AjouterAppelerFct();
 //**********************
 void ModifierLire();
 void ModifierAfficher();
@@ -76,6 +80,9 @@ void ModifierTantque();
 void ModifierPoint();
 void ModifierSegment();
 void ModifierCommentaire();
+void ModifierFonction();
+void ModifierRenvoyer();
+void ModifierAppelerFct();
 //***************
 void LireConfig();
 void SauverConfig();
@@ -138,6 +145,7 @@ void EditColler();
 void EditCouper();
 //*****************
 void ToggleCadrePresentation();
+void ActualiserModeButton();
 void ActualiserMode();
 //*****************
 //void ImporterCodeTexte();
@@ -152,16 +160,17 @@ void AnnulerExtension();
 void LancerJSEditeur();
 //*****************
 void Configurer();
+void ActualiserTexteParam();
 
 private :
 QMenu *fichierMenu, *aideMenu, *recentMenu, *editMenu, *tutoMenu, *affichageMenu, *modeMenu, *extensionMenu, *optionsMenu;
 QActionGroup *modeGroup;
 QAction *recentFileActs[5];
-QAction *actionCopier, *actionColler, *actionCouper, *ToggleAct, *annulerExtensionAct;
+QAction *actionCopier, *actionColler, *actionCouper, *ToggleAct, *annulerExtensionAct, *actionModeNormal, *actionModeTexte;
 QStringList recentFilesList;
 QToolBar *fileToolBar;
 QStringList ListeNomsInterdits, ListeNomsVariables, ListeTypesVariables;
-QTreeWidgetItem *variablesItem, *debutItem, *finItem;
+QTreeWidgetItem *variablesItem, *debutItem, *finItem, *fctsItem;
 int indent, idligne,browserwidth,browserheight;
 bool estModifie, afficheCadrePresentation, /*repereDefini,*/ modeNormal, estVierge, blackconsole;
 QTreeWidgetItem *clipboardItem;
@@ -175,8 +184,15 @@ QPointer<QProgressDialog> progressDialog;
 int progressCompteur;
 QString highlightHtmlLine(const QString &text);
 QList<int> detectChaine(const QString &text);
+QPushButton *buttonModeNormal, *buttonModeTexte;
+
 bool arrondiAuto;
-int maxBoucle, totalBoucles, totalAffichages;
+int maxBoucle, totalBoucles, totalAffichages,epaisseurLigne,epaisseurPoint,nbDecimales;
+
+bool arrondiAutoAlgo;
+int maxBoucleAlgo, totalBouclesAlgo, totalAffichagesAlgo,epaisseurLigneAlgo,epaisseurPointAlgo,nbDecimalesAlgo;
+
+bool dansFct;
 
 protected:
 void dragEnterEvent(QDragEnterEvent *event);
@@ -185,3 +201,4 @@ void dropEvent(QDropEvent *event);
 
 
 #endif
+
diff --git a/algobox.icns b/algobox.icns
index 1b361a1..7a9fcd2 100644
Binary files a/algobox.icns and b/algobox.icns differ
diff --git a/algobox.ico b/algobox.ico
index 2c14ab5..5c81bcd 100644
Binary files a/algobox.ico and b/algobox.ico differ
diff --git a/algobox.pro b/algobox.pro
index 1aa957c..e1e7f5e 100644
--- a/algobox.pro
+++ b/algobox.pro
@@ -1,18 +1,35 @@
+COMPILEUSB=no
+
 TEMPLATE	= app
 LANGUAGE	= C++
 TARGET	 = algobox
-CONFIG	+= qt warn_off release
-QT_VERSION=$$[QT_VERSION]
-contains( QT_VERSION, "^5.*" ) {
-QT += xml webkitwidgets network widgets printsupport
+
+
+equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) {
+QT += core gui xml webenginewidgets network widgets printsupport
 } else {
-QT += xml webkit network
+message("Qt>=5.7 est requis")
+}
+ALGOBOXVERSION=1.0.1
+DEFINES += ALGOBOXVERSION=$${ALGOBOXVERSION}
+
+CONFIG	+= qt hide_symbols warn_off rtti_off exceptions_off c++11 release
+CONFIG -= precompile_header
+
+gcc {
+    QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
+}
+
+msvc {
+    QMAKE_CXXFLAGS_WARN_ON += -wd"4100"
 }
-ALGOBOXVERSION=0.9
-DEFINES += ALGOBOXVERSION=\\\"$${ALGOBOXVERSION}\\\"
+
 ###############################
 HEADERS	+= algobox.h \
 	algoconsole.h \
+	appeldialog.h \
+	fonctiondialog.h \
+	renvoyerdialog.h \
 	browserdialog.h \
 	browser.h \
 	consoledialog.h \
@@ -60,6 +77,9 @@ HEADERS	+= algobox.h \
 	affichercalculdialog.h
 SOURCES	+= main.cpp \
 	algobox.cpp \
+	appeldialog.cpp \
+	fonctiondialog.cpp \
+	renvoyerdialog.cpp \
 	algoconsole.cpp \
 	browser.cpp \
 	consoledialog.cpp \
@@ -108,6 +128,9 @@ SOURCES	+= main.cpp \
 	affichercalculdialog.cpp
 RESOURCES += algobox.qrc
 FORMS += algobox.ui \
+    appeldialog.ui \
+	fonctiondialog.ui \
+	renvoyerdialog.ui \
 	browserdialog.ui \
 	consoledialog.ui \
 	variabledialog.ui \
@@ -136,6 +159,7 @@ unix:!macx {
 UI_DIR = .ui
 MOC_DIR = .moc
 OBJECTS_DIR = .obj
+
 isEmpty( PREFIX ) {
     PREFIX=/usr
 }
@@ -145,17 +169,21 @@ isEmpty( DESKTOPDIR ) {
 isEmpty( ICONDIR ) {
     ICONDIR=/usr/share/pixmaps
 }
+isEmpty( MIMEDIR ) {
+    MIMEDIR=/usr/share/mime/packages
+}
+
 DEFINES += PREFIX=\\\"$${PREFIX}\\\"
 
-contains( QT_VERSION, "^5.*" ) {
 INCLUDEPATH +=$${QTDIR}/include/
-} 
 
 
 target.path = $${PREFIX}/bin
 utilities.path = $${PREFIX}/share/algobox
 desktop.path = $${DESKTOPDIR}
 icon.path = $${ICONDIR}
+mime.path = $${MIMEDIR}
+
 
 INSTALLS = target
 
@@ -191,4 +219,63 @@ INSTALLS += desktop
 
 icon.files = utilities/algobox.png
 INSTALLS += icon
+
+mime.files = utilities/x-algobox.xml
+INSTALLS += mime
+}
+################################
+win32 {
+UI_DIR = .ui
+MOC_DIR = .moc
+OBJECTS_DIR = .obj
+
+RC_FILE = win.rc
+
+}
+###############################
+macx {
+UI_DIR = .ui
+MOC_DIR = .moc
+OBJECTS_DIR = .obj
+
+LIBS_PRIVATE += -framework AppKit -framework CoreFoundation
+
+QMAKE_MAC_SDK=macosx
+
+#QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
+
+target.path = Algobox
+
+
+INSTALLS = target
+utilities.path = Contents/Resources
+utilities.files = utilities/qt_menu.nib \
+		utilities/qt_fr.qm \
+		ressources/eleve_calcul_recurrent.alg \
+		ressources/eleve_distance_sur_un_axe.alg \
+		ressources/eleve_que_fait_lalgo.alg \
+		ressources/eleve_simplification_calculs_enchaines.alg \
+		ressources/eleve_simul_lancers_de.alg \
+		ressources/prof_babylone.alg \
+		ressources/prof_balayage_fonctions.alg \
+		ressources/prof_courbe_fonction.alg \
+		ressources/prof_decomp_facteurspremiers.alg \
+		ressources/prof_dichotomie.alg \
+		ressources/prof_ductoscane.alg \
+		ressources/prof_euler.alg \
+		ressources/prof_integrale_trapezes.alg \
+		ressources/prof_montecarlo.alg \
+		ressources/prof_pgcd_euclide.alg \
+		ressources/prof_somme_entiers.alg \
+		ressources/prof_suite_syracuse.alg \
+		ressources/prof_tri_abulle.alg \
+		ressources/prof_pgcd_recursif.alg \
+		ressources/aidealgobox.html \
+		utilities/AUTHORS \
+		utilities/COPYING \
+		utilities/CHANGELOG.txt
+QMAKE_BUNDLE_DATA += utilities
+INSTALLS += utilities
+ICON = algobox.icns
+QMAKE_INFO_PLIST =Info.plist
 }
diff --git a/algobox.qrc b/algobox.qrc
index 7fcb2d2..ac45dc8 100644
--- a/algobox.qrc
+++ b/algobox.qrc
@@ -1,5 +1,11 @@
 <!DOCTYPE RCC><RCC version="1.0">
     <qresource>
+        <file>images/splash at 2x.png</file>
+        <file>images/splash.png</file>        
+        <file>images/go-previous at 2x.png</file>
+        <file>images/go-previous.png</file>
+        <file>images/go-next at 2x.png</file>
+        <file>images/go-next.png</file>
         <file>images/aide at 2x.png</file>
         <file>images/aide.png</file>
         <file>images/ajouter at 2x.png</file>
diff --git a/algobox.ui b/algobox.ui
index f72bf72..d6d5d88 100644
--- a/algobox.ui
+++ b/algobox.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>950</width>
-    <height>653</height>
+    <width>846</width>
+    <height>671</height>
    </rect>
   </property>
   <property name="acceptDrops">
@@ -19,27 +19,96 @@
   <widget class="QWidget" name="centralwidget">
    <layout class="QVBoxLayout" name="verticalLayout_3">
     <item>
-     <widget class="QGroupBox" name="groupBoxDescription">
+     <widget class="QFrame" name="frameDescription">
       <property name="sizePolicy">
        <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
         <horstretch>0</horstretch>
-        <verstretch>120</verstretch>
+        <verstretch>0</verstretch>
        </sizepolicy>
       </property>
       <property name="maximumSize">
        <size>
         <width>16777215</width>
-        <height>110</height>
+        <height>150</height>
        </size>
       </property>
-      <property name="title">
-       <string>Présentation de l'algorithme</string>
-      </property>
       <layout class="QGridLayout" name="gridLayout_3">
        <item row="0" column="0">
+        <widget class="QLabel" name="label_6">
+         <property name="text">
+          <string>À propos de cet algorithme:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="0">
+        <widget class="QLabel" name="label_7">
+         <property name="text">
+          <string>Paramètres de cet algorithme:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="3">
+        <widget class="QLabel" name="label_8">
+         <property name="text">
+          <string>Extension utilisée:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="4">
+        <widget class="QLineEdit" name="lineEditExtension">
+         <property name="palette">
+          <palette>
+           <active>
+            <colorrole role="Base">
+             <brush brushstyle="SolidPattern">
+              <color alpha="255">
+               <red>255</red>
+               <green>255</green>
+               <blue>180</blue>
+              </color>
+             </brush>
+            </colorrole>
+           </active>
+           <inactive>
+            <colorrole role="Base">
+             <brush brushstyle="SolidPattern">
+              <color alpha="255">
+               <red>255</red>
+               <green>255</green>
+               <blue>180</blue>
+              </color>
+             </brush>
+            </colorrole>
+           </inactive>
+           <disabled>
+            <colorrole role="Base">
+             <brush brushstyle="SolidPattern">
+              <color alpha="255">
+               <red>241</red>
+               <green>241</green>
+               <blue>241</blue>
+              </color>
+             </brush>
+            </colorrole>
+           </disabled>
+          </palette>
+         </property>
+         <property name="readOnly">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="2">
+        <widget class="QPushButton" name="pushButtonParam">
+         <property name="text">
+          <string>Changer</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1" colspan="5">
         <widget class="QTextEdit" name="textEditDescription">
          <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+          <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
@@ -47,13 +116,29 @@
          <property name="minimumSize">
           <size>
            <width>0</width>
-           <height>0</height>
+           <height>48</height>
           </size>
          </property>
          <property name="maximumSize">
           <size>
            <width>16777215</width>
-           <height>16777215</height>
+           <height>50</height>
+          </size>
+         </property>
+         <property name="frameShape">
+          <enum>QFrame::StyledPanel</enum>
+         </property>
+         <property name="lineWidth">
+          <number>1</number>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1">
+        <widget class="QComboBox" name="comboBoxParam">
+         <property name="minimumSize">
+          <size>
+           <width>200</width>
+           <height>0</height>
           </size>
          </property>
         </widget>
@@ -62,16 +147,13 @@
      </widget>
     </item>
     <item>
-     <widget class="QGroupBox" name="groupBoxArbre">
+     <widget class="QFrame" name="frameArbre">
       <property name="sizePolicy">
        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
-      <property name="title">
-       <string>Code de l'algorithme</string>
-      </property>
       <layout class="QGridLayout" name="gridLayout_2">
        <item row="0" column="0">
         <widget class="QStackedWidget" name="stackedWidget">
@@ -132,14 +214,14 @@
              <item>
               <widget class="QTextEdit" name="textEditTip">
                <property name="sizePolicy">
-                <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+                <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
                  <horstretch>0</horstretch>
                  <verstretch>0</verstretch>
                 </sizepolicy>
                </property>
                <property name="maximumSize">
                 <size>
-                 <width>300</width>
+                 <width>200</width>
                  <height>16777215</height>
                 </size>
                </property>
@@ -187,25 +269,12 @@
                 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
 <html><head><meta name="qrichtext" content="1" /><style type="text/css">
 p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;">
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
+</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'DejaVu Sans'; font-size:10pt;"><br /></p></body></html></string>
                </property>
               </widget>
              </item>
              <item>
-              <spacer name="verticalSpacer_3">
-               <property name="orientation">
-                <enum>Qt::Vertical</enum>
-               </property>
-               <property name="sizeHint" stdset="0">
-                <size>
-                 <width>20</width>
-                 <height>40</height>
-                </size>
-               </property>
-              </spacer>
-             </item>
-             <item>
               <widget class="QPushButton" name="pushButtonExecuter">
                <property name="toolTip">
                 <string>Raccourci clavier : Ctrl+T</string>
@@ -288,15 +357,15 @@ p, li { white-space: pre-wrap; }
              <item>
               <widget class="QTextEdit" name="textEditTipEditeur">
                <property name="sizePolicy">
-                <sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
+                <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
                  <horstretch>0</horstretch>
                  <verstretch>0</verstretch>
                 </sizepolicy>
                </property>
                <property name="maximumSize">
                 <size>
-                 <width>16777215</width>
-                 <height>500</height>
+                 <width>200</width>
+                 <height>16777215</height>
                 </size>
                </property>
                <property name="palette">
@@ -343,8 +412,8 @@ p, li { white-space: pre-wrap; }
                 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
 <html><head><meta name="qrichtext" content="1" /><style type="text/css">
 p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;">
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
+</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'DejaVu Sans'; font-size:10pt;"><br /></p></body></html></string>
                </property>
               </widget>
              </item>
@@ -1012,6 +1081,116 @@ p, li { white-space: pre-wrap; }
         </item>
        </layout>
       </widget>
+      <widget class="QWidget" name="tab_5">
+       <attribute name="title">
+        <string>Fonctions locales</string>
+       </attribute>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <layout class="QGridLayout" name="gridLayout_8">
+          <item row="0" column="0">
+           <widget class="QPushButton" name="pushButtonNelleFct">
+            <property name="toolTip">
+             <string>Raccourci clavier : Ctrl+D</string>
+            </property>
+            <property name="text">
+             <string>Déclarer nouvelle fonction</string>
+            </property>
+            <property name="icon">
+             <iconset resource="algobox.qrc">
+              <normaloff>:/images/ajouter.png</normaloff>:/images/ajouter.png</iconset>
+            </property>
+            <property name="shortcut">
+             <string>Ctrl+D</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="2" rowspan="3">
+           <widget class="QPlainTextEdit" name="textEditTipFonction">
+            <property name="palette">
+             <palette>
+              <active>
+               <colorrole role="Base">
+                <brush brushstyle="SolidPattern">
+                 <color alpha="255">
+                  <red>255</red>
+                  <green>255</green>
+                  <blue>180</blue>
+                 </color>
+                </brush>
+               </colorrole>
+              </active>
+              <inactive>
+               <colorrole role="Base">
+                <brush brushstyle="SolidPattern">
+                 <color alpha="255">
+                  <red>255</red>
+                  <green>255</green>
+                  <blue>180</blue>
+                 </color>
+                </brush>
+               </colorrole>
+              </inactive>
+              <disabled>
+               <colorrole role="Base">
+                <brush brushstyle="SolidPattern">
+                 <color alpha="255">
+                  <red>241</red>
+                  <green>241</green>
+                  <blue>241</blue>
+                 </color>
+                </brush>
+               </colorrole>
+              </disabled>
+             </palette>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0">
+           <widget class="QPushButton" name="pushButtonVariableFct">
+            <property name="toolTip">
+             <string>Raccourci clavier : Ctrl+L</string>
+            </property>
+            <property name="text">
+             <string>Déclarer variable locale</string>
+            </property>
+            <property name="icon">
+             <iconset resource="algobox.qrc">
+              <normaloff>:/images/ajouter.png</normaloff>:/images/ajouter.png</iconset>
+            </property>
+            <property name="shortcut">
+             <string>Ctrl+L</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0">
+           <widget class="QPushButton" name="pushButtonRetourFct">
+            <property name="toolTip">
+             <string>Raccourci clavier : Ctrl+F</string>
+            </property>
+            <property name="text">
+             <string>Ajouter RENVOYER valeur</string>
+            </property>
+            <property name="icon">
+             <iconset resource="algobox.qrc">
+              <normaloff>:/images/ajouter.png</normaloff>:/images/ajouter.png</iconset>
+            </property>
+            <property name="shortcut">
+             <string>Ctrl+F</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QPushButton" name="pushButtonAppelFonction">
+            <property name="text">
+             <string>Appeler Fonction</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </widget>
      </widget>
     </item>
    </layout>
@@ -1021,8 +1200,8 @@ p, li { white-space: pre-wrap; }
     <rect>
      <x>0</x>
      <y>0</y>
-     <width>950</width>
-     <height>21</height>
+     <width>846</width>
+     <height>22</height>
     </rect>
    </property>
   </widget>
diff --git a/algoconsole.cpp b/algoconsole.cpp
index 7be34ea..40ae4fa 100644
--- a/algoconsole.cpp
+++ b/algoconsole.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2003-2017 by Pascal Brachet                     *
  *   http://www.xm1math.net/texmaker/                                      *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -63,17 +63,10 @@ void AlgoConsole::keyPressEvent(QKeyEvent *event)
     if(event->key() >= 0x20 && event->key() <= 0x7e
        && (event->modifiers() == Qt::NoModifier || event->modifiers() == Qt::ShiftModifier))
 	QTextEdit::keyPressEvent(event);
-#if (QT_VERSION >= 0x040700)
     if(event->key() == Qt::Key_Backspace
        && event->modifiers() == Qt::NoModifier
        && textCursor().positionInBlock() > prompt.length())
 	QTextEdit::keyPressEvent(event);
-#else
-    if(event->key() == Qt::Key_Backspace
-       && event->modifiers() == Qt::NoModifier
-       && (textCursor().position()-textCursor().block().position()> prompt.length()))
-	QTextEdit::keyPressEvent(event);
-#endif
     if(event->key() == Qt::Key_Return && event->modifiers() == Qt::NoModifier)
 	onEnter();
     if(event->key() == Qt::Key_Enter)
@@ -82,17 +75,10 @@ void AlgoConsole::keyPressEvent(QKeyEvent *event)
 
 void AlgoConsole::onEnter()
 {
-#if (QT_VERSION >= 0x040700)
     if(textCursor().positionInBlock() == prompt.length())
     {
 	return;
     }
-#else
-    if(textCursor().position()-textCursor().block().position() == prompt.length())
-    {
-	return;
-    }
-#endif
     answer = textCursor().block().text().mid(prompt.length());
     isLocked = true;
     textCursor().insertBlock();
diff --git a/algoconsole.h b/algoconsole.h
index ae5bdd2..2c0511b 100644
--- a/algoconsole.h
+++ b/algoconsole.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2003-2017 by Pascal Brachet                     *
  *   http://www.xm1math.net/texmaker/                                      *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
diff --git a/algoeditor.cpp b/algoeditor.cpp
index 30fc7c6..aade86a 100644
--- a/algoeditor.cpp
+++ b/algoeditor.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/algoeditor.h b/algoeditor.h
index 18278fc..ae9fda2 100644
--- a/algoeditor.h
+++ b/algoeditor.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2009 by Pascal Brachet                     *
+ *   copyright       : (C) 2003-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/algoeditorview.cpp b/algoeditorview.cpp
index 9f7a241..cbc3c3c 100644
--- a/algoeditorview.cpp
+++ b/algoeditorview.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/algoeditorview.h b/algoeditorview.h
index 700e1da..966c534 100644
--- a/algoeditorview.h
+++ b/algoeditorview.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/algohighlighter.cpp b/algohighlighter.cpp
index bd6b0a6..e73321a 100644
--- a/algohighlighter.cpp
+++ b/algohighlighter.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -24,8 +24,10 @@ ColorCommande=QColor("#0000CC");
 ColorSi=QColor("#800080");
 ColorTantQue=QColor("#DD6F06");
 ColorPour=QColor("#BB8800");
+ColorFonction=QColor("#9A4D00");
+FonctionWords=QString("\\bFONCTION\\b,\\bFONCTIONS_UTILISEES\\b,\\bDEBUT_FONCTION\\b,\\bFIN_FONCTION\\b,\\bVARIABLES_FONCTION\\b").split(",");
 BlocWords= QString("\\bVARIABLES\\b,\\bDEBUT_ALGORITHME\\b,\\bFIN_ALGORITHME\\b").split(",");
-CommandeWords= QString("\\bEST_DU_TYPE\\b,\\bPAUSE\\b,\\bLIRE\\b,\\bAFFICHERCALCUL\\b,\\bAFFICHER\\b,\\bPREND_LA_VALEUR\\b,\\bTRACER_POINT\\b,\\bTRACER_POINT_Rouge\\b,\\bTRACER_POINT_Vert\\b,\\bTRACER_POINT_Bleu\\b,\\bTRACER_POINT_Blanc\\b,\\bTRACER_SEGMENT\\b,\\bTRACER_SEGMENT_Rouge\\b,\\bTRACER_SEGMENT_Vert\\b,\\bTRACER_SEGMENT_Bleu\\b,\\bTRACER_SEGMENT_Blanc\\b").split(",");
+CommandeWords= QString("\\bEST_DU_TYPE\\b,\\bPAUSE\\b,\\bLIRE\\b,\\bAFFICHERCALCUL\\b,\\bAFFICHER\\b,\\bPREND_LA_VALEUR\\b,\\bTRACER_POINT\\b,\\bTRACER_POINT_Rouge\\b,\\bTRACER_POINT_Vert\\b,\\bTRACER_POINT_Bleu\\b,\\bTRACER_POINT_Blanc\\b,\\bTRACER_SEGMENT\\b,\\bTRACER_SEGMENT_Rouge\\b,\\bTRACER_SEGMENT_Vert\\b,\\bTRACER_SEGMENT_Bleu\\b,\\bTRACER_SEGMENT_Blanc\\b,\\bRENVOYER\\b,\\bAPPELER_FONCTION\\b").split(",");
 SiWords=QString("\\bSI\\b,\\bALORS\\b,\\bSINON\\b,\\bDEBUT_SI\\b,\\bFIN_SI\\b,\\bDEBUT_SINON\\b,\\bFIN_SINON\\b").split(",");
 TantQueWords=QString("\\bTANT_QUE\\b,\\bDEBUT_TANT_QUE\\b,\\bFIN_TANT_QUE\\b,\\bFAIRE\\b").split(",");
 PourWords=QString("\\bPOUR\\b,\\bALLANT_DE\\b,\\bDEBUT_POUR\\b,\\bFIN_POUR\\b").split(",");
@@ -159,6 +161,9 @@ while (i < text.length())
     }
 setCurrentBlockState(StateStandard) ;
 
+QTextCharFormat fonctionFormat;
+fonctionFormat.setFontWeight(QFont::Bold);
+fonctionFormat.setForeground(ColorFonction);
 QTextCharFormat blocFormat;
 blocFormat.setFontWeight(QFont::Bold);
 blocFormat.setForeground(ColorBloc);
@@ -186,6 +191,17 @@ while (i < text.length())
 	      }
 	if ( buffer.length() > 0 )
 		{
+		for ( QStringList::Iterator it = FonctionWords.begin(); it != FonctionWords.end(); ++it ) 
+			{
+			QRegExp expression(( *it ),Qt::CaseInsensitive);
+			int index = expression.indexIn(buffer);
+			while (index >= 0) 
+			  {
+			  int length = expression.matchedLength();
+			  setFormat(i-length, length,fonctionFormat);
+			  index = expression.indexIn(buffer, index + length);
+			  }
+			}
 		for ( QStringList::Iterator it = BlocWords.begin(); it != BlocWords.end(); ++it ) 
 			{
 			QRegExp expression(( *it ),Qt::CaseInsensitive);
diff --git a/algohighlighter.h b/algohighlighter.h
index b7c0a55..5568399 100644
--- a/algohighlighter.h
+++ b/algohighlighter.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -28,8 +28,8 @@ class AlgoHighlighter : public QSyntaxHighlighter
 public:
     AlgoHighlighter(QTextDocument *parent = 0);
     ~AlgoHighlighter();
-    QColor ColorStandard, ColorComment, ColorBloc, ColorCommande, ColorSi, ColorTantQue, ColorPour;
-    QStringList BlocWords,SiWords,TantQueWords,PourWords, CommandeWords;
+    QColor ColorStandard, ColorComment, ColorBloc, ColorCommande, ColorSi, ColorTantQue, ColorPour, ColorFonction;
+    QStringList BlocWords,SiWords,TantQueWords,PourWords, CommandeWords,FonctionWords;
 private :
 bool isWordSeparator(QChar c) const;
 bool isSpace(QChar c) const;
diff --git a/algowebpage.cpp b/algowebpage.cpp
index f95bf9f..59a2355 100644
--- a/algowebpage.cpp
+++ b/algowebpage.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -10,14 +10,14 @@
 
 #include "algowebpage.h"
 
-//#include <QWebPage>
+
 #include <QMessageBox>
 #include <QInputDialog>
 #include <QDebug>
 
 
 
-AlgoWebPage::AlgoWebPage(QObject* parent, AlgoConsole* cons):QWebPage(parent)
+AlgoWebPage::AlgoWebPage(QObject* parent, AlgoConsole* cons):QWebEnginePage(parent)
 {
 result=false;
 stop=false;
@@ -32,12 +32,12 @@ timer.disconnect();
 stop=true;
 }
 
-void AlgoWebPage::javaScriptAlert(QWebFrame *frame, const QString& msg)
+void AlgoWebPage::javaScriptAlert(const QUrl &securityOrigin, const QString& msg)
 {
     if (!stop) QMessageBox::information(this->view(),"AlgoBox", msg, QMessageBox::Ok);
 }
 
-bool AlgoWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QString& defaultValue, QString* result)
+bool AlgoWebPage::javaScriptPrompt(const QUrl &securityOrigin, const QString& msg, const QString& defaultValue, QString* result)
 {
 if (stop) return true;
 //    bool ok = false;
@@ -60,7 +60,7 @@ loop.exec();
 //    return ok;
 }
 
-bool AlgoWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg)
+bool AlgoWebPage::javaScriptConfirm(const QUrl &securityOrigin, const QString& msg)
 {
 if (stop) return true;
 if (msg=="Pause")
diff --git a/algowebpage.h b/algowebpage.h
index d28c601..88f0d1e 100644
--- a/algowebpage.h
+++ b/algowebpage.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -12,13 +12,13 @@
 #define ALGOWEBPAGE_H
 
 #include "algoconsole.h"
-#include <QWebPage>
+#include <QWebEnginePage>
 #include <QObject>
 #include <QEventLoop>
 #include <QTimer>
 #include <QDebug>
 
-class AlgoWebPage : public QWebPage
+class AlgoWebPage : public QWebEnginePage
 {
 Q_OBJECT
 public:
@@ -26,9 +26,9 @@ public:
 	  ~AlgoWebPage();
 AlgoConsole *console;
 protected:
-   virtual void javaScriptAlert(QWebFrame *originatingFrame, const QString& msg);
-   virtual bool javaScriptPrompt(QWebFrame *originatingFrame, const QString& msg, const QString& defaultValue, QString* result);
-   virtual bool javaScriptConfirm(QWebFrame *originatingFrame, const QString& msg);
+   virtual void javaScriptAlert(const QUrl &securityOrigin, const QString& msg);
+   virtual bool javaScriptPrompt(const QUrl &securityOrigin, const QString& msg, const QString& defaultValue, QString* result);
+   virtual bool javaScriptConfirm(const QUrl &securityOrigin, const QString& msg);
 private:
 bool result, stop;
 QEventLoop loop_aff, loop_pause;
diff --git a/algowebview.cpp b/algowebview.cpp
index d730be0..8e09040 100644
--- a/algowebview.cpp
+++ b/algowebview.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2006-2009 by Pascal Brachet                     *
+ *   copyright       : (C) 2006-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -10,24 +10,32 @@
 
 #include "algowebview.h"
 
-#include <QPrintDialog>
-#include <QPrinter>
+
 #include <QContextMenuEvent>
 #include <QMenu>
 #include <QAction>
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#include "QtWebKitWidgets/qwebframe.h"
-#else
-#include <QWebFrame>
-#endif
 #include <QFileDialog>
 #include <QDir>
+#include <QDesktopServices>
+#include <QUrl>
+#include <QTimer>
 #include <QDebug>
 
+
+
 AlgoWebView::AlgoWebView(QWidget *parent)
-    : QWebView(parent)
+    : QWebEngineView(parent)
 {
-
+pdffichier=QDir::homePath();
+pdffichier="algobox_temp_"+pdffichier.section('/',-1);
+pdffichier=QString(QUrl::toPercentEncoding(pdffichier));
+pdffichier.remove("%");
+pdffichier=pdffichier+".pdf";
+QString tempDir=QDir::tempPath();
+pdffichier=tempDir+"/"+pdffichier;
+connect(this,SIGNAL(loadFinished(bool)), SLOT(finishLoading(bool)));
+file_watcher = new QFileSystemWatcher();
+connect(file_watcher, SIGNAL(fileChanged(QString)), this, SLOT(voirPdf(QString)));
 }
 AlgoWebView::~AlgoWebView()
 {
@@ -36,35 +44,26 @@ AlgoWebView::~AlgoWebView()
 void AlgoWebView::contextMenuEvent(QContextMenuEvent *event)
 {
 QMenu *menu = new QMenu(this);
-menu->addAction(QString::fromUtf8("Imprimer"), this, SLOT(imprimer()));  
-menu->addAction(QString::fromUtf8("Exporter en Pdf"), this, SLOT(exporterPdf()));  
+menu->addAction(QString::fromUtf8("Imprimer (pdf)"), this, SLOT(exporterPdf()));  
 menu->exec(mapToGlobal(event->pos()));
 delete menu;
 }
 
-void AlgoWebView::imprimer()
+void AlgoWebView::finishLoading(bool)
 {
-QPrinter printer;
-QPrintDialog *dlg = new QPrintDialog(&printer,this);
-if (dlg->exec() != QDialog::Accepted) return;
-page()->mainFrame()->print(&printer);
+page()->printToPdf(pdffichier);
 }
 
+
 void AlgoWebView::exporterPdf()
 {
-QPrinter printer(QPrinter::HighResolution);
-#if defined(Q_OS_MAC)
-printer.setOutputFormat(QPrinter::NativeFormat);
-#else
-printer.setOutputFormat(QPrinter::PdfFormat);
-#endif
-printer.setPaperSize(QPrinter::A4);
-QString rep=QDir::homePath();
-QString fn = QFileDialog::getSaveFileName(this,QString::fromUtf8("Exporter en Pdf"),rep,QString::fromUtf8("Fichier pdf (*.pdf)"));
-if (fn.isEmpty()) return;
-if (!fn.contains('.')) fn += ".pdf";
-printer.setOutputFileName(fn);
-//QPrintDialog *dlg = new QPrintDialog(&printer,this);
-//if (dlg->exec() != QDialog::Accepted) return;
-page()->mainFrame()->print(&printer);
+page()->printToPdf(pdffichier);
+file_watcher->addPath(pdffichier);
+}
+
+void AlgoWebView::voirPdf(QString)
+{
+file_watcher->removePath(pdffichier);
+QFileInfo fic(pdffichier);
+if (fic.exists() && fic.isReadable() ) QDesktopServices::openUrl(QUrl("file:///"+pdffichier));
 }
diff --git a/algowebview.h b/algowebview.h
index a5650ca..5541ba9 100644
--- a/algowebview.h
+++ b/algowebview.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -11,24 +11,31 @@
 #ifndef ALGOWEBVIEW_H
 #define ALGOWEBVIEW_H
 
-//#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-//#include "QtWebKitWidgets/qwebview.h"
-//#else
-#include <QWebView>
-//#endif
 
-class AlgoWebView : public QWebView
+#include <QWebEngineView>
+#include <QFileSystemWatcher>
+
+
+class AlgoWebView : public QWebEngineView
 {
     Q_OBJECT
  
 public:
     AlgoWebView(QWidget *parent = 0);
     ~AlgoWebView();
+private:
+QString pdffichier;
+QFileSystemWatcher *file_watcher;
 protected:
     void contextMenuEvent(QContextMenuEvent *event);
+protected slots:
+    void finishLoading(bool);
 public slots:
-void imprimer();
 void exporterPdf();
+private slots:
+void voirPdf(QString);
+
+
 };
 
 
diff --git a/animatedlabel.cpp b/animatedlabel.cpp
index 40db3ec..1578c9f 100644
--- a/animatedlabel.cpp
+++ b/animatedlabel.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2003-2017 by Pascal Brachet                     *
  *   http://www.xm1math.net/texmaker/                                      *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
diff --git a/animatedlabel.h b/animatedlabel.h
index 26d9956..cf95650 100644
--- a/animatedlabel.h
+++ b/animatedlabel.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2003-2017 by Pascal Brachet                     *
  *   http://www.xm1math.net/texmaker/                                      *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
diff --git a/configdialog.cpp b/appeldialog.cpp
similarity index 80%
copy from configdialog.cpp
copy to appeldialog.cpp
index 775409a..49ae76f 100644
--- a/configdialog.cpp
+++ b/appeldialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -8,14 +8,14 @@
  *                                                                         *
  ***************************************************************************/
 
-#include "configdialog.h"
+#include "appeldialog.h"
 
-ConfigDialog::ConfigDialog(QWidget *parent)
+AppelDialog::AppelDialog(QWidget *parent)
     :QDialog( parent)
 {
 ui.setupUi(this);
 setModal(true);
 }
 
-ConfigDialog::~ConfigDialog(){
+AppelDialog::~AppelDialog(){
 }
diff --git a/configdialog.h b/appeldialog.h
similarity index 72%
copy from configdialog.h
copy to appeldialog.h
index 1a22428..5be2842 100644
--- a/configdialog.h
+++ b/appeldialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -8,17 +8,17 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef CONFIGDIALOG_H
-#define CONFIGDIALOG_H
+#ifndef APPELDIALOG_H
+#define APPELDIALOG_H
 
-#include "ui_configdialog.h"
+#include "ui_appeldialog.h"
 
-class ConfigDialog : public QDialog  {
+class AppelDialog : public QDialog  {
    Q_OBJECT
 public:
-	ConfigDialog(QWidget *parent=0);
-	~ConfigDialog();
-	Ui::ConfigDialog ui;
+	AppelDialog(QWidget *parent=0);
+	~AppelDialog();
+	Ui::AppelDialog ui;
 };
 
 
diff --git a/appeldialog.ui b/appeldialog.ui
new file mode 100644
index 0000000..56aeb57
--- /dev/null
+++ b/appeldialog.ui
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AppelDialog</class>
+ <widget class="QDialog" name="AppelDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>511</width>
+    <height>84</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Insérer APPELER_FONCTION</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <widget class="QLabel" name="labelMessage1">
+     <property name="text">
+      <string>APPELER_FONCTION</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QLineEdit" name="lineEdit">
+     <property name="minimumSize">
+      <size>
+       <width>150</width>
+       <height>0</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="3">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>lineEdit</tabstop>
+  <tabstop>buttonBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>AppelDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>AppelDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/aproposdialog.cpp b/aproposdialog.cpp
index bf6a4bf..f3d278d 100644
--- a/aproposdialog.cpp
+++ b/aproposdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2006-2009 by Pascal Brachet                     *
+ *   copyright       : (C) 2006-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -13,28 +13,33 @@
 #include <QFile>
 #include <QTextStream>
 #include <QTextCodec>
+#include <QDebug>
+
+#define STRINGIFY_INTERNAL(x) #x
+#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
+
+#define VERSION_STR STRINGIFY(ALGOBOXVERSION)
 
 AproposDialog::AproposDialog(QWidget *parent)
     :QDialog( parent)
 {
 ui.setupUi(this);
+
 QPixmap pixmap;
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-if (qApp->devicePixelRatio()==2)
+
+if (this->devicePixelRatio()>1)
 {
 pixmap.load(":/images/algobox128 at 2x.png");
 pixmap.setDevicePixelRatio(qApp->devicePixelRatio());
 }
 else pixmap.load(":/images/algobox128.png");
-#else
-pixmap.load(":/images/algobox128.png");
-#endif
+
 ui.label->setPixmap(pixmap);
 setModal(true);
 QTextCodec *codec = QTextCodec::codecForName("UTF-8");
-QString contenu=QString::fromUtf8("<b>AlgoBox ")+QLatin1String(ALGOBOXVERSION)+QString::fromUtf8("</b><br>(compiled with Qt ")+QLatin1String(QT_VERSION_STR);
+QString contenu=QString::fromUtf8("<b>AlgoBox ")+QLatin1String(VERSION_STR)+QString::fromUtf8("</b><br>(compiled with Qt ")+QLatin1String(QT_VERSION_STR);
 ui.textBrowser1->setOpenExternalLinks(true);
-ui.textBrowser1->setHtml(contenu+QString::fromUtf8(")<p><b>AlgoBox :</b> logiciel libre et multi-plateforme d'aide à l'élaboration et à l'exécution d'algorithmes.<i>(interface graphique de création de pseudo-code algorithmique et d'interprétation du code obtenu en javascript)</i><br><br><b><i>Copyright (c) 2009/2014 par Pascal Brachet</i></b><br><br><i>(Merci à <b>J.Amblard</b> pour sa précieuse collaboration, à Frédérique Mounier et aux utilisateurs pour leurs remarques et suggestions)< [...]
+ui.textBrowser1->setHtml(contenu+QString::fromUtf8(")<p><b>AlgoBox :</b> logiciel libre et multi-plateforme d'aide à l'élaboration et à l'exécution d'algorithmes.<i>(interface graphique de création de pseudo-code algorithmique et d'interprétation du code obtenu en javascript)</i><br><br><b><i>Copyright (c) 2009/2017 par Pascal Brachet</i></b><br><br><i>(Merci à <b>J.Amblard</b> pour sa précieuse collaboration, à Frédérique Mounier et aux utilisateurs pour leurs remarques et suggestions)< [...]
 QString content;
 QFile licence(":/utilities/license_html.txt");
 licence.open(QIODevice::ReadOnly);
diff --git a/aproposdialog.h b/aproposdialog.h
index 56cfe4c..2a6e556 100644
--- a/aproposdialog.h
+++ b/aproposdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/blockdata.cpp b/blockdata.cpp
index 98a837b..9a508a2 100644
--- a/blockdata.cpp
+++ b/blockdata.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2003-2017 by Pascal Brachet                     *
  *   http://www.xm1math.net/texmaker/                                      *
  *   contains some code from CLedit (C) 2010 Heinz van Saanen -GPL         *
  *                                                                         *
diff --git a/blockdata.h b/blockdata.h
index 003f19d..55303c6 100644
--- a/blockdata.h
+++ b/blockdata.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2003-2017 by Pascal Brachet                     *
  *   http://www.xm1math.net/texmaker/                                      *
  *   addons by Luis Silvestre                                              *
  *                                                                         *
diff --git a/browser.cpp b/browser.cpp
index 34337a9..a5a572b 100644
--- a/browser.cpp
+++ b/browser.cpp
@@ -1,6 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2011 by Pascal Brachet                     *
- *   http://www.xm1math.net/algobox/                                       *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -13,15 +12,14 @@
 #include "geticon.h"
 
 #include <QtGui>
-#include <QPrinter>
 #include <QMenuBar>
 #include <QToolBar>
-#include <QPrintDialog>
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#include "QtWebKitWidgets/qwebframe.h"
-#else
-#include <QWebFrame>
-#endif
+#include <QFileDialog>
+#include <QDir>
+#include <QDesktopServices>
+#include <QUrl>
+#include <QTimer>
+#include <QDebug>
 
 
 Browser::Browser( const QString home, QWidget* parent)
@@ -35,14 +33,15 @@ setWindowIcon(getIcon(":/images/algobox22.png"));
 #endif
 setIconSize(QSize(22,22 ));
 progress = 0;
-view = new QWebView(this);
+view = new QWebEngineView(this);
 if ( !home.isEmpty()) view->load(QUrl(home));
 connect(view, SIGNAL(titleChanged(QString)), SLOT(adjustTitle()));
 connect(view, SIGNAL(loadProgress(int)), SLOT(setProgress(int)));
 connect(view, SIGNAL(loadFinished(bool)), SLOT(finishLoading(bool)));
 
+
 QMenu *fileMenu = menuBar()->addMenu(QString::fromUtf8("&Fichier"));
-fileMenu->addAction(QString::fromUtf8("&Imprimer"), this, SLOT(Print()));
+fileMenu->addAction(QString::fromUtf8("&Imprimer (pdf)"), this, SLOT(Print()));
 fileMenu->addSeparator();
 fileMenu->addAction(QString::fromUtf8("&Quitter"), this, SLOT(close()));
 
@@ -51,8 +50,12 @@ QAction *Act;
 Act = new QAction(getIcon(":/images/home.png"), QString::fromUtf8("Sommaire"), this);
 connect(Act, SIGNAL(triggered()), this, SLOT(Sommaire()));
 toolBar->addAction(Act);
-toolBar->addAction(view->pageAction(QWebPage::Back));
-toolBar->addAction(view->pageAction(QWebPage::Forward));
+Act=view->pageAction(QWebEnginePage::Back);
+Act->setIcon(getIcon(":/images/go-previous.png"));
+toolBar->addAction(Act);
+Act=view->pageAction(QWebEnginePage::Forward);
+Act->setIcon(getIcon(":/images/go-next.png"));
+toolBar->addAction(Act);
 
 QWidget* spacer = new QWidget();
 spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -67,7 +70,14 @@ toolBar->addWidget(findButton);
 
 setCentralWidget(view);
 setUnifiedTitleAndToolBarOnMac(true);
-    
+
+pdffichier=QDir::homePath();
+pdffichier="algobox_aide_temp_"+pdffichier.section('/',-1);
+pdffichier=QString(QUrl::toPercentEncoding(pdffichier));
+pdffichier.remove("%");
+pdffichier=pdffichier+".pdf";
+QString tempDir=QDir::tempPath();
+pdffichier=tempDir+"/"+pdffichier;
 //resize(780,580 );
 }
 
@@ -94,24 +104,26 @@ void Browser::finishLoading(bool)
 {
 progress = 100;
 adjustTitle();
+view->page()->printToPdf(pdffichier);
 }
 
 void Browser::Sommaire()
 {
-view->page()->mainFrame()->evaluateJavaScript("window.location.href='#SOMMAIRE';");
+view->page()->runJavaScript("window.location.href='#SOMMAIRE';");
 }
 
 void Browser::Print()
 {
-QPrinter printer;
-QPrintDialog *dialog = new QPrintDialog(&printer, this);
-dialog->setWindowTitle(QString::fromUtf8("Imprimer"));
-if (dialog->exec() != QDialog::Accepted) return;
-view->page()->mainFrame()->print(&printer);
+QFileInfo fic(pdffichier);
+if (fic.exists() && fic.isReadable() ) QDesktopServices::openUrl(QUrl("file:///"+pdffichier));
 }
 
+
+
+
+
 void Browser::Chercher()
 {
 if (searchLineEdit->text().isEmpty()) return;
-view->findText(searchLineEdit->text(),QWebPage::FindWrapsAroundDocument);
+view->findText(searchLineEdit->text());
 }
diff --git a/browser.h b/browser.h
index 6cc24b8..8e7ddb2 100644
--- a/browser.h
+++ b/browser.h
@@ -1,6 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2010 by Pascal Brachet                     *
- *   http://www.xm1math.net/texmaker/                                      *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -15,11 +14,8 @@
 #include <QMainWindow>
 #include <QLineEdit>
 #include <QPushButton>
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#include "QtWebKitWidgets/qwebview.h"
-#else
-#include <QWebView>
-#endif
+#include <QWebEngineView>
+
 
 
 class Browser : public QMainWindow
@@ -38,10 +34,11 @@ private slots:
   void Print();
   void Chercher();
 private:
-    QWebView *view;
+    QWebEngineView *view;
     int progress;
     QLineEdit *searchLineEdit;
     QPushButton *findButton;
+    QString pdffichier;
 };
 
 #endif
diff --git a/browserdialog.cpp b/browserdialog.cpp
index 4940f0c..e63b0c2 100644
--- a/browserdialog.cpp
+++ b/browserdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -10,7 +10,6 @@
 
 #include "browserdialog.h"
 #include <QUrl>
-#include <QWebFrame>
 #include <QTextCursor>
 #include <QTimer>
 #include <QDebug>
@@ -20,13 +19,31 @@
 #include <QMouseEvent>
 #include <QTextCodec>
 #include <QTextStream>
+#include <QWebChannel>
+#include <QSplashScreen>
 
 
 
 BrowserDialog::BrowserDialog(QWidget *parent,QString fichier,bool blackconsole)
     :QDialog( parent)
 {
+hide();
+QPixmap pixmap(400,163);
+if (qApp->devicePixelRatio()>=2)
+{
+pixmap.load(":/images/splash at 2x.png");
+pixmap.setDevicePixelRatio(qApp->devicePixelRatio());
+}
+else pixmap.load(":/images/splash.png");
+
+QSplashScreen *splash = new QSplashScreen(pixmap);
+splash->resize(400,163);
+splash->show();
+
 ui.setupUi(this);
+splash->finish(this);
+
+connect(ui.webView, SIGNAL(loadFinished(bool)), SLOT(finishLoading(bool)));
 ui.testerButton->setEnabled(false);
 ui.suivantButton->setEnabled(false);
 ui.stopButton->setEnabled(false);
@@ -79,18 +96,28 @@ ui.textEditPas->setPalette(palette);
 highlighter = new ConsoleHighlighter(ui.textEdit->document(),blackconsole);
 highlighterPas = new LogHighlighter(ui.textEditPas->document(),blackconsole);
 
+ui.pdfButton->setEnabled(false);
+ui.checkBoxPasAPas->setEnabled(false);
+ui.suivantButton->setEnabled(false);
+ui.stopButton->setEnabled(false);
+ui.testerButton->setEnabled(false);
+
 page=new AlgoWebPage(ui.webView,ui.textEdit);
 ui.webView->setPage(page);
-page->mainFrame()->load(QUrl::fromLocalFile(fichier));
-connect(page->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()),this, SLOT(populateJavaScriptWindowObject()));
+
+QWebChannel *channel = new QWebChannel();
+page->setWebChannel(channel);
+channel->registerObject(QString("BrowserDialog"), this);
+page->load(QUrl::fromLocalFile(fichier));
+ui.textEdit->clear();
+ui.textEditPas->clear();
+//ui.testerButton->setEnabled(true);
 connect(ui.testerButton, SIGNAL(clicked()),this, SLOT(LancerAlgo()));
 connect(ui.suivantButton, SIGNAL(clicked()),this, SLOT(ContinuerPasAPas()));
 connect(ui.stopButton, SIGNAL(clicked()),this, SLOT(StopperPasAPas()));
-connect(ui.imprimerButton, SIGNAL(clicked()),ui.webView, SLOT(imprimer()));
 connect(ui.pdfButton, SIGNAL(clicked()),ui.webView, SLOT(exporterPdf()));
 connect(ui.textEdit, SIGNAL(done()),this, SLOT(setFocus()));
-ui.imprimerButton->setEnabled(false);
-ui.pdfButton->setEnabled(false);
+
 }
 
 BrowserDialog::~BrowserDialog(){
@@ -112,13 +139,6 @@ page->stopaffichage();
 e->accept();
 }
 
-void BrowserDialog::populateJavaScriptWindowObject()
-{
-ui.textEdit->clear();
-ui.textEditPas->clear();
-ui.testerButton->setEnabled(true);
-page->mainFrame()->addToJavaScriptWindowObject("browserDialog", this);
-}
 
 void BrowserDialog::scriptAfficher(QString msg,bool newline)
 {
@@ -166,7 +186,6 @@ void BrowserDialog::scriptLaunched()
 ui.checkBoxPasAPas->setEnabled(false);
 //ui.testerButton->setText(QString::fromUtf8("Exécution en cours"));
 ui.testerButton->setEnabled(false);
-ui.imprimerButton->setEnabled(false);
 ui.pdfButton->setEnabled(false);
 ui.labelProcess->show();
 }
@@ -182,7 +201,7 @@ l.setCodec(codec);
 while (!l.atEnd()) 
 	{
 	ligne=l.readLine();
-	data=page->mainFrame()->evaluateJavaScript("ALGOBOX_AJOUTE_RESULTAT(\""+ligne.trimmed()+"\");");;
+	page->runJavaScript("ALGOBOX_AJOUTE_RESULTAT(\""+ligne.trimmed()+"\");");
 	}
 ui.labelProcess->hide();
 ui.testerButton->setText(QString::fromUtf8("Lancer Algorithme"));
@@ -194,7 +213,6 @@ ui.webView->setFocus();
 QPoint pos(0,0);
 QMouseEvent event(QEvent::MouseButtonPress,pos,Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
 QApplication::sendEvent(ui.webView, &event);
-ui.imprimerButton->setEnabled(true);
 ui.pdfButton->setEnabled(true);
 }
 
@@ -216,10 +234,10 @@ QTimer::singleShot(100, this, SLOT(ExecuterAlgo()));
 
 void BrowserDialog::ExecuterAlgo()
 {
-ui.textEdit->insertPlainText(QString::fromUtf8("***L'algorithme contient une erreur : impossible de le lancer***\n***Vérifiez la syntaxe des affectations et des conditions***\n"));  
-QVariant data;
-if (ui.checkBoxPasAPas->isChecked()) data=page->mainFrame()->evaluateJavaScript("ALGOBOX_ALGO(true);");
-else data=page->mainFrame()->evaluateJavaScript("ALGOBOX_ALGO(false);");
+ui.textEdit->insertPlainText(QString::fromUtf8("***Lancement de l'algorithme***"));
+//ui.textEdit->insertPlainText(QString::fromUtf8("***L'algorithme contient une erreur : impossible de le lancer***\n***Vérifiez la syntaxe des affectations et des conditions***\n"));  
+if (ui.checkBoxPasAPas->isChecked()) page->runJavaScript("ALGOBOX_ALGO(true);");
+else page->runJavaScript("ALGOBOX_ALGO(false);");
 }
 
 void BrowserDialog::ContinuerPasAPas()
@@ -231,9 +249,8 @@ page->continuer();
 void BrowserDialog::StopperPasAPas()
 {
 ui.labelProcess->hide();
-QVariant data;
 if (ui.suivantButton->isEnabled()) page->arreter();
-else data=page->mainFrame()->evaluateJavaScript("ALGOBOX_EMERGENCY_STOP=true;");
+else page->runJavaScript("ALGOBOX_EMERGENCY_STOP=true;");
 }
 
 void BrowserDialog::scriptDebutPause()
@@ -249,3 +266,14 @@ ui.suivantButton->setEnabled(false);
 ui.labelProcess->show();
 //ui.stopButton->setEnabled(false);
 }
+
+void BrowserDialog::finishLoading(bool)
+{
+ui.testerButton->setEnabled(true);
+ui.checkBoxPasAPas->setEnabled(true);
+ui.suivantButton->setEnabled(false);
+ui.stopButton->setEnabled(false);
+ui.pdfButton->setEnabled(true);
+raise();
+show();
+}
diff --git a/browserdialog.h b/browserdialog.h
index cba7385..1580c3e 100644
--- a/browserdialog.h
+++ b/browserdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -24,7 +24,6 @@ public:
 	Ui::BrowserDialog ui;
 	AlgoWebPage* page;
 public slots:
-void populateJavaScriptWindowObject();
 void scriptAfficher(QString msg,bool newline);
 void scriptAfficherVariables(QString msg,bool newline);
 void scriptLaunched();
@@ -39,6 +38,8 @@ void scriptFinPause();
 private slots:
 void closeEvent(QCloseEvent *e);
 void accept();
+protected slots:
+void finishLoading(bool);
 private:
 ConsoleHighlighter *highlighter;
 LogHighlighter *highlighterPas;
diff --git a/browserdialog.ui b/browserdialog.ui
index 9c8100b..2a39744 100644
--- a/browserdialog.ui
+++ b/browserdialog.ui
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>860</width>
-    <height>569</height>
+    <height>586</height>
    </rect>
   </property>
   <property name="contextMenuPolicy">
@@ -514,21 +514,10 @@
          </property>
         </widget>
        </item>
-       <item row="5" column="0" colspan="3">
-        <widget class="QPushButton" name="imprimerButton">
-         <property name="text">
-          <string>Imprimer</string>
-         </property>
-         <property name="icon">
-          <iconset resource="algobox.qrc">
-           <normaloff>:/images/imprimer.png</normaloff>:/images/imprimer.png</iconset>
-         </property>
-        </widget>
-       </item>
-       <item row="6" column="0" colspan="3">
+       <item row="4" column="0" colspan="3">
         <widget class="QPushButton" name="pdfButton">
          <property name="text">
-          <string>Exporter en Pdf</string>
+          <string>Imprimer (pdf)</string>
          </property>
          <property name="icon">
           <iconset resource="algobox.qrc">
@@ -536,7 +525,7 @@
          </property>
         </widget>
        </item>
-       <item row="8" column="0" colspan="3">
+       <item row="6" column="0" colspan="3">
         <widget class="QPushButton" name="fermerButton">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@@ -567,14 +556,7 @@
          </property>
         </widget>
        </item>
-       <item row="4" column="0" colspan="3">
-        <widget class="Line" name="line_2">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-        </widget>
-       </item>
-       <item row="7" column="0" colspan="3">
+       <item row="5" column="0" colspan="3">
         <widget class="Line" name="line">
          <property name="orientation">
           <enum>Qt::Horizontal</enum>
diff --git a/commentairedialog.cpp b/commentairedialog.cpp
index a238d58..b41fa97 100644
--- a/commentairedialog.cpp
+++ b/commentairedialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/commentairedialog.h b/commentairedialog.h
index b629a93..f5c5948 100644
--- a/commentairedialog.h
+++ b/commentairedialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/conditiondialog.cpp b/conditiondialog.cpp
index b3c4c40..c774970 100644
--- a/conditiondialog.cpp
+++ b/conditiondialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/conditiondialog.h b/conditiondialog.h
index db5f948..4eaffa5 100644
--- a/conditiondialog.h
+++ b/conditiondialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/configdialog.cpp b/configdialog.cpp
index 775409a..2d770bf 100644
--- a/configdialog.cpp
+++ b/configdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/configdialog.h b/configdialog.h
index 1a22428..1c458fe 100644
--- a/configdialog.h
+++ b/configdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/configdialog.ui b/configdialog.ui
index 023df07..b1e7b84 100644
--- a/configdialog.ui
+++ b/configdialog.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>448</width>
-    <height>186</height>
+    <width>450</width>
+    <height>245</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -23,14 +23,21 @@
        </property>
       </widget>
      </item>
-     <item row="1" column="0">
+     <item row="4" column="0">
+      <widget class="QLabel" name="labelAffichage">
+       <property name="text">
+        <string>Nombre maximal d'affichage dans la console</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="0">
       <widget class="QLabel" name="labelBoucle">
        <property name="text">
         <string>Nombre maximal d'itérations pour une boucle</string>
        </property>
       </widget>
      </item>
-     <item row="1" column="1">
+     <item row="2" column="1">
       <widget class="QSpinBox" name="spinBoxBoucle">
        <property name="minimum">
         <number>100000</number>
@@ -43,14 +50,7 @@
        </property>
       </widget>
      </item>
-     <item row="2" column="0">
-      <widget class="QLabel" name="labelTotal">
-       <property name="text">
-        <string>Nombre maximal d'itérations pour tout l'algorithme</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1">
+     <item row="3" column="1">
       <widget class="QSpinBox" name="spinBoxTotal">
        <property name="minimum">
         <number>1000000</number>
@@ -64,13 +64,20 @@
       </widget>
      </item>
      <item row="3" column="0">
-      <widget class="QLabel" name="labelAffichage">
+      <widget class="QLabel" name="labelTotal">
        <property name="text">
-        <string>Nombre maximal d'affichage dans la console</string>
+        <string>Nombre maximal d'itérations pour tout l'algorithme</string>
        </property>
       </widget>
      </item>
-     <item row="3" column="1">
+     <item row="5" column="0">
+      <widget class="QLabel" name="label_ligne">
+       <property name="text">
+        <string>Epaisseur des lignes</string>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="1">
       <widget class="QSpinBox" name="spinBoxAffichage">
        <property name="minimum">
         <number>1000</number>
@@ -83,6 +90,56 @@
        </property>
       </widget>
      </item>
+     <item row="5" column="1">
+      <widget class="QSpinBox" name="spinBoxLigne">
+       <property name="minimum">
+        <number>1</number>
+       </property>
+       <property name="maximum">
+        <number>5</number>
+       </property>
+       <property name="value">
+        <number>2</number>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="0">
+      <widget class="QLabel" name="label_point">
+       <property name="text">
+        <string>Epaisseur des points</string>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="1">
+      <widget class="QSpinBox" name="spinBoxPoint">
+       <property name="minimum">
+        <number>1</number>
+       </property>
+       <property name="maximum">
+        <number>5</number>
+       </property>
+       <property name="value">
+        <number>2</number>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <widget class="QLabel" name="label_decimales">
+       <property name="text">
+        <string>Nombre de décimales affichées</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="QSpinBox" name="spinBoxDecimales">
+       <property name="minimum">
+        <number>8</number>
+       </property>
+       <property name="maximum">
+        <number>12</number>
+       </property>
+      </widget>
+     </item>
     </layout>
    </item>
    <item>
diff --git a/consoledialog.cpp b/consoledialog.cpp
index 167dec5..becedef 100644
--- a/consoledialog.cpp
+++ b/consoledialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/consoledialog.h b/consoledialog.h
index 911e4a2..e28a96d 100644
--- a/consoledialog.h
+++ b/consoledialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/consolehighlighter.cpp b/consolehighlighter.cpp
index 52476f7..dbc4859 100644
--- a/consolehighlighter.cpp
+++ b/consolehighlighter.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/consolehighlighter.h b/consolehighlighter.h
index 04c8587..8a37d3e 100644
--- a/consolehighlighter.h
+++ b/consolehighlighter.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2012 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a0134b5
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+algobox (1.0.1) stable; urgency=low
+
+  * New Release.
+
+ -- Pascal Brachet <pbrachet at xm1math.net>  Wed, 26 Jul 2017 00:00:00 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..ec925e6
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,11 @@
+Source: algobox
+Section: education
+Priority: extra
+Maintainer: Pascal Brachet <pbrachet at xm1math.net>
+Build-Depends: debhelper (>= 7.0.50~), g++, qtbase5-dev,qt5-qmake,qtbase5-dev-tools,pkg-config,qtdeclarative5-dev,qtwebengine5-dev,qtpositioning5-dev,libqt5opengl5-dev
+
+Package: algobox
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Logiciel d'algorithmique
+ Algobox est un logiciel d'initiation à l'algorithmique au niveau lycée.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..990c444
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,29 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: algobox
+Source: http://xm1math.net/algobox
+
+Files: *
+Copyright: 2009-2017 Pascal Brachet <pbrachet at xm1math.net>
+License: GPL-2.0+
+
+Files: debian/*
+Copyright: 2009-2017 Pascal Brachet <pbrachet at xm1math.net>
+License: GPL-2.0+
+
+License: GPL-2.0+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..139597f
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100644
index 0000000..d020695
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+export QT_SELECT := qt5
+
+%:
+	dh $@ 
+
+
+	
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/documents/completion.txt b/documents/completion.txt
index fc145fd..af4b184 100644
--- a/documents/completion.txt
+++ b/documents/completion.txt
@@ -2,14 +2,18 @@ AFFICHER •
 AFFICHER* •
 AFFICHERCALCUL •
 AFFICHERCALCUL* •
+APPELER_FONCTION •
 DEBUT_ALGORITHME
+DEBUT_FONCTION
 DEBUT_POUR
 DEBUT_SI
 DEBUT_SINON
 DEBUT_TANT_QUE
 CHAINE
 EST_DU_TYPE •
+FONCTION • (•)
 FIN_ALGORITHME
+FIN_FONCTION
 FIN_POUR
 FIN_SI
 FIN_SINON
@@ -20,6 +24,7 @@ NOMBRE
 PAUSE
 POUR • ALLANT_DE • A •  
 PREND_LA_VALEUR •
+RENVOYER •
 SI (•) ALORS
 SINON
 TANT_QUE (•) FAIRE
@@ -55,4 +60,4 @@ ALGOBOX_MINIMUM(•,•,•)
 ALGOBOX_MAXIMUM(•,•,•)
 ALGOBOX_POS_MINIMUM(•,•,•)
 ALGOBOX_POS_MAXIMUM(•,•,•)
-ALGOBOX_ARRONDIR(•,•)
\ No newline at end of file
+ALGOBOX_ARRONDIR(•,•)
diff --git a/documents/interdits.txt b/documents/interdits.txt
index 8926251..4bbc313 100644
--- a/documents/interdits.txt
+++ b/documents/interdits.txt
@@ -2,7 +2,12 @@ CONTINUE
 CASE
 F1
 F2
+FONCTION
+RENVOYER
+DEBUT_FONCTION
+FIN_FONCTION
 VARIABLES
+VARIABLES_FONCTION
 DEBUT
 FIN
 DEBUT_SI
diff --git a/documents/modeleexportweb.txt b/documents/modeleexportweb.txt
index 646ef10..e643854 100644
--- a/documents/modeleexportweb.txt
+++ b/documents/modeleexportweb.txt
@@ -584,7 +584,7 @@ if (isNaN(u)) result="Erreur";
 else 
 	{
 	if (u<0) negatif=true;
-	r=Math.abs(u).toPrecision(8);
+	r=Math.abs(u).toPrecision(#NB_DECIMALES_AFFICHEES#);
 	if (r.lastIndexOf("e")>0)
 	  {
 	  m=r.substring(0,r.lastIndexOf("e"));
@@ -660,7 +660,7 @@ if (ALGOBOX_coul==9)
 {
 ALGOBOX_contexte.globalCompositeOperation = "destination-out";
 ALGOBOX_contexte.beginPath();
-ALGOBOX_contexte.lineWidth=4;
+ALGOBOX_contexte.lineWidth=2*#LINEWIDTH#;
 ALGOBOX_contexte.strokeStyle="rgba(0,0,0,1)";
 ALGOBOX_contexte.fillStyle="rgba(0,0,0,1)";
 ALGOBOX_contexte.moveTo(Math.round(ALGOBOX_HX(ALGOBOX_X))+2,Math.round(ALGOBOX_HY(ALGOBOX_Y))+2);
@@ -680,19 +680,19 @@ else ALGOBOX_contexte.beginPath();
     break;
     case 1:
     ALGOBOX_contexte.strokeStyle="black";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 2:
     ALGOBOX_contexte.strokeStyle="#4040FF";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 3:
     ALGOBOX_contexte.strokeStyle="#FF420E";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 4:
     ALGOBOX_contexte.strokeStyle="#00CC00";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 5:
     ALGOBOX_contexte_repere.strokeStyle="black";
@@ -795,7 +795,7 @@ if (ALGOBOX_DEDANS(ALGOBOX_code))
       ALGOBOX_contexte.globalCompositeOperation = "destination-out";
       ALGOBOX_contexte.beginPath();
       ALGOBOX_contexte.fillStyle="rgba(0,0,0,1)";
-      ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, 2, 0, Math.PI*2, true);
+      ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, #POINTWIDTH#, 0, Math.PI*2, true);
       ALGOBOX_contexte.closePath();
       ALGOBOX_contexte.fill();
       ALGOBOX_contexte.globalCompositeOperation = "source-over";
@@ -830,7 +830,7 @@ if (ALGOBOX_DEDANS(ALGOBOX_code))
 	}
 	else
 	{
-	ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, 2, 0, Math.PI*2, true);
+	ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, #POINTWIDTH#, 0, Math.PI*2, true);
 	ALGOBOX_contexte.closePath();
 	ALGOBOX_contexte.fill();
 	}
diff --git a/documents/modelelatex.txt b/documents/modelelatex.txt
index 1329fdc..c05debb 100644
--- a/documents/modelelatex.txt
+++ b/documents/modelelatex.txt
@@ -24,6 +24,7 @@
 \fancyfoot[C]{\small \texttt{Généré par Algobox le #DATE#} }
 \pagestyle{fancy}
 %ALGO
+\definecolor{fctcolor}{RGB}{154,77,0}
 \definecolor{fond}{RGB}{136,136,136}
 \definecolor{sicolor}{RGB}{128,0,128}
 \definecolor{tantquecolor}{RGB}{221,111,6}
@@ -46,10 +47,12 @@
 \def\printandpush{\printindent\pushindent}%
 \def\popandprint{\popindent\printindent}%
 \def\Variables{\Ligne \textcolor{bloccolor}{\textbf{VARIABLES}}}
+\def\Fonctions{\Ligne \textcolor{fctcolor}{\textbf{FONCTIONS\_UTILISEES}}}
 \def\Si#1{\Ligne \textcolor{sicolor}{\textbf{SI}} #1 \textcolor{sicolor}{\textbf{ALORS}}}%
 \def\Sinon{\Ligne \textcolor{sicolor}{\textbf{SINON}}}%
 \def\Pour#1#2#3{\Ligne \textcolor{pourcolor}{\textbf{POUR}} #1 \textcolor{pourcolor}{\textbf{ALLANT\_DE}} #2 \textcolor{pourcolor}{\textbf{A}} #3}%
 \def\Tantque#1{\Ligne \textcolor{tantquecolor}{\textbf{TANT\_QUE}} #1 \textcolor{tantquecolor}{\textbf{FAIRE}}}%
+\def\Fct#1{\Ligne \textcolor{fctcolor}{\textbf{FONCTION}} \textbf{#1}}%
 \algdef{SE}[WHILE]{DebutTantQue}{FinTantQue}
   {\pushindent \printindent  \textcolor{tantquecolor}{\textbf{DEBUT\_TANT\_QUE}}}
   {\printindent \popindent  \textcolor{tantquecolor}{\textbf{FIN\_TANT\_QUE}}}%
@@ -65,6 +68,9 @@
 \algdef{SE}[PROCEDURE]{DebutAlgo}{FinAlgo}
    {\printandpush \textcolor{bloccolor}{\textbf{DEBUT\_ALGORITHME}}}%
    {\popandprint \textcolor{bloccolor}{\textbf{FIN\_ALGORITHME}}}%
+\algdef{SE}[PROCEDURE]{DebutFonction}{FinFonction}
+   {\printandpush \textcolor{fctcolor}{\textbf{DEBUT\_FONCTION}}}%
+   {\popandprint \textcolor{fctcolor}{\textbf{FIN\_FONCTION}}}%   
 \makeatother
 \newenvironment{algobox}%
 {%
@@ -84,4 +90,4 @@
 \begin{algobox}
 #CODE#
 \end{algobox}
-\end{document}
\ No newline at end of file
+\end{document}
diff --git a/documents/modelepageweb.txt b/documents/modelepageweb.txt
index db74aa8..f8f2124 100644
--- a/documents/modelepageweb.txt
+++ b/documents/modelepageweb.txt
@@ -123,7 +123,431 @@ padding: 0;
 }
 
 </style>
+<script type="text/javascript">
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info at kdab.com, author Milian Wolff <milian.wolff at kdab.com>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWebChannel module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+"use strict";
+
+var QWebChannelMessageTypes = {
+    signal: 1,
+    propertyUpdate: 2,
+    init: 3,
+    idle: 4,
+    debug: 5,
+    invokeMethod: 6,
+    connectToSignal: 7,
+    disconnectFromSignal: 8,
+    setProperty: 9,
+    response: 10,
+};
+
+var QWebChannel = function(transport, initCallback)
+{
+    if (typeof transport !== "object" || typeof transport.send !== "function") {
+        console.error("The QWebChannel expects a transport object with a send function and onmessage callback property." +
+                      " Given is: transport: " + typeof(transport) + ", transport.send: " + typeof(transport.send));
+        return;
+    }
+
+    var channel = this;
+    this.transport = transport;
+
+    this.send = function(data)
+    {
+        if (typeof(data) !== "string") {
+            data = JSON.stringify(data);
+        }
+        channel.transport.send(data);
+    }
+
+    this.transport.onmessage = function(message)
+    {
+        var data = message.data;
+        if (typeof data === "string") {
+            data = JSON.parse(data);
+        }
+        switch (data.type) {
+            case QWebChannelMessageTypes.signal:
+                channel.handleSignal(data);
+                break;
+            case QWebChannelMessageTypes.response:
+                channel.handleResponse(data);
+                break;
+            case QWebChannelMessageTypes.propertyUpdate:
+                channel.handlePropertyUpdate(data);
+                break;
+            default:
+                console.error("invalid message received:", message.data);
+                break;
+        }
+    }
+
+    this.execCallbacks = {};
+    this.execId = 0;
+    this.exec = function(data, callback)
+    {
+        if (!callback) {
+            // if no callback is given, send directly
+            channel.send(data);
+            return;
+        }
+        if (channel.execId === Number.MAX_VALUE) {
+            // wrap
+            channel.execId = Number.MIN_VALUE;
+        }
+        if (data.hasOwnProperty("id")) {
+            console.error("Cannot exec message with property id: " + JSON.stringify(data));
+            return;
+        }
+        data.id = channel.execId++;
+        channel.execCallbacks[data.id] = callback;
+        channel.send(data);
+    };
+
+    this.objects = {};
+
+    this.handleSignal = function(message)
+    {
+        var object = channel.objects[message.object];
+        if (object) {
+            object.signalEmitted(message.signal, message.args);
+        } else {
+            console.warn("Unhandled signal: " + message.object + "::" + message.signal);
+        }
+    }
+
+    this.handleResponse = function(message)
+    {
+        if (!message.hasOwnProperty("id")) {
+            console.error("Invalid response message received: ", JSON.stringify(message));
+            return;
+        }
+        channel.execCallbacks[message.id](message.data);
+        delete channel.execCallbacks[message.id];
+    }
+
+    this.handlePropertyUpdate = function(message)
+    {
+        for (var i in message.data) {
+            var data = message.data[i];
+            var object = channel.objects[data.object];
+            if (object) {
+                object.propertyUpdate(data.signals, data.properties);
+            } else {
+                console.warn("Unhandled property update: " + data.object + "::" + data.signal);
+            }
+        }
+        channel.exec({type: QWebChannelMessageTypes.idle});
+    }
+
+    this.debug = function(message)
+    {
+        channel.send({type: QWebChannelMessageTypes.debug, data: message});
+    };
+
+    channel.exec({type: QWebChannelMessageTypes.init}, function(data) {
+        for (var objectName in data) {
+            var object = new QObject(objectName, data[objectName], channel);
+        }
+        // now unwrap properties, which might reference other registered objects
+        for (var objectName in channel.objects) {
+            channel.objects[objectName].unwrapProperties();
+        }
+        if (initCallback) {
+            initCallback(channel);
+        }
+        channel.exec({type: QWebChannelMessageTypes.idle});
+    });
+};
+
+function QObject(name, data, webChannel)
+{
+    this.__id__ = name;
+    webChannel.objects[name] = this;
+
+    // List of callbacks that get invoked upon signal emission
+    this.__objectSignals__ = {};
+
+    // Cache of all properties, updated when a notify signal is emitted
+    this.__propertyCache__ = {};
+
+    var object = this;
+
+    // ----------------------------------------------------------------------
+
+    this.unwrapQObject = function(response)
+    {
+        if (response instanceof Array) {
+            // support list of objects
+            var ret = new Array(response.length);
+            for (var i = 0; i < response.length; ++i) {
+                ret[i] = object.unwrapQObject(response[i]);
+            }
+            return ret;
+        }
+        if (!response
+            || !response["__QObject*__"]
+            || response.id === undefined) {
+            return response;
+        }
+
+        var objectId = response.id;
+        if (webChannel.objects[objectId])
+            return webChannel.objects[objectId];
+
+        if (!response.data) {
+            console.error("Cannot unwrap unknown QObject " + objectId + " without data.");
+            return;
+        }
+
+        var qObject = new QObject( objectId, response.data, webChannel );
+        qObject.destroyed.connect(function() {
+            if (webChannel.objects[objectId] === qObject) {
+                delete webChannel.objects[objectId];
+                // reset the now deleted QObject to an empty {} object
+                // just assigning {} though would not have the desired effect, but the
+                // below also ensures all external references will see the empty map
+                // NOTE: this detour is necessary to workaround QTBUG-40021
+                var propertyNames = [];
+                for (var propertyName in qObject) {
+                    propertyNames.push(propertyName);
+                }
+                for (var idx in propertyNames) {
+                    delete qObject[propertyNames[idx]];
+                }
+            }
+        });
+        // here we are already initialized, and thus must directly unwrap the properties
+        qObject.unwrapProperties();
+        return qObject;
+    }
+
+    this.unwrapProperties = function()
+    {
+        for (var propertyIdx in object.__propertyCache__) {
+            object.__propertyCache__[propertyIdx] = object.unwrapQObject(object.__propertyCache__[propertyIdx]);
+        }
+    }
+
+    function addSignal(signalData, isPropertyNotifySignal)
+    {
+        var signalName = signalData[0];
+        var signalIndex = signalData[1];
+        object[signalName] = {
+            connect: function(callback) {
+                if (typeof(callback) !== "function") {
+                    console.error("Bad callback given to connect to signal " + signalName);
+                    return;
+                }
+
+                object.__objectSignals__[signalIndex] = object.__objectSignals__[signalIndex] || [];
+                object.__objectSignals__[signalIndex].push(callback);
+
+                if (!isPropertyNotifySignal && signalName !== "destroyed") {
+                    // only required for "pure" signals, handled separately for properties in propertyUpdate
+                    // also note that we always get notified about the destroyed signal
+                    webChannel.exec({
+                        type: QWebChannelMessageTypes.connectToSignal,
+                        object: object.__id__,
+                        signal: signalIndex
+                    });
+                }
+            },
+            disconnect: function(callback) {
+                if (typeof(callback) !== "function") {
+                    console.error("Bad callback given to disconnect from signal " + signalName);
+                    return;
+                }
+                object.__objectSignals__[signalIndex] = object.__objectSignals__[signalIndex] || [];
+                var idx = object.__objectSignals__[signalIndex].indexOf(callback);
+                if (idx === -1) {
+                    console.error("Cannot find connection of signal " + signalName + " to " + callback.name);
+                    return;
+                }
+                object.__objectSignals__[signalIndex].splice(idx, 1);
+                if (!isPropertyNotifySignal && object.__objectSignals__[signalIndex].length === 0) {
+                    // only required for "pure" signals, handled separately for properties in propertyUpdate
+                    webChannel.exec({
+                        type: QWebChannelMessageTypes.disconnectFromSignal,
+                        object: object.__id__,
+                        signal: signalIndex
+                    });
+                }
+            }
+        };
+    }
+
+    /**
+     * Invokes all callbacks for the given signalname. Also works for property notify callbacks.
+     */
+    function invokeSignalCallbacks(signalName, signalArgs)
+    {
+        var connections = object.__objectSignals__[signalName];
+        if (connections) {
+            connections.forEach(function(callback) {
+                callback.apply(callback, signalArgs);
+            });
+        }
+    }
+
+    this.propertyUpdate = function(signals, propertyMap)
+    {
+        // update property cache
+        for (var propertyIndex in propertyMap) {
+            var propertyValue = propertyMap[propertyIndex];
+            object.__propertyCache__[propertyIndex] = propertyValue;
+        }
+
+        for (var signalName in signals) {
+            // Invoke all callbacks, as signalEmitted() does not. This ensures the
+            // property cache is updated before the callbacks are invoked.
+            invokeSignalCallbacks(signalName, signals[signalName]);
+        }
+    }
+
+    this.signalEmitted = function(signalName, signalArgs)
+    {
+        invokeSignalCallbacks(signalName, signalArgs);
+    }
+
+    function addMethod(methodData)
+    {
+        var methodName = methodData[0];
+        var methodIdx = methodData[1];
+        object[methodName] = function() {
+            var args = [];
+            var callback;
+            for (var i = 0; i < arguments.length; ++i) {
+                if (typeof arguments[i] === "function")
+                    callback = arguments[i];
+                else
+                    args.push(arguments[i]);
+            }
+
+            webChannel.exec({
+                "type": QWebChannelMessageTypes.invokeMethod,
+                "object": object.__id__,
+                "method": methodIdx,
+                "args": args
+            }, function(response) {
+                if (response !== undefined) {
+                    var result = object.unwrapQObject(response);
+                    if (callback) {
+                        (callback)(result);
+                    }
+                }
+            });
+        };
+    }
+
+    function bindGetterSetter(propertyInfo)
+    {
+        var propertyIndex = propertyInfo[0];
+        var propertyName = propertyInfo[1];
+        var notifySignalData = propertyInfo[2];
+        // initialize property cache with current value
+        // NOTE: if this is an object, it is not directly unwrapped as it might
+        // reference other QObject that we do not know yet
+        object.__propertyCache__[propertyIndex] = propertyInfo[3];
+
+        if (notifySignalData) {
+            if (notifySignalData[0] === 1) {
+                // signal name is optimized away, reconstruct the actual name
+                notifySignalData[0] = propertyName + "Changed";
+            }
+            addSignal(notifySignalData, true);
+        }
+
+        Object.defineProperty(object, propertyName, {
+            configurable: true,
+            get: function () {
+                var propertyValue = object.__propertyCache__[propertyIndex];
+                if (propertyValue === undefined) {
+                    // This shouldn't happen
+                    console.warn("Undefined value in property cache for property \"" + propertyName + "\" in object " + object.__id__);
+                }
+
+                return propertyValue;
+            },
+            set: function(value) {
+                if (value === undefined) {
+                    console.warn("Property setter for " + propertyName + " called with undefined value!");
+                    return;
+                }
+                object.__propertyCache__[propertyIndex] = value;
+                webChannel.exec({
+                    "type": QWebChannelMessageTypes.setProperty,
+                    "object": object.__id__,
+                    "property": propertyIndex,
+                    "value": value
+                });
+            }
+        });
+
+    }
+
+    // ----------------------------------------------------------------------
+
+    data.methods.forEach(addMethod);
+
+    data.properties.forEach(bindGetterSetter);
+
+    data.signals.forEach(function(signal) { addSignal(signal, false); });
+
+    for (var name in data.enums) {
+        object[name] = data.enums[name];
+    }
+}
+
+//required for use with nodejs
+if (typeof module === 'object') {
+    module.exports = {
+        QWebChannel: QWebChannel
+    };
+}
+
+
+
+
+
+</script>
+
 <script language="JavaScript">
+        new QWebChannel(qt.webChannelTransport, function (channel) {
+                    browserDialog = channel.objects.BrowserDialog;
+            });
 /***************************************************************************
  *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
  *   with the collaboration of Joël Amblard                                *
@@ -584,7 +1008,7 @@ if (isNaN(u)) result="Erreur";
 else 
 	{
 	if (u<0) negatif=true;
-	r=String(Math.abs(u).toPrecision(8));
+	r=String(Math.abs(u).toPrecision(#NB_DECIMALES_AFFICHEES#));
 	if (r.lastIndexOf("e")>0)
 	  {
 	  m=r.substring(0,r.lastIndexOf("e"));
@@ -660,7 +1084,7 @@ if (ALGOBOX_coul==9)
 {
 ALGOBOX_contexte.globalCompositeOperation = "destination-out";
 ALGOBOX_contexte.beginPath();
-ALGOBOX_contexte.lineWidth=4;
+ALGOBOX_contexte.lineWidth=2*#LINEWIDTH#;
 ALGOBOX_contexte.strokeStyle="rgba(0,0,0,1)";
 ALGOBOX_contexte.fillStyle="rgba(0,0,0,1)";
 ALGOBOX_contexte.moveTo(Math.round(ALGOBOX_HX(ALGOBOX_X))+2,Math.round(ALGOBOX_HY(ALGOBOX_Y))+2);
@@ -680,19 +1104,19 @@ else ALGOBOX_contexte.beginPath();
     break;
     case 1:
     ALGOBOX_contexte.strokeStyle="black";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 2:
     ALGOBOX_contexte.strokeStyle="#4040FF";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 3:
     ALGOBOX_contexte.strokeStyle="#FF420E";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 4:
     ALGOBOX_contexte.strokeStyle="#00CC00";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 5:
     ALGOBOX_contexte_repere.strokeStyle="black";
@@ -795,7 +1219,7 @@ if (ALGOBOX_DEDANS(ALGOBOX_code))
       ALGOBOX_contexte.globalCompositeOperation = "destination-out";
       ALGOBOX_contexte.beginPath();
       ALGOBOX_contexte.fillStyle="rgba(0,0,0,1)";
-      ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, 2, 0, Math.PI*2, true);
+      ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, #POINTWIDTH#, 0, Math.PI*2, true);
       ALGOBOX_contexte.closePath();
       ALGOBOX_contexte.fill();
       ALGOBOX_contexte.globalCompositeOperation = "source-over";
@@ -830,7 +1254,7 @@ if (ALGOBOX_DEDANS(ALGOBOX_code))
 	}
 	else
 	{
-	ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, 2, 0, Math.PI*2, true);
+	ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2,#POINTWIDTH#, 0, Math.PI*2, true);
 	ALGOBOX_contexte.closePath();
 	ALGOBOX_contexte.fill();
 	}
diff --git a/documents/modelepagewebmac.txt b/documents/modelepagewebmac.txt
index 989801f..3359d3a 100644
--- a/documents/modelepagewebmac.txt
+++ b/documents/modelepagewebmac.txt
@@ -20,7 +20,7 @@ A:hover   { color:red; font-weight: bold; text-decoration: none;}
 textarea
 {
 border-width : 1px;
-font-family :  'Monaco', 'Courier New', monospace; 
+font-family :  'Monaco', 'Courier New', monospace;
 background : #f6f6f6;
 padding : .1em .3em;
 border-color : #000;
@@ -97,7 +97,7 @@ LEGEND A
     color: #111111;
     line-height: 120%;
     font-size: 10pt;
-    font-family :  'Monaco', 'Courier New', monospace; 
+    font-family :  'Monaco', 'Courier New', monospace;
 }
 
 .graphique
@@ -105,7 +105,7 @@ LEGEND A
     padding: 1px 15px;
     color: #111111;
     font-size: 10pt;
-    font-family :  'Monaco', 'Courier New', monospace; 
+    font-family :  'Monaco', 'Courier New', monospace;
 }
 
 .output
@@ -118,12 +118,436 @@ LEGEND A
 .output pre 
 {
 margin: 0;
-font-family: 'Monaco', 'Courier New', monospace; 
+font-family: 'Monaco', 'Courier New', monospace;
 padding: 0;
 }
 
 </style>
+<script type="text/javascript">
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info at kdab.com, author Milian Wolff <milian.wolff at kdab.com>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWebChannel module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+"use strict";
+
+var QWebChannelMessageTypes = {
+    signal: 1,
+    propertyUpdate: 2,
+    init: 3,
+    idle: 4,
+    debug: 5,
+    invokeMethod: 6,
+    connectToSignal: 7,
+    disconnectFromSignal: 8,
+    setProperty: 9,
+    response: 10,
+};
+
+var QWebChannel = function(transport, initCallback)
+{
+    if (typeof transport !== "object" || typeof transport.send !== "function") {
+        console.error("The QWebChannel expects a transport object with a send function and onmessage callback property." +
+                      " Given is: transport: " + typeof(transport) + ", transport.send: " + typeof(transport.send));
+        return;
+    }
+
+    var channel = this;
+    this.transport = transport;
+
+    this.send = function(data)
+    {
+        if (typeof(data) !== "string") {
+            data = JSON.stringify(data);
+        }
+        channel.transport.send(data);
+    }
+
+    this.transport.onmessage = function(message)
+    {
+        var data = message.data;
+        if (typeof data === "string") {
+            data = JSON.parse(data);
+        }
+        switch (data.type) {
+            case QWebChannelMessageTypes.signal:
+                channel.handleSignal(data);
+                break;
+            case QWebChannelMessageTypes.response:
+                channel.handleResponse(data);
+                break;
+            case QWebChannelMessageTypes.propertyUpdate:
+                channel.handlePropertyUpdate(data);
+                break;
+            default:
+                console.error("invalid message received:", message.data);
+                break;
+        }
+    }
+
+    this.execCallbacks = {};
+    this.execId = 0;
+    this.exec = function(data, callback)
+    {
+        if (!callback) {
+            // if no callback is given, send directly
+            channel.send(data);
+            return;
+        }
+        if (channel.execId === Number.MAX_VALUE) {
+            // wrap
+            channel.execId = Number.MIN_VALUE;
+        }
+        if (data.hasOwnProperty("id")) {
+            console.error("Cannot exec message with property id: " + JSON.stringify(data));
+            return;
+        }
+        data.id = channel.execId++;
+        channel.execCallbacks[data.id] = callback;
+        channel.send(data);
+    };
+
+    this.objects = {};
+
+    this.handleSignal = function(message)
+    {
+        var object = channel.objects[message.object];
+        if (object) {
+            object.signalEmitted(message.signal, message.args);
+        } else {
+            console.warn("Unhandled signal: " + message.object + "::" + message.signal);
+        }
+    }
+
+    this.handleResponse = function(message)
+    {
+        if (!message.hasOwnProperty("id")) {
+            console.error("Invalid response message received: ", JSON.stringify(message));
+            return;
+        }
+        channel.execCallbacks[message.id](message.data);
+        delete channel.execCallbacks[message.id];
+    }
+
+    this.handlePropertyUpdate = function(message)
+    {
+        for (var i in message.data) {
+            var data = message.data[i];
+            var object = channel.objects[data.object];
+            if (object) {
+                object.propertyUpdate(data.signals, data.properties);
+            } else {
+                console.warn("Unhandled property update: " + data.object + "::" + data.signal);
+            }
+        }
+        channel.exec({type: QWebChannelMessageTypes.idle});
+    }
+
+    this.debug = function(message)
+    {
+        channel.send({type: QWebChannelMessageTypes.debug, data: message});
+    };
+
+    channel.exec({type: QWebChannelMessageTypes.init}, function(data) {
+        for (var objectName in data) {
+            var object = new QObject(objectName, data[objectName], channel);
+        }
+        // now unwrap properties, which might reference other registered objects
+        for (var objectName in channel.objects) {
+            channel.objects[objectName].unwrapProperties();
+        }
+        if (initCallback) {
+            initCallback(channel);
+        }
+        channel.exec({type: QWebChannelMessageTypes.idle});
+    });
+};
+
+function QObject(name, data, webChannel)
+{
+    this.__id__ = name;
+    webChannel.objects[name] = this;
+
+    // List of callbacks that get invoked upon signal emission
+    this.__objectSignals__ = {};
+
+    // Cache of all properties, updated when a notify signal is emitted
+    this.__propertyCache__ = {};
+
+    var object = this;
+
+    // ----------------------------------------------------------------------
+
+    this.unwrapQObject = function(response)
+    {
+        if (response instanceof Array) {
+            // support list of objects
+            var ret = new Array(response.length);
+            for (var i = 0; i < response.length; ++i) {
+                ret[i] = object.unwrapQObject(response[i]);
+            }
+            return ret;
+        }
+        if (!response
+            || !response["__QObject*__"]
+            || response.id === undefined) {
+            return response;
+        }
+
+        var objectId = response.id;
+        if (webChannel.objects[objectId])
+            return webChannel.objects[objectId];
+
+        if (!response.data) {
+            console.error("Cannot unwrap unknown QObject " + objectId + " without data.");
+            return;
+        }
+
+        var qObject = new QObject( objectId, response.data, webChannel );
+        qObject.destroyed.connect(function() {
+            if (webChannel.objects[objectId] === qObject) {
+                delete webChannel.objects[objectId];
+                // reset the now deleted QObject to an empty {} object
+                // just assigning {} though would not have the desired effect, but the
+                // below also ensures all external references will see the empty map
+                // NOTE: this detour is necessary to workaround QTBUG-40021
+                var propertyNames = [];
+                for (var propertyName in qObject) {
+                    propertyNames.push(propertyName);
+                }
+                for (var idx in propertyNames) {
+                    delete qObject[propertyNames[idx]];
+                }
+            }
+        });
+        // here we are already initialized, and thus must directly unwrap the properties
+        qObject.unwrapProperties();
+        return qObject;
+    }
+
+    this.unwrapProperties = function()
+    {
+        for (var propertyIdx in object.__propertyCache__) {
+            object.__propertyCache__[propertyIdx] = object.unwrapQObject(object.__propertyCache__[propertyIdx]);
+        }
+    }
+
+    function addSignal(signalData, isPropertyNotifySignal)
+    {
+        var signalName = signalData[0];
+        var signalIndex = signalData[1];
+        object[signalName] = {
+            connect: function(callback) {
+                if (typeof(callback) !== "function") {
+                    console.error("Bad callback given to connect to signal " + signalName);
+                    return;
+                }
+
+                object.__objectSignals__[signalIndex] = object.__objectSignals__[signalIndex] || [];
+                object.__objectSignals__[signalIndex].push(callback);
+
+                if (!isPropertyNotifySignal && signalName !== "destroyed") {
+                    // only required for "pure" signals, handled separately for properties in propertyUpdate
+                    // also note that we always get notified about the destroyed signal
+                    webChannel.exec({
+                        type: QWebChannelMessageTypes.connectToSignal,
+                        object: object.__id__,
+                        signal: signalIndex
+                    });
+                }
+            },
+            disconnect: function(callback) {
+                if (typeof(callback) !== "function") {
+                    console.error("Bad callback given to disconnect from signal " + signalName);
+                    return;
+                }
+                object.__objectSignals__[signalIndex] = object.__objectSignals__[signalIndex] || [];
+                var idx = object.__objectSignals__[signalIndex].indexOf(callback);
+                if (idx === -1) {
+                    console.error("Cannot find connection of signal " + signalName + " to " + callback.name);
+                    return;
+                }
+                object.__objectSignals__[signalIndex].splice(idx, 1);
+                if (!isPropertyNotifySignal && object.__objectSignals__[signalIndex].length === 0) {
+                    // only required for "pure" signals, handled separately for properties in propertyUpdate
+                    webChannel.exec({
+                        type: QWebChannelMessageTypes.disconnectFromSignal,
+                        object: object.__id__,
+                        signal: signalIndex
+                    });
+                }
+            }
+        };
+    }
+
+    /**
+     * Invokes all callbacks for the given signalname. Also works for property notify callbacks.
+     */
+    function invokeSignalCallbacks(signalName, signalArgs)
+    {
+        var connections = object.__objectSignals__[signalName];
+        if (connections) {
+            connections.forEach(function(callback) {
+                callback.apply(callback, signalArgs);
+            });
+        }
+    }
+
+    this.propertyUpdate = function(signals, propertyMap)
+    {
+        // update property cache
+        for (var propertyIndex in propertyMap) {
+            var propertyValue = propertyMap[propertyIndex];
+            object.__propertyCache__[propertyIndex] = propertyValue;
+        }
+
+        for (var signalName in signals) {
+            // Invoke all callbacks, as signalEmitted() does not. This ensures the
+            // property cache is updated before the callbacks are invoked.
+            invokeSignalCallbacks(signalName, signals[signalName]);
+        }
+    }
+
+    this.signalEmitted = function(signalName, signalArgs)
+    {
+        invokeSignalCallbacks(signalName, signalArgs);
+    }
+
+    function addMethod(methodData)
+    {
+        var methodName = methodData[0];
+        var methodIdx = methodData[1];
+        object[methodName] = function() {
+            var args = [];
+            var callback;
+            for (var i = 0; i < arguments.length; ++i) {
+                if (typeof arguments[i] === "function")
+                    callback = arguments[i];
+                else
+                    args.push(arguments[i]);
+            }
+
+            webChannel.exec({
+                "type": QWebChannelMessageTypes.invokeMethod,
+                "object": object.__id__,
+                "method": methodIdx,
+                "args": args
+            }, function(response) {
+                if (response !== undefined) {
+                    var result = object.unwrapQObject(response);
+                    if (callback) {
+                        (callback)(result);
+                    }
+                }
+            });
+        };
+    }
+
+    function bindGetterSetter(propertyInfo)
+    {
+        var propertyIndex = propertyInfo[0];
+        var propertyName = propertyInfo[1];
+        var notifySignalData = propertyInfo[2];
+        // initialize property cache with current value
+        // NOTE: if this is an object, it is not directly unwrapped as it might
+        // reference other QObject that we do not know yet
+        object.__propertyCache__[propertyIndex] = propertyInfo[3];
+
+        if (notifySignalData) {
+            if (notifySignalData[0] === 1) {
+                // signal name is optimized away, reconstruct the actual name
+                notifySignalData[0] = propertyName + "Changed";
+            }
+            addSignal(notifySignalData, true);
+        }
+
+        Object.defineProperty(object, propertyName, {
+            configurable: true,
+            get: function () {
+                var propertyValue = object.__propertyCache__[propertyIndex];
+                if (propertyValue === undefined) {
+                    // This shouldn't happen
+                    console.warn("Undefined value in property cache for property \"" + propertyName + "\" in object " + object.__id__);
+                }
+
+                return propertyValue;
+            },
+            set: function(value) {
+                if (value === undefined) {
+                    console.warn("Property setter for " + propertyName + " called with undefined value!");
+                    return;
+                }
+                object.__propertyCache__[propertyIndex] = value;
+                webChannel.exec({
+                    "type": QWebChannelMessageTypes.setProperty,
+                    "object": object.__id__,
+                    "property": propertyIndex,
+                    "value": value
+                });
+            }
+        });
+
+    }
+
+    // ----------------------------------------------------------------------
+
+    data.methods.forEach(addMethod);
+
+    data.properties.forEach(bindGetterSetter);
+
+    data.signals.forEach(function(signal) { addSignal(signal, false); });
+
+    for (var name in data.enums) {
+        object[name] = data.enums[name];
+    }
+}
+
+//required for use with nodejs
+if (typeof module === 'object') {
+    module.exports = {
+        QWebChannel: QWebChannel
+    };
+}
+
+
+
+
+
+</script>
+
 <script language="JavaScript">
+        new QWebChannel(qt.webChannelTransport, function (channel) {
+                    browserDialog = channel.objects.BrowserDialog;
+            });
 /***************************************************************************
  *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
  *   with the collaboration of Joël Amblard                                *
@@ -584,7 +1008,7 @@ if (isNaN(u)) result="Erreur";
 else 
 	{
 	if (u<0) negatif=true;
-	r=String(Math.abs(u).toPrecision(8));
+	r=String(Math.abs(u).toPrecision(#NB_DECIMALES_AFFICHEES#));
 	if (r.lastIndexOf("e")>0)
 	  {
 	  m=r.substring(0,r.lastIndexOf("e"));
@@ -660,7 +1084,7 @@ if (ALGOBOX_coul==9)
 {
 ALGOBOX_contexte.globalCompositeOperation = "destination-out";
 ALGOBOX_contexte.beginPath();
-ALGOBOX_contexte.lineWidth=4;
+ALGOBOX_contexte.lineWidth=2*#LINEWIDTH#;
 ALGOBOX_contexte.strokeStyle="rgba(0,0,0,1)";
 ALGOBOX_contexte.fillStyle="rgba(0,0,0,1)";
 ALGOBOX_contexte.moveTo(Math.round(ALGOBOX_HX(ALGOBOX_X))+2,Math.round(ALGOBOX_HY(ALGOBOX_Y))+2);
@@ -680,19 +1104,19 @@ else ALGOBOX_contexte.beginPath();
     break;
     case 1:
     ALGOBOX_contexte.strokeStyle="black";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 2:
     ALGOBOX_contexte.strokeStyle="#4040FF";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 3:
     ALGOBOX_contexte.strokeStyle="#FF420E";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 4:
     ALGOBOX_contexte.strokeStyle="#00CC00";
-    ALGOBOX_contexte.lineWidth=2;
+    ALGOBOX_contexte.lineWidth=#LINEWIDTH#;
     break;
     case 5:
     ALGOBOX_contexte_repere.strokeStyle="black";
@@ -795,7 +1219,7 @@ if (ALGOBOX_DEDANS(ALGOBOX_code))
       ALGOBOX_contexte.globalCompositeOperation = "destination-out";
       ALGOBOX_contexte.beginPath();
       ALGOBOX_contexte.fillStyle="rgba(0,0,0,1)";
-      ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, 2, 0, Math.PI*2, true);
+      ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, #POINTWIDTH#, 0, Math.PI*2, true);
       ALGOBOX_contexte.closePath();
       ALGOBOX_contexte.fill();
       ALGOBOX_contexte.globalCompositeOperation = "source-over";
@@ -830,7 +1254,7 @@ if (ALGOBOX_DEDANS(ALGOBOX_code))
 	}
 	else
 	{
-	ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2, 2, 0, Math.PI*2, true);
+	ALGOBOX_contexte.arc(ALGOBOX_HX(ALGOBOX_xd)+2,ALGOBOX_HY(ALGOBOX_yd)+2,#POINTWIDTH#, 0, Math.PI*2, true);
 	ALGOBOX_contexte.closePath();
 	ALGOBOX_contexte.fill();
 	}
diff --git a/findwidget.cpp b/findwidget.cpp
index 993063d..f75c4ba 100644
--- a/findwidget.cpp
+++ b/findwidget.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/findwidget.h b/findwidget.h
index 3dfa29b..827eb9a 100644
--- a/findwidget.h
+++ b/findwidget.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/consoledialog.cpp b/fonctiondialog.cpp
similarity index 79%
copy from consoledialog.cpp
copy to fonctiondialog.cpp
index 167dec5..9d0781e 100644
--- a/consoledialog.cpp
+++ b/fonctiondialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -8,15 +8,14 @@
  *                                                                         *
  ***************************************************************************/
 
-#include "consoledialog.h"
+#include "fonctiondialog.h"
 
-
-ConsoleDialog::ConsoleDialog(QWidget *parent)
+FonctionDialog::FonctionDialog(QWidget *parent)
     :QDialog( parent)
 {
 ui.setupUi(this);
 setModal(true);
 }
 
-ConsoleDialog::~ConsoleDialog(){
+FonctionDialog::~FonctionDialog(){
 }
diff --git a/aproposdialog.h b/fonctiondialog.h
similarity index 71%
copy from aproposdialog.h
copy to fonctiondialog.h
index 56cfe4c..43bd105 100644
--- a/aproposdialog.h
+++ b/fonctiondialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -8,17 +8,17 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef APROPOSDIALOG_H
-#define APROPOSDIALOG_H
+#ifndef FONCTIONDIALOG_H
+#define FONCTIONDIALOG_H
 
-#include "ui_aproposdialog.h"
+#include "ui_fonctiondialog.h"
 
-class AproposDialog : public QDialog  {
+class FonctionDialog : public QDialog  {
    Q_OBJECT
 public:
-	AproposDialog(QWidget *parent=0);
-	~AproposDialog();
-	Ui::AproposDialog ui;
+	FonctionDialog(QWidget *parent=0);
+	~FonctionDialog();
+	Ui::FonctionDialog ui;
 };
 
 
diff --git a/fonctiondialog.ui b/fonctiondialog.ui
new file mode 100644
index 0000000..acff996
--- /dev/null
+++ b/fonctiondialog.ui
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>FonctionDialog</class>
+ <widget class="QDialog" name="FonctionDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>403</width>
+    <height>108</height>
+   </rect>
+  </property>
+  <property name="acceptDrops">
+   <bool>true</bool>
+  </property>
+  <property name="windowTitle">
+   <string>Déclarer Fonction</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="1" column="0">
+    <widget class="QLineEdit" name="lineEditNom"/>
+   </item>
+   <item row="1" column="1">
+    <widget class="QLabel" name="label_2">
+     <property name="text">
+      <string>(</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="0">
+    <widget class="QLabel" name="label_6">
+     <property name="text">
+      <string>Nom de la fonction:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QLineEdit" name="lineEditParam"/>
+   </item>
+   <item row="1" column="3">
+    <widget class="QLabel" name="label_3">
+     <property name="text">
+      <string>)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>Paramètres:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="3">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="algobox.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>FonctionDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>379</x>
+     <y>730</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>379</x>
+     <y>376</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>FonctionDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>379</x>
+     <y>730</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>379</x>
+     <y>376</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/geticon.cpp b/geticon.cpp
index cff527b..4951ea2 100644
--- a/geticon.cpp
+++ b/geticon.cpp
@@ -1,6 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2013 by Pascal Brachet                     *
- *   http://www.xm1math.net/texmaker/                                      *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -16,12 +15,10 @@ QIcon getIcon(QString name)
 QIcon dIcon=QIcon();
 QString base=name.remove(".png");
 dIcon.addFile(base+".png");
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0))
-if (qApp->devicePixelRatio()==2)
+if (qApp->devicePixelRatio()>=2)
 {
 dIcon.addFile(base+"@2x.png");
 }
-#endif
 return dIcon;
 }
 
diff --git a/geticon.h b/geticon.h
index 1e518b3..fd089d3 100644
--- a/geticon.h
+++ b/geticon.h
@@ -1,6 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2013 by Pascal Brachet                     *
- *   http://www.xm1math.net/texmaker/                                      *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/images/aide.png b/images/aide.png
index 512520e..6573d2b 100644
Binary files a/images/aide.png and b/images/aide.png differ
diff --git a/images/aide at 2x.png b/images/aide at 2x.png
index 6043909..c97e863 100644
Binary files a/images/aide at 2x.png and b/images/aide at 2x.png differ
diff --git a/images/ajouter.png b/images/ajouter.png
index 5528422..43552e7 100644
Binary files a/images/ajouter.png and b/images/ajouter.png differ
diff --git a/images/ajouter at 2x.png b/images/ajouter at 2x.png
index 7bbe499..a305431 100644
Binary files a/images/ajouter at 2x.png and b/images/ajouter at 2x.png differ
diff --git a/images/algobox128.png b/images/algobox128.png
index 34c5dc9..cc8e679 100644
Binary files a/images/algobox128.png and b/images/algobox128.png differ
diff --git a/images/algobox128 at 2x.png b/images/algobox128 at 2x.png
index 2fcb587..dcd2e8c 100644
Binary files a/images/algobox128 at 2x.png and b/images/algobox128 at 2x.png differ
diff --git a/images/algobox22.png b/images/algobox22.png
index 7467cf3..8165224 100644
Binary files a/images/algobox22.png and b/images/algobox22.png differ
diff --git a/images/algobox22 at 2x.png b/images/algobox22 at 2x.png
index c81fb8f..4a3442f 100644
Binary files a/images/algobox22 at 2x.png and b/images/algobox22 at 2x.png differ
diff --git a/images/coller.png b/images/coller.png
index 62a64d4..68f3628 100644
Binary files a/images/coller.png and b/images/coller.png differ
diff --git a/images/coller22.png b/images/coller22.png
index 61bc896..66759ba 100644
Binary files a/images/coller22.png and b/images/coller22.png differ
diff --git a/images/coller22 at 2x.png b/images/coller22 at 2x.png
index 01b4bfc..198a48b 100644
Binary files a/images/coller22 at 2x.png and b/images/coller22 at 2x.png differ
diff --git a/images/coller at 2x.png b/images/coller at 2x.png
index 66f500b..b1959ed 100644
Binary files a/images/coller at 2x.png and b/images/coller at 2x.png differ
diff --git a/images/copier.png b/images/copier.png
index c215946..a4e9ac9 100644
Binary files a/images/copier.png and b/images/copier.png differ
diff --git a/images/copier22.png b/images/copier22.png
index 92fb3b5..8bba834 100644
Binary files a/images/copier22.png and b/images/copier22.png differ
diff --git a/images/copier22 at 2x.png b/images/copier22 at 2x.png
index 2c65128..2a11b2c 100644
Binary files a/images/copier22 at 2x.png and b/images/copier22 at 2x.png differ
diff --git a/images/copier at 2x.png b/images/copier at 2x.png
index 30d3768..1d11767 100644
Binary files a/images/copier at 2x.png and b/images/copier at 2x.png differ
diff --git a/images/couper.png b/images/couper.png
index 7fc2ca2..6ac5e43 100644
Binary files a/images/couper.png and b/images/couper.png differ
diff --git a/images/couper22.png b/images/couper22.png
index d53f3fc..d2499d6 100644
Binary files a/images/couper22.png and b/images/couper22.png differ
diff --git a/images/couper22 at 2x.png b/images/couper22 at 2x.png
index 1c85e92..df6a549 100644
Binary files a/images/couper22 at 2x.png and b/images/couper22 at 2x.png differ
diff --git a/images/couper at 2x.png b/images/couper at 2x.png
index e0b3862..22120ba 100644
Binary files a/images/couper at 2x.png and b/images/couper at 2x.png differ
diff --git a/images/executer.png b/images/executer.png
index 8d62a18..ca16be2 100644
Binary files a/images/executer.png and b/images/executer.png differ
diff --git a/images/executer22.png b/images/executer22.png
index f7b734f..02ca7a1 100644
Binary files a/images/executer22.png and b/images/executer22.png differ
diff --git a/images/executer22 at 2x.png b/images/executer22 at 2x.png
index c67b66e..daa558d 100644
Binary files a/images/executer22 at 2x.png and b/images/executer22 at 2x.png differ
diff --git a/images/executer at 2x.png b/images/executer at 2x.png
index 0e2c99b..5402fae 100644
Binary files a/images/executer at 2x.png and b/images/executer at 2x.png differ
diff --git a/images/fermer.png b/images/fermer.png
index b0eb60c..5773a4c 100644
Binary files a/images/fermer.png and b/images/fermer.png differ
diff --git a/images/fermer at 2x.png b/images/fermer at 2x.png
index 2d4000b..b8b68b0 100644
Binary files a/images/fermer at 2x.png and b/images/fermer at 2x.png differ
diff --git a/images/go-next.png b/images/go-next.png
new file mode 100644
index 0000000..598c167
Binary files /dev/null and b/images/go-next.png differ
diff --git a/images/go-next at 2x.png b/images/go-next at 2x.png
new file mode 100644
index 0000000..d020711
Binary files /dev/null and b/images/go-next at 2x.png differ
diff --git a/images/go-previous.png b/images/go-previous.png
new file mode 100644
index 0000000..9d0c632
Binary files /dev/null and b/images/go-previous.png differ
diff --git a/images/go-previous at 2x.png b/images/go-previous at 2x.png
new file mode 100644
index 0000000..31e8a1a
Binary files /dev/null and b/images/go-previous at 2x.png differ
diff --git a/images/home.png b/images/home.png
index ff60729..22cfa5d 100644
Binary files a/images/home.png and b/images/home.png differ
diff --git a/images/home at 2x.png b/images/home at 2x.png
index ff60729..5e20988 100644
Binary files a/images/home at 2x.png and b/images/home at 2x.png differ
diff --git a/images/imprimer.png b/images/imprimer.png
index 44316c7..fe4910a 100644
Binary files a/images/imprimer.png and b/images/imprimer.png differ
diff --git a/images/imprimer at 2x.png b/images/imprimer at 2x.png
index 9d79dfc..2e85ab7 100644
Binary files a/images/imprimer at 2x.png and b/images/imprimer at 2x.png differ
diff --git a/images/modifier.png b/images/modifier.png
index 9d16fa4..a50b19f 100644
Binary files a/images/modifier.png and b/images/modifier.png differ
diff --git a/images/modifier at 2x.png b/images/modifier at 2x.png
index 2f29233..cf646d3 100644
Binary files a/images/modifier at 2x.png and b/images/modifier at 2x.png differ
diff --git a/images/nouveau.png b/images/nouveau.png
index 3067025..5167504 100644
Binary files a/images/nouveau.png and b/images/nouveau.png differ
diff --git a/images/nouveau22.png b/images/nouveau22.png
index c50211b..37661f2 100644
Binary files a/images/nouveau22.png and b/images/nouveau22.png differ
diff --git a/images/nouveau22 at 2x.png b/images/nouveau22 at 2x.png
index d06de79..334492d 100644
Binary files a/images/nouveau22 at 2x.png and b/images/nouveau22 at 2x.png differ
diff --git a/images/nouveau at 2x.png b/images/nouveau at 2x.png
index 8f89986..1a46faf 100644
Binary files a/images/nouveau at 2x.png and b/images/nouveau at 2x.png differ
diff --git a/images/nouvelleligne.png b/images/nouvelleligne.png
index d68c54f..6fc940b 100644
Binary files a/images/nouvelleligne.png and b/images/nouvelleligne.png differ
diff --git a/images/nouvelleligne at 2x.png b/images/nouvelleligne at 2x.png
index 2293445..76c6eaa 100644
Binary files a/images/nouvelleligne at 2x.png and b/images/nouvelleligne at 2x.png differ
diff --git a/images/ouvrir.png b/images/ouvrir.png
index 3df5144..cfe849b 100644
Binary files a/images/ouvrir.png and b/images/ouvrir.png differ
diff --git a/images/ouvrir22.png b/images/ouvrir22.png
index fa216ba..5c5b6c9 100644
Binary files a/images/ouvrir22.png and b/images/ouvrir22.png differ
diff --git a/images/ouvrir22 at 2x.png b/images/ouvrir22 at 2x.png
index 9cc7e46..3d3c2d0 100644
Binary files a/images/ouvrir22 at 2x.png and b/images/ouvrir22 at 2x.png differ
diff --git a/images/ouvrir at 2x.png b/images/ouvrir at 2x.png
index 4579436..f0a1412 100644
Binary files a/images/ouvrir at 2x.png and b/images/ouvrir at 2x.png differ
diff --git a/images/pdf.png b/images/pdf.png
index 982838e..bdfbcd2 100644
Binary files a/images/pdf.png and b/images/pdf.png differ
diff --git a/images/pdf at 2x.png b/images/pdf at 2x.png
index effa25d..543d71e 100644
Binary files a/images/pdf at 2x.png and b/images/pdf at 2x.png differ
diff --git a/images/redo22.png b/images/redo22.png
index 57f51ac..898444a 100644
Binary files a/images/redo22.png and b/images/redo22.png differ
diff --git a/images/redo22 at 2x.png b/images/redo22 at 2x.png
index 29b2c97..8ac3788 100644
Binary files a/images/redo22 at 2x.png and b/images/redo22 at 2x.png differ
diff --git a/images/sauver.png b/images/sauver.png
index 3e55634..b4adf24 100644
Binary files a/images/sauver.png and b/images/sauver.png differ
diff --git a/images/sauver22.png b/images/sauver22.png
index 8c34d7f..72600d6 100644
Binary files a/images/sauver22.png and b/images/sauver22.png differ
diff --git a/images/sauver22 at 2x.png b/images/sauver22 at 2x.png
index 7adcd72..6a0843f 100644
Binary files a/images/sauver22 at 2x.png and b/images/sauver22 at 2x.png differ
diff --git a/images/sauver at 2x.png b/images/sauver at 2x.png
index 91cf168..830874b 100644
Binary files a/images/sauver at 2x.png and b/images/sauver at 2x.png differ
diff --git a/images/sauversous.png b/images/sauversous.png
index a2071e5..49134d4 100644
Binary files a/images/sauversous.png and b/images/sauversous.png differ
diff --git a/images/sauversous at 2x.png b/images/sauversous at 2x.png
index 387d5a0..b0e4b41 100644
Binary files a/images/sauversous at 2x.png and b/images/sauversous at 2x.png differ
diff --git a/images/splash.png b/images/splash.png
new file mode 100644
index 0000000..547f934
Binary files /dev/null and b/images/splash.png differ
diff --git a/images/splash at 2x.png b/images/splash at 2x.png
new file mode 100644
index 0000000..27b73e6
Binary files /dev/null and b/images/splash at 2x.png differ
diff --git a/images/stop.png b/images/stop.png
index dd2e2a8..1404d2c 100644
Binary files a/images/stop.png and b/images/stop.png differ
diff --git a/images/stop at 2x.png b/images/stop at 2x.png
index 1a80fa3..6bd4ec7 100644
Binary files a/images/stop at 2x.png and b/images/stop at 2x.png differ
diff --git a/images/supprimer.png b/images/supprimer.png
index f62d364..e707660 100644
Binary files a/images/supprimer.png and b/images/supprimer.png differ
diff --git a/images/supprimer at 2x.png b/images/supprimer at 2x.png
index 2b93a9b..aebc01e 100644
Binary files a/images/supprimer at 2x.png and b/images/supprimer at 2x.png differ
diff --git a/images/undo22.png b/images/undo22.png
index 2adb85e..31af1c2 100644
Binary files a/images/undo22.png and b/images/undo22.png differ
diff --git a/images/undo22 at 2x.png b/images/undo22 at 2x.png
index 3e7bab0..5f330fc 100644
Binary files a/images/undo22 at 2x.png and b/images/undo22 at 2x.png differ
diff --git a/jseditor.cpp b/jseditor.cpp
index 0277146..dc4f064 100644
--- a/jseditor.cpp
+++ b/jseditor.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jseditor.h b/jseditor.h
index f813657..06b8210 100644
--- a/jseditor.h
+++ b/jseditor.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2009 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jseditorview.cpp b/jseditorview.cpp
index 4c734c6..405ee82 100644
--- a/jseditorview.cpp
+++ b/jseditorview.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jseditorview.h b/jseditorview.h
index b8b9f30..6b27000 100644
--- a/jseditorview.h
+++ b/jseditorview.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jsfindwidget.cpp b/jsfindwidget.cpp
index 84a03cb..ff29243 100644
--- a/jsfindwidget.cpp
+++ b/jsfindwidget.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jsfindwidget.h b/jsfindwidget.h
index e797595..67ca06f 100644
--- a/jsfindwidget.h
+++ b/jsfindwidget.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jshighlighter.cpp b/jshighlighter.cpp
index 947a619..f784ef7 100644
--- a/jshighlighter.cpp
+++ b/jshighlighter.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jshighlighter.h b/jshighlighter.h
index ae9fd18..6e66131 100644
--- a/jshighlighter.h
+++ b/jshighlighter.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jslinenumberwidget.cpp b/jslinenumberwidget.cpp
index ebf3b00..b931e43 100644
--- a/jslinenumberwidget.cpp
+++ b/jslinenumberwidget.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jslinenumberwidget.h b/jslinenumberwidget.h
index 64e18cb..3462bb2 100644
--- a/jslinenumberwidget.h
+++ b/jslinenumberwidget.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jsmainwindow.cpp b/jsmainwindow.cpp
index 7fc93eb..9a1f6c7 100644
--- a/jsmainwindow.cpp
+++ b/jsmainwindow.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2012 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jsmainwindow.h b/jsmainwindow.h
index 078fa34..6b4b9ca 100644
--- a/jsmainwindow.h
+++ b/jsmainwindow.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2012 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jsreplacedialog.cpp b/jsreplacedialog.cpp
index 3991cc4..058f338 100644
--- a/jsreplacedialog.cpp
+++ b/jsreplacedialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/jsreplacedialog.h b/jsreplacedialog.h
index af0c086..f3cf193 100644
--- a/jsreplacedialog.h
+++ b/jsreplacedialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/latexhighlighter.cpp b/latexhighlighter.cpp
index ab97643..3a831d2 100644
--- a/latexhighlighter.cpp
+++ b/latexhighlighter.cpp
@@ -1,6 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2006-2012 by Pascal Brachet                     *
- *   http://www.xm1math.net/texmaker/                                      *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/latexhighlighter.h b/latexhighlighter.h
index 93250f3..a391a5e 100644
--- a/latexhighlighter.h
+++ b/latexhighlighter.h
@@ -1,6 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2006-2012 by Pascal Brachet                     *
- *   http://www.xm1math.net/texmaker/                                      *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/latexviewdialog.cpp b/latexviewdialog.cpp
index 88a7fff..02ff832 100644
--- a/latexviewdialog.cpp
+++ b/latexviewdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -64,4 +64,4 @@ if (!exportFichier.isEmpty())
     fichier.close();
     ui.label->setText(QString::fromUtf8("Fichier enregistré"));
     }  
-}
\ No newline at end of file
+}
diff --git a/latexviewdialog.h b/latexviewdialog.h
index 6c277b9..ea6ab0c 100644
--- a/latexviewdialog.h
+++ b/latexviewdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/license.txt b/license.txt
new file mode 100755
index 0000000..2437492
--- /dev/null
+++ b/license.txt
@@ -0,0 +1,441 @@
+AlgoBox is licensed to you under the terms of the GNU General 
+Public License Version 2 as published by the Free Software Foundation:
+
+		GNU LIBRARY GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+                    51 Franklin Street, Fifth Floor
+                    Boston, MA 02110-1301, USA.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+

+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+

+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+

+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+

+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+

+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+

+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+

+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+

+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/linenumberwidget.cpp b/linenumberwidget.cpp
index 0b3e6e5..2392d3e 100644
--- a/linenumberwidget.cpp
+++ b/linenumberwidget.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/linenumberwidget.h b/linenumberwidget.h
index d8612ab..fcd19a6 100644
--- a/linenumberwidget.h
+++ b/linenumberwidget.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/liredialog.cpp b/liredialog.cpp
index 1119cad..e58b23d 100644
--- a/liredialog.cpp
+++ b/liredialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -53,4 +53,4 @@ else
     ui.labelLire2->setEnabled(false);
     ui.lineEditLire->setEnabled(false);
     }
-}
\ No newline at end of file
+}
diff --git a/liredialog.h b/liredialog.h
index a31d29d..0938e00 100644
--- a/liredialog.h
+++ b/liredialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/loghighlighter.cpp b/loghighlighter.cpp
index b24a71d..b744e05 100644
--- a/loghighlighter.cpp
+++ b/loghighlighter.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/loghighlighter.h b/loghighlighter.h
index e76b575..c907656 100644
--- a/loghighlighter.h
+++ b/loghighlighter.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/main.cpp b/main.cpp
index aaf2108..f0595a0 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
-  *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+  *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -12,9 +12,30 @@
 #include <QTranslator>
 #include <QFontDatabase>
 #include <QDebug>
+#include <QNetworkProxyFactory>
+#include <qtwebenginewidgetsglobal.h>
+
 
 #include "algobox.h"
 
+#define STRINGIFY_INTERNAL(x) #x
+#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
+
+#define VERSION_STR STRINGIFY(ALGOBOXVERSION)
+
+char** appendCommandLineArguments(int argc, char **argv, const QStringList& args)
+{
+  size_t newSize = (argc + args.length() + 1) * sizeof(char*);
+  char** newArgv = (char**)calloc(1, newSize);
+  memcpy(newArgv, argv, (size_t)(argc * sizeof(char*)));
+
+  int pos = argc;
+  for(const QString& str : args)
+    newArgv[pos++] = qstrdup(str.toUtf8().data());
+
+  return newArgv;
+}
+
 class AlgoBoxApp : public QApplication
 {
 private:
@@ -46,7 +67,7 @@ if (basicTranslator->load(QString("qt_fr"),transdir)) installTranslator(basicTra
 QFontDatabase::applicationFontFamilies(QFontDatabase::addApplicationFont(":/documents/LiberationMono-Regular.ttf"));
 mw=new MainWindow();
 mw->show();
-//connect( this, SIGNAL( lastWindowClosed() ), this, SLOT( quit() ) );
+
 for ( int i = 1; i < argc; ++i )
 	{
 	QString arg = argv[ i ];
@@ -70,6 +91,29 @@ bool AlgoBoxApp::event ( QEvent * event )
 
 int main(int argc, char *argv[])
 {
-AlgoBoxApp a( argc, argv );
+QStringList rawargs;
+for ( int i = 0; i < argc; ++i )
+	{
+	rawargs.append( argv[ i ]);
+	}
+for (QStringList::Iterator it = ++(rawargs.begin()); it != rawargs.end(); it++)
+    {
+    if ( ( *it == "-dpiscale") && (++it != rawargs.end())) {qputenv("QT_SCALE_FACTOR", (*it).toUtf8());}
+    }
+QStringList g_qtFlags = {"--disable-gpu","--proxy-bypass-list","--no-proxy-server"};
+char **newArgv = appendCommandLineArguments(argc, argv, g_qtFlags);
+int newArgc = argc + g_qtFlags.size();
+#if !defined(Q_OS_MAC)
+QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
+QNetworkProxyFactory::setUseSystemConfiguration(false);
+AlgoBoxApp a( newArgc, newArgv);
+a.setApplicationName("Algobox");
+a.setApplicationVersion(VERSION_STR);
+a.setOrganizationName("xm1");
+a.setAttribute(Qt::AA_UseHighDpiPixmaps);
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+#endif
 return a.exec();
 }
diff --git a/messagedialog.cpp b/messagedialog.cpp
index 967f1ce..080addb 100644
--- a/messagedialog.cpp
+++ b/messagedialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/messagedialog.h b/messagedialog.h
index e5ee7e4..600fa16 100644
--- a/messagedialog.h
+++ b/messagedialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/modifierlignedialog.cpp b/modifierlignedialog.cpp
index fb09b75..b1df68c 100644
--- a/modifierlignedialog.cpp
+++ b/modifierlignedialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/modifierlignedialog.h b/modifierlignedialog.h
index 36261c1..e67823c 100644
--- a/modifierlignedialog.h
+++ b/modifierlignedialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/pointdialog.cpp b/pointdialog.cpp
index 0bd1aac..b7d7f59 100644
--- a/pointdialog.cpp
+++ b/pointdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/pointdialog.h b/pointdialog.h
index b25f144..9e8cedb 100644
--- a/pointdialog.h
+++ b/pointdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/pourdialog.cpp b/pourdialog.cpp
index 8515844..def30d3 100644
--- a/pourdialog.cpp
+++ b/pourdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/pourdialog.h b/pourdialog.h
index 0132dbc..d3996eb 100644
--- a/pourdialog.h
+++ b/pourdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/pourlineedit.cpp b/pourlineedit.cpp
index c461e6e..26d0e45 100644
--- a/pourlineedit.cpp
+++ b/pourlineedit.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/pourlineedit.h b/pourlineedit.h
index dd40c9d..b4e7545 100644
--- a/pourlineedit.h
+++ b/pourlineedit.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -24,4 +24,4 @@ protected:
 void dragEnterEvent(QDragEnterEvent *event);
 void dropEvent(QDropEvent *event);
 };
-#endif
\ No newline at end of file
+#endif
diff --git a/consoledialog.cpp b/renvoyerdialog.cpp
similarity index 79%
copy from consoledialog.cpp
copy to renvoyerdialog.cpp
index 167dec5..4349c45 100644
--- a/consoledialog.cpp
+++ b/renvoyerdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -8,15 +8,14 @@
  *                                                                         *
  ***************************************************************************/
 
-#include "consoledialog.h"
+#include "renvoyerdialog.h"
 
-
-ConsoleDialog::ConsoleDialog(QWidget *parent)
+RenvoyerDialog::RenvoyerDialog(QWidget *parent)
     :QDialog( parent)
 {
 ui.setupUi(this);
 setModal(true);
 }
 
-ConsoleDialog::~ConsoleDialog(){
+RenvoyerDialog::~RenvoyerDialog(){
 }
diff --git a/aproposdialog.h b/renvoyerdialog.h
similarity index 71%
copy from aproposdialog.h
copy to renvoyerdialog.h
index 56cfe4c..4621424 100644
--- a/aproposdialog.h
+++ b/renvoyerdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -8,17 +8,17 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef APROPOSDIALOG_H
-#define APROPOSDIALOG_H
+#ifndef RENVOYERDIALOG_H
+#define RENVOYERDIALOG_H
 
-#include "ui_aproposdialog.h"
+#include "ui_renvoyerdialog.h"
 
-class AproposDialog : public QDialog  {
+class RenvoyerDialog : public QDialog  {
    Q_OBJECT
 public:
-	AproposDialog(QWidget *parent=0);
-	~AproposDialog();
-	Ui::AproposDialog ui;
+	RenvoyerDialog(QWidget *parent=0);
+	~RenvoyerDialog();
+	Ui::RenvoyerDialog ui;
 };
 
 
diff --git a/renvoyerdialog.ui b/renvoyerdialog.ui
new file mode 100644
index 0000000..1c1b86a
--- /dev/null
+++ b/renvoyerdialog.ui
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>RenvoyerDialog</class>
+ <widget class="QDialog" name="RenvoyerDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>511</width>
+    <height>84</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Insérer RENVOYER</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <widget class="QLabel" name="labelMessage1">
+     <property name="text">
+      <string>RENVOYER</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QLineEdit" name="lineEdit">
+     <property name="minimumSize">
+      <size>
+       <width>150</width>
+       <height>0</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="3">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>lineEdit</tabstop>
+  <tabstop>buttonBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>RenvoyerDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>RenvoyerDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/replacedialog.cpp b/replacedialog.cpp
index 5e3ef67..b4d5b56 100644
--- a/replacedialog.cpp
+++ b/replacedialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/replacedialog.h b/replacedialog.h
index 1d717f7..fe24e9e 100644
--- a/replacedialog.h
+++ b/replacedialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/ressources/aidealgobox.html b/ressources/aidealgobox.html
index 44cd36f..91ab928 100644
--- a/ressources/aidealgobox.html
+++ b/ressources/aidealgobox.html
@@ -146,7 +146,7 @@ padding-left:4px;
 <li><a href="#SECTION35">3.5 Affichage d'une variable ou d'un message</a></li>
 <li><a href="#SECTION36">3.6 Utilisation d'une fonction numérique</a></li>
 <li><a href="#SECTION37">3.7 Tracer des points et des segments dans un repère</a></li>
-<li><a href="#SECTION38">3.8 Utilisation d'une fonction récursive</a></li>
+<li><a href="#SECTION38">3.8 Utiliser des fonctions locales</a></li>
 <li><a href="#SECTION39">3.9 Copier, coller et couper une ligne ou bloc de l'algorithme</a></li>
 <li><a href="#SECTION310">3.10 Ajout de commentaires</a></li>
 <li><a href="#SECTION311">3.11 Provoquer un arrêt temporaire de l'exécution d'un algorithme avec l'instruction <i>PAUSE</i></a></li>
@@ -174,7 +174,12 @@ padding-left:4px;
 <legend class="title"><a name="SECTION1">1. Fonctionnement général</a></legend>
 <div class="entry">
 <p>
-Le fonctionnement d'AlgoBox est basé sur les deux principes suivants :
+Deux modes sont disponibles pour éditer des algorithmes avec AlgoBox (voir boutons en haut à droite de la barre d'outil):
+<ul>
+<li>Le mode "normal" (recommandé aux débutants) où l'on construit l'algorithme par blocs logiques dans un arbre;</li>
+<li>Le mode "éditeur de texte" où l'on tape directement les commandes dans un éditeur classique (voir <a href="#SECTION10">ici</a> pour plus de détails). </li>
+</ul>
+Le fonctionnement d'AlgoBox dans le mode "normal" est basé sur les deux principes suivants :
 <ol>
 <li>Pour pouvoir utiliser une variable dans son algorithme, il faut d'abord la déclarer en utilisant le bouton <span class="code">Déclarer nouvelle variable</span> qui est activable à tout moment.</li>
 <li>Pour ajouter un nouvel élément à l'algorithme (autre que la déclaration d'une variable), il faut d'abord insérer une nouvelle ligne en utilisant le bouton <span class="code">Nouvelle ligne</span> (raccourci-clavier : Ctrl+Return). Ce bouton n'est activable que s'il est possible d'ajouter une nouvelle ligne après la position actuelle dans le code. Par exemple, l'ajout d'une nouvelle ligne après "Fin_Algorithme" n'est pas autorisé.<br>Avant d'insérer une nouvelle ligne, il peut donc êt [...]
@@ -336,12 +341,8 @@ En activant l'option <span class="code">Utiliser une fonction</span> dans l'ongl
 <li><a name="SECTION37"><b>Tracer des points et des segments dans un repère</b></a><br>
 En activant l'option <span class="code">Utiliser un repère</span> dans l'onglet "Dessiner dans un repère", un repère graphique est automatiquement ajouté dans la fenêtre de test de l'algorithme. Il est alors possible d'inclure dans le code de l'algorithme des instructions pour tracer des points et des segments dans ce repère en utilisant les boutons <span class="code">Ajouter TRACER POINT</span> et <span class="code">Ajouter TRACER SEGMENT</span> .
 </li>
-<li><a name="SECTION38"><b>Utiliser une fonction récursive</b></a><br>
-En activant l'option <span class="code">Utiliser la fonction F2...</span> dans l'onglet "Fonction avancée", il est possible de définir une fonction récursive (ou une fonction définie par "morceaux") dépendant de un ou plusieurs paramètres.<br>
-Pour cela, il faut d'abord renseigner le champ <span class="code">paramètres</span> en séparant le nom des variables par une virgule. 
-<br>Ensuite, il faut ajouter un par un les cas à l'aide du bouton <span class="code">Ajouter</span> : tous les cas s'affichent au fur et à mesure dans le panneau de droite (pour modifier un cas, il suffit de "double-cliquer" dessus).<br>
-Pour finir, on renseigne le champ <span class="code">Dans les autres cas, renvoyer</span>.<br>
-(l'exemple prof_pgcd_recursif.alg fourni avec le programme peut permettre de mieux comprendre le fonctionnement de cette fonction F2).
+<li><a name="SECTION38"><b>Utiliser des fonctions locales</b></a><br>
+Il est possible avec AlgoBox de définir et utiliser des fonctions locales que l'on peut appeler dans l'algorithme ensuite. Pour créer une nouvelle fonction locale, il suffit de se placer sur FONCTIONS_UTILISEES, de cliquer sur "Nouvelle ligne" puis sur "Déclarer nouvelle fonction" dans l'onglet "Fonctions locales". Pour déclarer une éventuelle variable locale nécessaire à une fonction, il faut se placer sur la ligne "VARIABLES_FONCTION" correspondant à la fonction et cliquer sur "Déclare [...]
 </li>
 <li><a name="SECTION39"><b>Copier, coller et couper une ligne ou un bloc de l'algorithme</b></a><br>
 Via le menu <span class="code">Edition</span>, il est possible de copier/coller/couper :
@@ -561,6 +562,6 @@ Exemple :<br>
 <br clear="all">
 </fieldset>
 </div>
-<div id="footer">AlgoBox - © Pascal Brachet</div>
+<div id="footer">AlgoBox - © 2017 Pascal Brachet</div>
 </body>
 </html>
diff --git a/ressources/prof_pgcd_recursif.alg b/ressources/prof_pgcd_recursif.alg
index af35e1e..7e32874 100644
--- a/ressources/prof_pgcd_recursif.alg
+++ b/ressources/prof_pgcd_recursif.alg
@@ -1,19 +1,44 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Algo>
-    <description texte="Détermination du pgcd de deux entiers à l'aide d'une fonction récursive&#xa;(exemple d'utilisation de panneau "Fonction avancée")" courant="AFFICHER pgcd"/>
+    <description courant="AFFICHER result" texte=""/>
+    <extension extnom="inactif"/>
     <fonction fctcode="" fctetat="inactif"/>
-    <F2 F2defaut="F2(p,q-p)" F2lignes="p==0 at q#q==0 at p#q<=p at F2(p-q,q)#" F2etat="actif" F2para="p,q"/>
-    <repere repetat="inactif" repcode="-10#10#-10#10#2#2"/>
+    <F2 F2defaut="" F2etat="inactif" F2lignes="" F2para=""/>
+    <repere repcode="-10#10#-10#10#2#2" repetat="inactif"/>
+    <param totalBoucles="5000000" epaisseurPoint="2" arrondiAuto="vrai" maxBoucle="500000" nbDecimales="8" totalAffichages="1000" epaisseurLigne="2"/>
+    <item algoitem="FONCTIONS_UTILISEES" code="200#declarationfonctions">
+        <item algoitem="FONCTION pgcd(p,q)" code="201#pgcd#p,q">
+            <item algoitem="VARIABLES_FONCTION" code="202#declarationsvariablesfonction"/>
+            <item algoitem="DEBUT_FONCTION" code="203#debutfonction"/>
+            <item algoitem="SI (p==0) ALORS" code="6#p==0">
+                <item algoitem="DEBUT_SI" code="7#debutsi"/>
+                <item algoitem="RENVOYER q" code="205#q"/>
+                <item algoitem="FIN_SI" code="8#finsi"/>
+            </item>
+            <item algoitem="SI (q==0) ALORS" code="6#q==0">
+                <item algoitem="DEBUT_SI" code="7#debutsi"/>
+                <item algoitem="RENVOYER p" code="205#p"/>
+                <item algoitem="FIN_SI" code="8#finsi"/>
+            </item>
+            <item algoitem="SI (q<=p) ALORS" code="6#q<=p">
+                <item algoitem="DEBUT_SI" code="7#debutsi"/>
+                <item algoitem="RENVOYER pgcd(p-q,q)" code="205#pgcd(p-q,q)"/>
+                <item algoitem="FIN_SI" code="8#finsi"/>
+            </item>
+            <item algoitem="RENVOYER pgcd(p,q-p)" code="205#pgcd(p,q-p)"/>
+            <item algoitem="FIN_FONCTION" code="204#finfonction"/>
+        </item>
+    </item>
     <item algoitem="VARIABLES" code="100#declarationsvariables">
-        <item algoitem="p EST_DU_TYPE NOMBRE" code="1#NOMBRE#p"/>
-        <item algoitem="q EST_DU_TYPE NOMBRE" code="1#NOMBRE#q"/>
-        <item algoitem="pgcd EST_DU_TYPE NOMBRE" code="1#NOMBRE#pgcd"/>
+        <item algoitem="m EST_DU_TYPE NOMBRE" code="1#NOMBRE#m"/>
+        <item algoitem="n EST_DU_TYPE NOMBRE" code="1#NOMBRE#n"/>
+        <item algoitem="result EST_DU_TYPE NOMBRE" code="1#NOMBRE#result"/>
     </item>
     <item algoitem="DEBUT_ALGORITHME" code="101#debutalgo">
-        <item algoitem="LIRE p" code="2#p#pasliste"/>
-        <item algoitem="LIRE q" code="2#q#pasliste"/>
-        <item algoitem="pgcd PREND_LA_VALEUR F2(p,q)" code="5#pgcd#F2(p,q)#pasliste"/>
-        <item algoitem="AFFICHER pgcd" code="3#pgcd#0#pasliste"/>
+        <item algoitem="LIRE m" code="2#m#pasliste"/>
+        <item algoitem="LIRE n" code="2#n#pasliste"/>
+        <item algoitem="result PREND_LA_VALEUR pgcd(m,n)" code="5#result#pgcd(m,n)#pasliste"/>
+        <item algoitem="AFFICHER result" code="3#result#0#pasliste"/>
     </item>
     <item algoitem="FIN_ALGORITHME" code="102#finalgo"/>
 </Algo>
diff --git a/segmentdialog.cpp b/segmentdialog.cpp
index ee4c721..858a8d0 100644
--- a/segmentdialog.cpp
+++ b/segmentdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/segmentdialog.h b/segmentdialog.h
index 1959dd4..c007758 100644
--- a/segmentdialog.h
+++ b/segmentdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/tantquedialog.cpp b/tantquedialog.cpp
index db6f52b..25d14ec 100644
--- a/tantquedialog.cpp
+++ b/tantquedialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/tantquedialog.h b/tantquedialog.h
index 1e205dc..8021f7d 100644
--- a/tantquedialog.h
+++ b/tantquedialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/toolbox.cpp b/toolbox.cpp
index d6dd8cf..4b036ee 100644
--- a/toolbox.cpp
+++ b/toolbox.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/toolbox.h b/toolbox.h
index 8af0186..668072d 100644
--- a/toolbox.h
+++ b/toolbox.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2013 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/treedelegate.cpp b/treedelegate.cpp
index 43eaa08..ee65fe3 100644
--- a/treedelegate.cpp
+++ b/treedelegate.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/treedelegate.h b/treedelegate.h
index 8c81d1f..fefa1bf 100644
--- a/treedelegate.h
+++ b/treedelegate.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2003-2011 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/uic_wrapper.sh b/uic_wrapper.sh
new file mode 100755
index 0000000..214af4f
--- /dev/null
+++ b/uic_wrapper.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+LD_LIBRARY_PATH=/home/xm1/compil/qt-everywhere-opensource-src-5.9.1/qtbase/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+export LD_LIBRARY_PATH
+QT_PLUGIN_PATH=/home/xm1/compil/qt-everywhere-opensource-src-5.9.1/qtbase/plugins${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}
+export QT_PLUGIN_PATH
+exec /home/xm1/compil/qt-everywhere-opensource-src-5.9.1/qtbase/bin/uic "$@"
diff --git a/utilities/CHANGELOG.txt b/utilities/CHANGELOG.txt
index 3ea5e75..de0b7a0 100644
--- a/utilities/CHANGELOG.txt
+++ b/utilities/CHANGELOG.txt
@@ -1,3 +1,18 @@
+version 1.0 -> 1.0.1 :
+----------------------
+- ajout de l'option "-dpiscale x" à la ligne de commande qui permet de forcer une échelle d'affichage de l'interface si le dpi du moniteur est mal reconnu
+- l'algorithme ne peut être lançé que si la page est bien totalement chargée (ajout d'un splash screen en attendant le chargement complet de la page)
+
+version 0.9 -> 1.0 :
+--------------------
+- on peut maintenant définir des fonctions locales que l'on peut ensuite utiliser dans l'algorithme
+- compatibilité avec les écrans highdpi
+- passage plus direct entre le mode d'édition "normal" et le mode "éditeur texte" (à réserver aux bons connaisseurs de la syntaxe pour le mode éditeur de texte...)
+- les options d'exécution de l'algorithme (arroni, nombre max de boucles,...) sont enregistrées avec l'algorithme afin de garantir les mêmes résultats d'une installation d'algobox à une autre
+- passage de webkit à webengine (chromium) pour le moteur javascript/html
+- fin de la compatibilité avec l'antique Qt4. Qt>=5.7 est nécessaire.
+- installateur windows au format msi afin de faciliter le déploiement rapide sur des réseaux pédagogiques
+
 version 0.8 -> 0.9 :
 --------------------
 Version de maintenance :
@@ -130,4 +145,4 @@ version 0.1 -> 0.2 :
 - Possibilité d'utiliser une fonction numérique définie préalablement.
 - Possibilité de tracer des points et des segments dans un repère graphique.
 - Ajout d'une limitation à 200000 itérations pour les boucles (POUR et TANT QUE)
-- Ajout de nouveaux exemples : approximation d'une racine par la méthode de Babylone, méthode d'Euler, courbe représentative d'une fonction, PGCD par la méthode d'Euclide, décomposition en facteurs premiers, méthode des trapèzes pour approcher une intégrale, approximation de PI par la méthode de monte carlo, suite de Syracuse.
\ No newline at end of file
+- Ajout de nouveaux exemples : approximation d'une racine par la méthode de Babylone, méthode d'Euler, courbe représentative d'une fonction, PGCD par la méthode d'Euclide, décomposition en facteurs premiers, méthode des trapèzes pour approcher une intégrale, approximation de PI par la méthode de monte carlo, suite de Syracuse.
diff --git a/utilities/algobox.desktop b/utilities/algobox.desktop
index f4027f4..8e044cb 100644
--- a/utilities/algobox.desktop
+++ b/utilities/algobox.desktop
@@ -1,12 +1,12 @@
 [Desktop Entry]
-Categories=Application;Education;Science;Math;Qt;X-Misc;
+Categories=Application;Education;Science;Math;Qt;X-SuSE-Core-Education;X-Misc;
 Encoding=UTF-8
 Exec=algobox %F
 GenericName[fr]=Logiciel d'initiation à l'algorithmique
 GenericName=Logiciel d'initiation à l'algorithmique
 GenericName[fr_FR]=Logiciel d'initiation à l'algorithmique
 Icon=algobox
-MimeType=
+MimeType=application/x-algobox;
 Name[fr]=AlgoBox
 Name=AlgoBox
 Name[POSIX]=AlgoBox
diff --git a/utilities/algobox.png b/utilities/algobox.png
index 9da5a13..dcd2e8c 100644
Binary files a/utilities/algobox.png and b/utilities/algobox.png differ
diff --git a/utilities/algobox.spec b/utilities/algobox.spec
index 93cc5ec..2873a03 100644
--- a/utilities/algobox.spec
+++ b/utilities/algobox.spec
@@ -1,51 +1,83 @@
 Name: algobox
 Summary: logiciel d'algorithmique
-Version: 0.9
+Version: 1.0.1
 Release: xm1
 License: GPL
 Group: Applications/Education
-Source: algobox-%{version}.tar.bz2
+Source: algobox-%{version}.orig.tar.gz
 Packager: Pascal Brachet
-Url: http://www.xm1math.net/texmaker/
-#BuildRequires: libqt4-devel >= 4.6.1
+Url: http://www.xm1math.net/algobox/
+
+%if 0%{?fedora}
+%define debug_package %{nil}
+BuildRequires: gcc-c++
+BuildRequires: qt5-devel  
+BuildRequires: qt5-qtbase-devel 
+BuildRequires: qt5-qtwebengine-devel
+%endif
+
+%if 0%{?suse_version}
+BuildRequires: libQt5Core-devel
+BuildRequires: libQt5Core-private-headers-devel
+BuildRequires: libQt5Gui-devel
+BuildRequires: libQt5Concurrent-devel
+BuildRequires: libQt5Core-devel
+BuildRequires: libQt5Network-devel
+BuildRequires: libQt5PrintSupport-devel
+BuildRequires: libQt5Widgets-devel
+BuildRequires: libqt5-qtbase-devel 
+BuildRequires: libqt5-qtbase-common-devel
+BuildRequires: libqt5-qtscript-devel
+BuildRequires: libqt5-qttools-devel
+BuildRequires: libqt5-qtwebengine-devel
+%endif
+
 %description
-Algobox est un logiciel d'initiation à l'algorithmique au niveau lycée
+Logiciel d'initiation à l'algorithmique et à la programmation
 
 %prep
 %setup 
 
 %build
-qmake algobox.pro
-make INSTALL_ROOT=$RPM_BUILD_ROOT
+PREFIX=%{buildroot}%{_prefix}
+%if 0%{?suse_version}
+qmake-qt5 algobox.pro
+%endif
+%if 0%{?fedora}
+qmake-qt5 CONFIG-=debug algobox.pro
+%endif
+make INSTALL_ROOT=%{buildroot}
 
 %install
 make INSTALL_ROOT=$RPM_BUILD_ROOT install
 
 %files 
-/usr/bin/algobox
-/usr/share/applications/algobox.desktop
-/usr/share/pixmaps/algobox.png
-/usr/share/algobox/eleve_calcul_recurrent.alg
-/usr/share/algobox/eleve_distance_sur_un_axe.alg
-/usr/share/algobox/eleve_que_fait_lalgo.alg
-/usr/share/algobox/eleve_simplification_calculs_enchaines.alg
-/usr/share/algobox/eleve_simul_lancers_de.alg
-/usr/share/algobox/prof_babylone.alg
-/usr/share/algobox/prof_balayage_fonctions.alg
-/usr/share/algobox/prof_courbe_fonction.alg
-/usr/share/algobox/prof_decomp_facteurspremiers.alg
-/usr/share/algobox/prof_dichotomie.alg
-/usr/share/algobox/prof_ductoscane.alg
-/usr/share/algobox/prof_euler.alg
-/usr/share/algobox/prof_integrale_trapezes.alg
-/usr/share/algobox/prof_montecarlo.alg
-/usr/share/algobox/prof_pgcd_euclide.alg
-/usr/share/algobox/prof_somme_entiers.alg
-/usr/share/algobox/prof_suite_syracuse.alg
-/usr/share/algobox/prof_tri_abulle.alg
-/usr/share/algobox/prof_pgcd_recursif.alg
-/usr/share/algobox/aidealgobox.html
-/usr/share/algobox/AUTHORS
-/usr/share/algobox/COPYING
-/usr/share/algobox/CHANGELOG.txt
-/usr/share/algobox/qt_fr.qm
+%defattr(-,root,root,-)
+%{_bindir}/algobox
+%{_datadir}/applications/algobox.desktop
+%{_datadir}/mime/packages/x-algobox.xml
+%{_datadir}/pixmaps/algobox.png
+%{_datadir}/algobox/eleve_calcul_recurrent.alg
+%{_datadir}/algobox/eleve_distance_sur_un_axe.alg
+%{_datadir}/algobox/eleve_que_fait_lalgo.alg
+%{_datadir}/algobox/eleve_simplification_calculs_enchaines.alg
+%{_datadir}/algobox/eleve_simul_lancers_de.alg
+%{_datadir}/algobox/prof_babylone.alg
+%{_datadir}/algobox/prof_balayage_fonctions.alg
+%{_datadir}/algobox/prof_courbe_fonction.alg
+%{_datadir}/algobox/prof_decomp_facteurspremiers.alg
+%{_datadir}/algobox/prof_dichotomie.alg
+%{_datadir}/algobox/prof_ductoscane.alg
+%{_datadir}/algobox/prof_euler.alg
+%{_datadir}/algobox/prof_integrale_trapezes.alg
+%{_datadir}/algobox/prof_montecarlo.alg
+%{_datadir}/algobox/prof_pgcd_euclide.alg
+%{_datadir}/algobox/prof_somme_entiers.alg
+%{_datadir}/algobox/prof_suite_syracuse.alg
+%{_datadir}/algobox/prof_tri_abulle.alg
+%{_datadir}/algobox/prof_pgcd_recursif.alg
+%{_datadir}/algobox/aidealgobox.html
+%{_datadir}/algobox/AUTHORS
+%{_datadir}/algobox/COPYING
+%{_datadir}/algobox/CHANGELOG.txt
+%{_datadir}/algobox/qt_fr.qm
diff --git a/utilities/algobox.svg b/utilities/algobox.svg
index d470d21..2a5bbaa 100644
--- a/utilities/algobox.svg
+++ b/utilities/algobox.svg
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
 <svg
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:cc="http://creativecommons.org/ns#"
@@ -9,296 +8,116 @@
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   inkscape:export-ydpi="41.25"
-   inkscape:export-xdpi="41.25"
-   inkscape:export-filename="/home/xm1/algobox/utilities/algobox22.png"
-   width="48px"
-   height="48px"
-   id="svg11300"
-   sodipodi:version="0.32"
-   inkscape:version="0.46"
-   sodipodi:docbase="/home/xm1/MesDocuments/programmation/svg"
+   width="48"
+   height="48"
+   version="1.1"
+   id="svg49"
    sodipodi:docname="algobox.svg"
-   inkscape:output_extension="org.inkscape.output.svg.inkscape">
-  <defs
-     id="defs3">
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 24 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="48 : 24 : 1"
-       inkscape:persp3d-origin="24 : 16 : 1"
-       id="perspective2957" />
-    <linearGradient
-       inkscape:collect="always"
-       id="linearGradient3227">
-      <stop
-         style="stop-color:white;stop-opacity:1;"
-         offset="0"
-         id="stop3229" />
-      <stop
-         style="stop-color:white;stop-opacity:0;"
-         offset="1"
-         id="stop3231" />
-    </linearGradient>
-    <linearGradient
-       id="linearGradient2431">
-      <stop
-         style="stop-color:#ffffff;stop-opacity:1;"
-         offset="0"
-         id="stop2433" />
-      <stop
-         style="stop-color:#b8b8b8;stop-opacity:1;"
-         offset="1"
-         id="stop2435" />
-    </linearGradient>
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient2431"
-       id="radialGradient2437"
-       cx="-19.515638"
-       cy="16.855663"
-       fx="-19.515638"
-       fy="16.855663"
-       r="8.7536434"
-       gradientTransform="matrix(4.445991,0,0,6.8665,67.25071,-104.6679)"
-       gradientUnits="userSpaceOnUse" />
-    <linearGradient
-       id="linearGradient7916">
-      <stop
-         style="stop-color:#ffffff;stop-opacity:1;"
-         offset="0"
-         id="stop7918" />
-      <stop
-         style="stop-color:#ffffff;stop-opacity:0.34020618;"
-         offset="1.0000000"
-         id="stop7920" />
-    </linearGradient>
-    <linearGradient
-       id="linearGradient1322">
-      <stop
-         id="stop1324"
-         offset="0.0000000"
-         style="stop-color:#729fcf" />
-      <stop
-         id="stop1326"
-         offset="1.0000000"
-         style="stop-color:#5187d6;stop-opacity:1.0000000;" />
-    </linearGradient>
-    <linearGradient
-       id="linearGradient2933">
-      <stop
-         style="stop-color:#9cbcde;stop-opacity:1"
-         offset="0"
-         id="stop2935" />
-      <stop
-         style="stop-color:#204a87"
-         offset="1"
-         id="stop2937" />
-    </linearGradient>
-    <linearGradient
-       id="linearGradient11508"
-       inkscape:collect="always">
-      <stop
-         id="stop11510"
-         offset="0"
-         style="stop-color:#000000;stop-opacity:1;" />
-      <stop
-         id="stop11512"
-         offset="1"
-         style="stop-color:#000000;stop-opacity:0;" />
-    </linearGradient>
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient11508"
-       id="radialGradient1348"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,-1.435476e-15,29.48178)"
-       cx="30.203562"
-       cy="44.565483"
-       fx="30.203562"
-       fy="44.565483"
-       r="6.5659914" />
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient2933"
-       id="radialGradient2939"
-       cx="20.602695"
-       cy="26.816896"
-       fx="20.602695"
-       fy="26.816896"
-       r="20.530962"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(2.350449,6.161688e-3,-6.331345e-3,2.412813,-23.81011,-9.991115)" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient1322"
-       id="linearGradient35404"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(0.729276,0.684219,-0.684219,0.729276,61.09749,-16.75045)"
-       x1="34.892849"
-       y1="36.422989"
-       x2="45.918697"
-       y2="48.547989" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient7916"
-       id="linearGradient35406"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(0.729276,0.684219,-0.684219,0.729276,64.95182,5.47486)"
-       x1="16.874998"
-       y1="22.851799"
-       x2="27.900846"
-       y2="34.976799" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3227"
-       id="linearGradient3233"
-       x1="-27.925644"
-       y1="18.500454"
-       x2="-11.106514"
-       y2="18.500454"
-       gradientUnits="userSpaceOnUse" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3227"
-       id="linearGradient4388"
-       x1="9.1770773"
-       y1="13.511115"
-       x2="40.065742"
-       y2="13.511115"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(0.9920343,0,0,0.9920343,7.1126117e-2,6.5981668e-2)" />
-  </defs>
-  <sodipodi:namedview
-     stroke="#3465a4"
-     fill="#729fcf"
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="0.25490196"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="8"
-     inkscape:cx="46.999335"
-     inkscape:cy="13.507577"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     inkscape:grid-bbox="true"
-     inkscape:document-units="px"
-     inkscape:showpageshadow="false"
-     inkscape:window-width="1255"
-     inkscape:window-height="881"
-     inkscape:window-x="226"
-     inkscape:window-y="72" />
+   inkscape:version="0.92.1 r15371"
+   inkscape:export-filename="/home/xm1/NEWCOMPIL/algobox-1.0/images/algobox128 at 2x.png"
+   inkscape:export-xdpi="512"
+   inkscape:export-ydpi="512">
   <metadata
-     id="metadata4">
+     id="metadata53">
     <rdf:RDF>
       <cc:Work
          rdf:about="">
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:creator>
-          <cc:Agent>
-            <dc:title>Jakub Steiner</dc:title>
-          </cc:Agent>
-        </dc:creator>
-        <dc:source>http://jimmac.musichall.cz</dc:source>
-        <cc:license
-           rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
-        <dc:title>Accessibility</dc:title>
-        <dc:subject>
-          <rdf:Bag>
-            <rdf:li>accessibility</rdf:li>
-            <rdf:li>assist</rdf:li>
-          </rdf:Bag>
-        </dc:subject>
+        <dc:title />
       </cc:Work>
-      <cc:License
-         rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
-        <cc:permits
-           rdf:resource="http://web.resource.org/cc/Reproduction" />
-        <cc:permits
-           rdf:resource="http://web.resource.org/cc/Distribution" />
-        <cc:requires
-           rdf:resource="http://web.resource.org/cc/Notice" />
-        <cc:requires
-           rdf:resource="http://web.resource.org/cc/Attribution" />
-        <cc:permits
-           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
-        <cc:requires
-           rdf:resource="http://web.resource.org/cc/ShareAlike" />
-      </cc:License>
     </rdf:RDF>
   </metadata>
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1468"
+     inkscape:window-height="1067"
+     id="namedview51"
+     showgrid="false"
+     inkscape:zoom="4.9166667"
+     inkscape:cx="-12.508474"
+     inkscape:cy="24"
+     inkscape:window-x="214"
+     inkscape:window-y="17"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg49" />
+  <defs
+     id="defs23">
+    <linearGradient
+       xlink:href="#b"
+       id="c"
+       y1="10.58898"
+       x1="-27.031418"
+       y2="32.535568"
+       x2="-17.130581"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,-1.022)" />
+    <linearGradient
+       id="b"
+       y1="9.1780005"
+       x1="-14.65"
+       y2="17.521999"
+       x2="-6.4299998"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(1.01,-1.022)">
+      <stop
+         id="stop7" />
+      <stop
+         offset="1"
+         stop-opacity="0"
+         id="stop9" />
+    </linearGradient>
+  </defs>
+  <path
+     inkscape:connector-curvature="0"
+     style="fill:#214478;stroke-width:1.97150457;stroke-linejoin:bevel"
+     id="path25"
+     d="m 10.189085,4.0000816 c -2.8742341,0 -5.1019144,2.2816055 -5.187327,5.1111094 v 32.88858 h 32.814337 c 2.874234,0 5.187327,-2.280627 5.187327,-5.11111 V 4.0000816 Z" />
   <g
-     id="layer1"
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer">
-    <path
-       sodipodi:type="arc"
-       style="opacity:0.40641710;color:#000000;fill:url(#radialGradient1348);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:2.8141584;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
-       id="path11530"
-       sodipodi:cx="30.203562"
-       sodipodi:cy="44.565483"
-       sodipodi:rx="6.5659914"
-       sodipodi:ry="2.2223356"
-       d="M 36.769553 44.565483 A 6.5659914 2.2223356 0 1 1  23.637570,44.565483 A 6.5659914 2.2223356 0 1 1  36.769553 44.565483 z"
-       transform="matrix(2.460049,0.000000,0.000000,2.460049,-49.40946,-67.96374)" />
-    <rect
-       ry="5.4548240"
-       rx="5.4548240"
-       y="3.5233452"
-       x="4.4147282"
-       height="40.061924"
-       width="40.061924"
-       id="rect11518"
-       style="opacity:1.0000000;color:#000000;fill:url(#radialGradient2939);fill-opacity:1.0;fill-rule:evenodd;stroke:#3465a4;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:bevel;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10.000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
-    <rect
-       style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.00000215;stroke-linecap:butt;stroke-linejoin:bevel;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
-       id="rect11528"
-       width="37.100636"
-       height="37.100636"
-       x="5.8954034"
-       y="5.0040197"
-       rx="3.9067502"
-       ry="3.9067502" />
+     id="g4394"
+     transform="translate(-2.4084203,-2.2541235)">
+    <text
+       transform="matrix(0,-1.132209,0.88322918,0,0,0)"
+       id="text3600"
+       y="47.849319"
+       x="-35.957485"
+       style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.80000019px;line-height:0%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#f6f6f6;fill-opacity:1;stroke:none;stroke-width:1.06666672px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       xml:space="preserve"><tspan
+         y="47.849319"
+         x="-35.957485"
+         id="tspan3602"
+         sodipodi:role="line"
+         style="font-size:15.13471413px;line-height:1.25;stroke-width:1.06666672px">LGO</tspan></text>
     <text
-       xml:space="preserve"
-       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
-       x="27.375"
-       y="28.875"
-       id="text2959"><tspan
+       transform="scale(0.94875528,1.0540126)"
+       id="text4390"
+       y="37.317711"
+       x="9.4597473"
+       style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.80000019px;line-height:0%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono Bold';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#f6f6f6;fill-opacity:1;stroke:none;stroke-width:1.06666672px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       xml:space="preserve"><tspan
+         y="37.317711"
+         x="9.4597473"
+         id="tspan4392"
          sodipodi:role="line"
-         id="tspan2961" /></text>
-    <g
-       id="g4394"
-       transform="translate(-0.3765377,0.7215068)">
-      <text
-         transform="matrix(0,-1.132209,0.8832292,0,0,0)"
-         sodipodi:linespacing="125%"
-         id="text3600"
-         y="44.858734"
-         x="-33.71014"
-         style="font-size:14.18879414px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#f6f6f6;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
-         xml:space="preserve"><tspan
-           y="44.858734"
-           x="-33.71014"
-           id="tspan3602"
-           sodipodi:role="line">LGO</tspan></text>
-      <text
-         transform="scale(0.9487553,1.0540126)"
-         sodipodi:linespacing="125%"
-         id="text4390"
-         y="34.985352"
-         x="8.8685131"
-         style="font-size:35.39009476px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#f6f6f6;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
-         xml:space="preserve"><tspan
-           y="34.985352"
-           x="8.8685131"
-           id="tspan4392"
-           sodipodi:role="line">A</tspan></text>
-    </g>
+         style="font-size:37.74943542px;line-height:1.25;stroke-width:1.06666672px">A</tspan></text>
+  </g>
+  <g
+     style="fill-rule:evenodd;stroke-width:1.01400006"
+     id="g31"
+     transform="matrix(1.4588163,0,0,1.2839943,51.821649,-3.9909649)">
+    <path
+       inkscape:connector-curvature="0"
+       style="opacity:0.2;fill:url(#c)"
+       id="path27"
+       d="m -25.637206,9.56698 v 0 l -5.076638,21.938216 v 0 0 l 13.583263,0.0084 v 0 c 0.487,-0.085 9.849433,0.587932 0,0 v 0 L -21.495164,9.3254361 Z"
+       sodipodi:nodetypes="ccccccccccc" />
   </g>
 </svg>
diff --git a/utilities/algobox128.png b/utilities/algobox128.png
index 34c5dc9..cc8e679 100644
Binary files a/utilities/algobox128.png and b/utilities/algobox128.png differ
diff --git a/utilities/algobox16.png b/utilities/algobox16.png
index cc7c990..d4a3edd 100644
Binary files a/utilities/algobox16.png and b/utilities/algobox16.png differ
diff --git a/utilities/algobox22.png b/utilities/algobox22.png
index 7467cf3..8165224 100644
Binary files a/utilities/algobox22.png and b/utilities/algobox22.png differ
diff --git a/utilities/x-algobox.xml b/utilities/x-algobox.xml
new file mode 100644
index 0000000..fa04d61
--- /dev/null
+++ b/utilities/x-algobox.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+  <mime-type type="application/x-algobox">
+    <comment>Pdfadd document</comment>
+    <glob pattern="*.alg"/>
+    <glob pattern="*.ALG"/>
+  </mime-type>
+</mime-info>
diff --git a/variabledialog.cpp b/variabledialog.cpp
index 80648f1..2befd0c 100644
--- a/variabledialog.cpp
+++ b/variabledialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/variabledialog.h b/variabledialog.h
index 972509e..21bd174 100644
--- a/variabledialog.h
+++ b/variabledialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/verifdialog.cpp b/verifdialog.cpp
index b0698ed..1e00b92 100644
--- a/verifdialog.cpp
+++ b/verifdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2006-2009 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/verifdialog.h b/verifdialog.h
index 939721b..be492c2 100644
--- a/verifdialog.h
+++ b/verifdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2009-2010 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/x11fontdialog.cpp b/x11fontdialog.cpp
index 70bd8a8..20f3ce8 100644
--- a/x11fontdialog.cpp
+++ b/x11fontdialog.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2006-2009 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
diff --git a/x11fontdialog.h b/x11fontdialog.h
index f2a0b65..d760a88 100644
--- a/x11fontdialog.h
+++ b/x11fontdialog.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   copyright       : (C) 2006-2009 by Pascal Brachet                     *
+ *   copyright       : (C) 2009-2017 by Pascal Brachet                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/algobox.git



More information about the debian-edu-commits mailing list