Olena-patches
  Threads by month 
                
            - ----- 2025 -----
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2024 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2023 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2022 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2021 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2020 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2019 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2018 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2017 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2016 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2015 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2014 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2013 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2012 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2011 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2010 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2009 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2008 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2007 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2006 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2005 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2004 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 
- 9625 discussions
 
                        
                            
                                
                            
                            5fe95d3 Go back to the previous way for adding tree	widget item in the region widget. Add TODO file.
                        
                        
by Antoine Froger 12 Feb '13
                    by Antoine Froger 12 Feb '13
12 Feb '13
                    
                        * regionwidget.cpp
* xml.cpp
* xmlwidget: Try to filter in real-time but do not work.
---
 GScribo/GScribo.pro.user           |    2 -
 GScribo/TODO                       |   65 ++++++++++++++++++++++++++++++++++++
 GScribo/XmlWidget/selectionproxy.h |    6 +++-
 GScribo/XmlWidget/xmlview.cpp      |    3 +-
 GScribo/XmlWidget/xmlview.h        |    6 +++
 GScribo/XmlWidget/xmlwidget.cpp    |   10 +----
 GScribo/XmlWidget/xmlwidget.h      |    5 ---
 GScribo/mainwindow.cpp             |    4 +--
 GScribo/region.h                   |   15 ++++----
 GScribo/regionwidget.cpp           |   58 ++++++++++++--------------------
 GScribo/regionwidget.h             |    7 +++-
 GScribo/xml.cpp                    |   62 ----------------------------------
 GScribo/xml.h                      |   28 +++++++++++++++-
 13 files changed, 144 insertions(+), 127 deletions(-)
 create mode 100644 GScribo/TODO
diff --git a/GScribo/GScribo.pro.user b/GScribo/GScribo.pro.user
index f152178..ab03cea 100644
--- a/GScribo/GScribo.pro.user
+++ b/GScribo/GScribo.pro.user
@@ -85,7 +85,6 @@
     <value type="QString">GTK_MODULES=canberra-gtk-module</value>
     <value type="QString">HOME=/lrde/home/stage/froger_a</value>
     <value type="QString">LANG=fr_FR.UTF-8</value>
-    <value type="QString">LANGUAGE=</value>
     <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
     <value type="QString">LOGNAME=froger_a</value>
     <value type="QString">OLDPWD=/lrde/home/stage/froger_a/qt</value>
@@ -135,7 +134,6 @@
     <value type="QString">GTK_MODULES=canberra-gtk-module</value>
     <value type="QString">HOME=/lrde/home/stage/froger_a</value>
     <value type="QString">LANG=fr_FR.UTF-8</value>
-    <value type="QString">LANGUAGE=</value>
     <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
     <value type="QString">LOGNAME=froger_a</value>
     <value type="QString">OLDPWD=/lrde/home/stage/froger_a/qt</value>
diff --git a/GScribo/TODO b/GScribo/TODO
new file mode 100644
index 0000000..8e5a474
--- /dev/null
+++ b/GScribo/TODO
@@ -0,0 +1,65 @@
+Concerning the xml widget :
+	- Can modify in real time the proxy with a regular expression. When the user click on a check box in the region widget, a new regular expression is created an sent to the xml widget but the proxy is not modified by this regular expression.
+	- In the table tree (the attributes tree), set the max of the header splitter. Currently it can be moved indefinitely to the right.
+	- Fit the splitter to the content of the first column when an attributes node is loaded.
+	- My be some color corresponding to the graphics item of the scene.
+
+
+Concerning the scene :
+	- Give the possibility to the user to remove some region.
+	- Can create/ fusion some region : sometimes two line regions are splitted but will not be.
+	- Optimize the collision between the rectangle item and the regions. Currently it do not take into account if the region is visible by the view before calculating the collision.
+	- Use OpenGL to speed up graphics rendering (the gui has been developped with Qt 4.7, OpenGL was still experimental so it was really slow when updating the scene).
+	- May be give the possibility to change the color.
+
+
+Concerning the region widget :
+	- As stated bove, connect this widget with the xml widget.
+	- Find a better way to get region names and color.
+
+
+Concerning xml file :
+	- Stop using the static array representation of the internal data structure for graphics region.
+	- find a better way to run through all node representing a graphics item without knowing it in advance.	For exemple, the xml file looks like this :
+
+
+
+						-Metadata
+							|- ...
+							|- ...
+							|- ... Some informations about the creator etc...
+						-Page
+							|- TextRegion
+
+								|- Coords
+							
+									|- Points
+								...	...
+
+								|- Line
+
+									|- Coords
+
+										|- Points
+										...
+									...			<---- All the graphical stuff is here.
+								...
+
+							|- VerticalSeparatorRegion
+
+								|- Coords
+
+									|- Points
+									...
+								...
+							...
+
+
+	Graphical items are after pages and node containing informations looks like : *Region -> Coords -> Points and is located in the root node named "Page" so there is a way to find graphical item without knowing their location and name before.
+
+
+
+Concerning tool bar :
+	- Create icons to replace text.
+	- Add new functionnalities.
+	
diff --git a/GScribo/XmlWidget/selectionproxy.h b/GScribo/XmlWidget/selectionproxy.h
index 8ee45f8..604c46a 100644
--- a/GScribo/XmlWidget/selectionproxy.h
+++ b/GScribo/XmlWidget/selectionproxy.h
@@ -17,6 +17,7 @@ class SelectionProxy :
 
         inline void beginResetModel();
         inline void endResetModel();
+        inline void invalidateFilter();
 
     protected:
         inline bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const;
@@ -26,7 +27,7 @@ class SelectionProxy :
 };
 
 inline bool SelectionProxy::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const
-{ return isAllDisplayed_ || sourceModel()->index(sourceRow, 0, sourceParent).data(filterRole()).value<XmlItem *>()->isVisible(); }
+{ return QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent) && (isAllDisplayed_ || sourceModel()->index(sourceRow, 0, sourceParent).data(Qt::UserRole+2).value<XmlItem *>()->isVisible()); }
 
 inline void SelectionProxy::beginResetModel()
 { isAllDisplayed_ = false; QSortFilterProxyModel::beginResetModel(); }
@@ -40,4 +41,7 @@ inline void SelectionProxy::displayAll()
 inline bool SelectionProxy::isAllDisplayed()
 { return isAllDisplayed_; }
 
+inline void SelectionProxy::invalidateFilter()
+{ QSortFilterProxyModel::invalidateFilter(); }
+
 #endif // SELECTIONPROXY_H
diff --git a/GScribo/XmlWidget/xmlview.cpp b/GScribo/XmlWidget/xmlview.cpp
index e92c877..4bd072a 100644
--- a/GScribo/XmlWidget/xmlview.cpp
+++ b/GScribo/XmlWidget/xmlview.cpp
@@ -3,7 +3,8 @@
 XmlView::XmlView(QWidget *parent) :
         QTreeView(parent)
 {
-    proxy_.setFilterRole(Qt::UserRole+2);
+    proxy_.setFilterRole(Qt::UserRole);
+    proxy_.setDynamicSortFilter(true);
 
     setUniformRowHeights(true);
     setItemDelegate(new XmlDelegate(Qt::UserRole));
diff --git a/GScribo/XmlWidget/xmlview.h b/GScribo/XmlWidget/xmlview.h
index d7f3d1e..fef7386 100644
--- a/GScribo/XmlWidget/xmlview.h
+++ b/GScribo/XmlWidget/xmlview.h
@@ -37,8 +37,11 @@ class XmlView :
     public slots:
         inline void display(QList<XmlItem *> displayedItems);
         inline void displayOnly(QList<XmlItem *> displayedItems);
+
         inline void displayAll();
 
+        inline void setFilterString(const QString& filterString);
+
     signals:
         void loadAttributes(const XmlAttributes& xmlAttributes);
 
@@ -67,6 +70,9 @@ inline void XmlView::displayAll()
 inline QList<XmlItem *> XmlView::selectedItems() const
 { return transform(selectedIndexes()); }
 
+inline void XmlView::setFilterString(const QString& filterString)
+{ proxy_.setFilterRegExp(QRegExp(filterString, Qt::CaseSensitive)); proxy_.invalidateFilter(); }
+
 inline void XmlView::setModel(QAbstractItemModel *model)
 { proxy_.setSourceModel(model); QTreeView::setModel(&proxy_); }
 
diff --git a/GScribo/XmlWidget/xmlwidget.cpp b/GScribo/XmlWidget/xmlwidget.cpp
index cc74fe0..8584052 100644
--- a/GScribo/XmlWidget/xmlwidget.cpp
+++ b/GScribo/XmlWidget/xmlwidget.cpp
@@ -3,11 +3,10 @@
 XmlWidget::XmlWidget(QWidget *parent) :
         QSplitter(Qt::Horizontal, parent)
 {
-    basePattern_ = "Page";
-    proxy_.setFilterFixedString(basePattern_);
+    proxy_.setFilterRegExp(QRegExp("(?:Page|.Region|Line)", Qt::CaseSensitive));
+    proxy_.setDynamicSortFilter(true);
     proxy_.setFilterRole(Qt::UserRole);
     proxy_.setSourceModel(&model_);
-    proxy_.setDynamicSortFilter(true);
 
     view_.setModel(&proxy_);
 
@@ -24,11 +23,6 @@ XmlWidget::XmlWidget(QWidget *parent) :
     connect(&view_, SIGNAL(loadAttributes(XmlAttributes)), &attributesModel_, SLOT(load(XmlAttributes)));
 }
 
-void XmlWidget::setFilterString(const QString& filterString)
-{
-    proxy_.setFilterFixedString(basePattern_ + '|' + filterString);
-}
-
 void XmlWidget::changeView(XmlItem *rootItem)
 {
     attributesModel_.reset();
diff --git a/GScribo/XmlWidget/xmlwidget.h b/GScribo/XmlWidget/xmlwidget.h
index c9817c8..289b155 100644
--- a/GScribo/XmlWidget/xmlwidget.h
+++ b/GScribo/XmlWidget/xmlwidget.h
@@ -31,8 +31,6 @@ class XmlWidget :
 
     private:
         QSortFilterProxyModel proxy_;
-        SelectionProxy proxy2_;
-        QString basePattern_;
 
         XmlModel model_;
         AttributesModel attributesModel_;
@@ -40,9 +38,6 @@ class XmlWidget :
         XmlView view_;
         QTableView attributes_;
 
-    public slots:
-        void setFilterString(const QString& filterString);
-
     private slots:
         inline void loadAttributes(const QModelIndex& index);
 };
diff --git a/GScribo/mainwindow.cpp b/GScribo/mainwindow.cpp
index e939694..bcb52d2 100644
--- a/GScribo/mainwindow.cpp
+++ b/GScribo/mainwindow.cpp
@@ -9,7 +9,6 @@ MainWindow::MainWindow(QWidget *parent) :
 
     setWindowTitle(tr("GScribo"));
 
-    xml_.fillSettings();
     initGraphicsRegion();
     initTextRegion();
     initXmlWidget();
@@ -72,7 +71,6 @@ void MainWindow::initRegionWidget()
 
 void MainWindow::initXmlWidget()
 {
-    xmlWidget_.setFilterString(regionWidget_.filterString());
     dockXml_.setWindowTitle("Xml");
     dockXml_.setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable);
     dockXml_.setWidget(&xmlWidget_);
@@ -120,7 +118,7 @@ void MainWindow::connectWidgets()
     // Connect the scene with the region widget.
     connect(®ionWidget_, SIGNAL(checkStateChanged(GraphicsRegion::Id,bool)), &scene_, SLOT(setVisible(GraphicsRegion::Id,bool)));
     // Connect the xml widget with the region widget.
-    connect(®ionWidget_, SIGNAL(checkStateChanged(QString)), &xmlWidget_, SLOT(setFilterString(QString)));
+    connect(®ionWidget_, SIGNAL(checkStateChanged(QString)), xmlWidget_.view(), SLOT(setFilterString(QString)));
 
     /*connect(&runner, SIGNAL(progress()), &progressDialog, SLOT(run()));
     connect(&runner, SIGNAL(new_progress_max_value(int)), &progressDialog, SLOT(setMaximum(int)));
diff --git a/GScribo/region.h b/GScribo/region.h
index d1fcee7..ee8d836 100644
--- a/GScribo/region.h
+++ b/GScribo/region.h
@@ -8,18 +8,13 @@ namespace GraphicsRegion
     // WARNING : The order is important.
     enum Id
     {
-        None,
-
-        Text,
         TextRegion,
         Line,
 
-        Separators,
         VerticalSeparator,
         HorizontalSeparator,
         WhiteSpaceSeparator,
 
-        Miscellaneous,
         Image,
         Noise,
         Table,
@@ -27,9 +22,15 @@ namespace GraphicsRegion
         Graphic,
         Chart,
 
-        Typology,
         Baseline,
-        Meanline
+        Meanline,
+
+        Text,
+        Separators,
+        Miscellaneous,
+        Typology,
+
+        None
     };
 
     struct Data
diff --git a/GScribo/regionwidget.cpp b/GScribo/regionwidget.cpp
index b343b3f..107ac80 100644
--- a/GScribo/regionwidget.cpp
+++ b/GScribo/regionwidget.cpp
@@ -1,5 +1,4 @@
 #include "regionwidget.h"
-#include <QDebug>
 
 RegionWidget::RegionWidget(QWidget *parent) :
     QTreeWidget(parent)
@@ -7,39 +6,34 @@ RegionWidget::RegionWidget(QWidget *parent) :
     setHeaderHidden(true);
     setSelectionMode(QAbstractItemView::NoSelection);
 
-    Configs *const configs = Configs::getInstance();
-
-    configs->beginGroup("region");
-
-    foreach(QString group, configs->childGroups())
-    {
-        configs->beginGroup(group);
-        GraphicsRegion::Id region = static_cast<GraphicsRegion::Id>(group.toInt());
-        QTreeWidgetItem *rootItem = createItem(static_cast<GraphicsRegion::Id>(group.toInt()));
-
-        foreach(QString subgroup, configs->childGroups())
-            rootItem->addChild(createItem(static_cast<GraphicsRegion::Id>(subgroup.toInt())));
-
-        addTopLevelItem(rootItem);
-        configs->endGroup();
-    }
-
-    configs->endGroup();
+    addTopLevelItem(createRoot("Text", GraphicsRegion::Text, GraphicsRegion::TextRegion, GraphicsRegion::Line));
+    addTopLevelItem(createRoot("Typological Lines", GraphicsRegion::Typology, GraphicsRegion::Baseline, GraphicsRegion::Meanline));
+    addTopLevelItem(createRoot("Separators", GraphicsRegion::Separators, GraphicsRegion::VerticalSeparator, GraphicsRegion::WhiteSpaceSeparator));
+    addTopLevelItem(createRoot("Miscellaneous", GraphicsRegion::Miscellaneous, GraphicsRegion::Image, GraphicsRegion::Chart));
 
     expandAll();
 
     connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(checkStateChanged(QTreeWidgetItem*)));
 }
 
-QTreeWidgetItem *RegionWidget::createItem(const GraphicsRegion::Id& region)
+QTreeWidgetItem *RegionWidget::createRoot(const QString& text, const GraphicsRegion::Id& region, const GraphicsRegion::Id& begin, const GraphicsRegion::Id& end)
 {
-    Configs *const configs = Configs::getInstance();
+    // Create root.
+    QTreeWidgetItem *rootItem = createItem(text, region);
 
-    QTreeWidgetItem *item = new QTreeWidgetItem;
+    // Fill root with corresponding childs.
+    for(int region_ = begin; region_ <= end; region_++)
+        fillRoot(rootItem, static_cast<GraphicsRegion::Id>(region_));
 
-    item->setText(0, configs->regionName(region));
-    item->setCheckState(0, configs->isRegionChecked(region) ? Qt::Checked : Qt::Unchecked);
-    item->setBackgroundColor(0, configs->regionColor(region));
+    return rootItem;
+}
+
+QTreeWidgetItem *RegionWidget::createItem(const QString& text, const GraphicsRegion::Id& region, const QColor& color)
+{
+    QTreeWidgetItem *item = new QTreeWidgetItem;
+    item->setText(0, text);
+    item->setCheckState(0, Qt::Checked);
+    item->setBackgroundColor(0, color);
     // Store graphical id in the object to recognize it afterward.
     item->setData(0, Qt::UserRole, static_cast<int>(region));
 
@@ -48,14 +42,9 @@ QTreeWidgetItem *RegionWidget::createItem(const GraphicsRegion::Id& region)
 
 void RegionWidget::checkStateChanged(QTreeWidgetItem *item)
 {
-    GraphicsRegion::Id region = static_cast<GraphicsRegion::Id>(item->data(0, Qt::UserRole).toInt());
-    bool isChecked;
-
     // If it's a root item, go to childs.
     if(item->childCount() != 0)
     {
-        isChecked = item->checkState(0) == Qt::Checked ? true : false;
-
         QTreeWidgetItem *child;
         for(int i = 0; i < item->childCount(); i++)
         {
@@ -68,17 +57,14 @@ void RegionWidget::checkStateChanged(QTreeWidgetItem *item)
         if(item->checkState(0) == Qt::Checked)
         {
             filterString_.append('|' + item->text(0));
-            isChecked = true;
+            emit checkStateChanged(static_cast<GraphicsRegion::Id>(item->data(0, Qt::UserRole).toInt()), true);
         }
         else
         {
             filterString_.remove('|' + item->text(0), Qt::CaseSensitive);
-            isChecked = false;
+            emit checkStateChanged(static_cast<GraphicsRegion::Id>(item->data(0, Qt::UserRole).toInt()), false);
         }
 
-        emit checkStateChanged(region, isChecked);
-        emit checkStateChanged(filterString());
+        //Zemit checkStateChanged(filterString_);
     }
-
-    Configs::getInstance()->setRegionChecked(region, isChecked);
 }
diff --git a/GScribo/regionwidget.h b/GScribo/regionwidget.h
index 5ab955d..aaa6eda 100644
--- a/GScribo/regionwidget.h
+++ b/GScribo/regionwidget.h
@@ -17,7 +17,9 @@ class RegionWidget :
         inline QString filterString() const;
 
     private:
-        QTreeWidgetItem *createItem(const GraphicsRegion::Id& region);
+        QTreeWidgetItem *createRoot(const QString& text, const GraphicsRegion::Id& region, const GraphicsRegion::Id& begin, const GraphicsRegion::Id& end);
+        QTreeWidgetItem *createItem(const QString& text, const GraphicsRegion::Id& region, const QColor& color = QColor::fromRgb(255, 255, 255));
+        inline void fillRoot(QTreeWidgetItem *rootItem, const GraphicsRegion::Id& region);
 
         QString filterString_;
 
@@ -29,6 +31,9 @@ class RegionWidget :
         void checkStateChanged(const QString& filterString);
 };
 
+inline void RegionWidget::fillRoot(QTreeWidgetItem *rootItem, const GraphicsRegion::Id& region)
+{ GraphicsRegion::Data data = Xml::dataFromRegion(region); filterString_.append('|' + data.name); rootItem->addChild(createItem(data.name, region, data.color)); }
+
 inline QString RegionWidget::filterString() const
 { return filterString_.right(filterString_.count()-1); }
 
diff --git a/GScribo/xml.cpp b/GScribo/xml.cpp
index 932fdad..00d6c56 100644
--- a/GScribo/xml.cpp
+++ b/GScribo/xml.cpp
@@ -1,28 +1,5 @@
 #include "xml.h"
 
-// WARNING : The order is VERY IMPORTANT (depending on the enum).
-static const GraphicsRegion::Data datas_[] =
-{
-    /*           COLOR               |             NAME            |                 REGION                |              PARENT             |  Z */
-    { QColor::fromRgb(255, 255, 255),   "Text",                         GraphicsRegion::Text,                   GraphicsRegion::None,           0 },
-    { QColor::fromRgb(0, 100, 0, 90),   "TextRegion",                   GraphicsRegion::TextRegion,             GraphicsRegion::Text,           1 },
-    { QColor::fromRgb(255, 0, 0, 90),   "Line",                         GraphicsRegion::Line,                   GraphicsRegion::Text,           2 },
-    { QColor::fromRgb(255, 255, 255),   "Separators",                   GraphicsRegion::Separators,             GraphicsRegion::None,           0 },
-    { QColor::fromRgb(0, 0, 255, 90),   "VerticalSeparatorRegion",      GraphicsRegion::VerticalSeparator,      GraphicsRegion::Separators,     2 },
-    { QColor::fromRgb(0, 0, 255, 90),   "HorizontalSeparatorRegion",    GraphicsRegion::HorizontalSeparator,    GraphicsRegion::Separators,     2 },
-    { QColor::fromRgb(0, 0, 128, 90),   "WhitespaceSeparatorRegion",    GraphicsRegion::WhiteSpaceSeparator,    GraphicsRegion::Separators,     2 },
-    { QColor::fromRgb(255, 255, 255),   "Miscellaneous",                GraphicsRegion::Miscellaneous,          GraphicsRegion::None,           0 },
-    { QColor::fromRgb(255, 120, 0, 90), "ImageRegion",                  GraphicsRegion::Image,                  GraphicsRegion::Miscellaneous,  1 },
-    { QColor::fromRgb(43, 39, 128, 90), "NoiseRegion",                  GraphicsRegion::Noise,                  GraphicsRegion::Miscellaneous,  2 },
-    { QColor::fromRgb(220, 246, 0, 90), "TableRegion",                  GraphicsRegion::Table,                  GraphicsRegion::Miscellaneous,  2 },
-    { QColor::fromRgb(170, 0, 255, 90), "MathsRegion",                  GraphicsRegion::Maths,                  GraphicsRegion::Miscellaneous,  2 },
-    { QColor::fromRgb(255, 0, 144, 90), "GraphicsRegion",               GraphicsRegion::Graphic,                GraphicsRegion::Miscellaneous,  2 },
-    { QColor::fromRgb(0, 204, 255, 90), "ChartRegion",                  GraphicsRegion::Chart,                  GraphicsRegion::Miscellaneous,  2 },
-    { QColor::fromRgb(255, 255, 255),   "Typological Lines",            GraphicsRegion::Typology,               GraphicsRegion::None,           0 },
-    { QColor::fromRgb(128, 0, 255),     "Baseline",                     GraphicsRegion::Baseline,               GraphicsRegion::Typology,       3 },
-    { QColor::fromRgb(128, 0, 255),     "Meanline",                     GraphicsRegion::Meanline,               GraphicsRegion::Typology,       3 }
-};
-
 Xml::Xml(const QString& filename)
 {
     filename_ = filename;
@@ -45,45 +22,6 @@ QString Xml::getPath(const QString& filename)
     return configs->generalSaveXmlCustomDirPath() + "/" + xmlPath;
 }
 
-void Xml::fillSettings()
-{
-    Configs *const configs = Configs::getInstance();
-
-    // Check if the configuration file has already been created.
-    if(!configs->isRegionInit())
-    {
-        configs->beginGroup("region");
-        configs->setValue("init", true);
-
-        for(int i = 0; i < 17; i++)
-        {
-            // Create group : region\father\current\...
-            if(datas_[i].parent != GraphicsRegion::None)
-            {
-                configs->beginGroup(QString::number(datas_[datas_[i].parent].region));
-                configs->beginGroup(QString::number(datas_[i].region));
-
-                configs->setValue("color", datas_[i].color);
-                configs->setValue("name", datas_[i].name);
-
-                configs->endGroup();
-                configs->endGroup();
-            }
-            else
-            {
-                configs->beginGroup(QString::number(datas_[i].region));
-
-                configs->setValue("color", datas_[i].color);
-                configs->setValue("name", datas_[i].name);
-
-                configs->endGroup();
-            }
-        }
-
-        configs->endGroup();
-    }
-}
-
 void Xml::load(const QString& filename)
 {
     if(filename.isEmpty())
diff --git a/GScribo/xml.h b/GScribo/xml.h
index 844d043..5f3575a 100644
--- a/GScribo/xml.h
+++ b/GScribo/xml.h
@@ -15,6 +15,29 @@
 #include "configs.h"
 #include "region.h"
 
+// WARNING : The order is VERY IMPORTANT (depending on the enum).
+static const GraphicsRegion::Data datas_[] =
+{
+    /*           COLOR               |             NAME            |                 REGION                |              PARENT             |  Z */
+    { QColor::fromRgb(0, 100, 0, 90),   "TextRegion",                   GraphicsRegion::TextRegion,             GraphicsRegion::Text,           1 },
+    { QColor::fromRgb(255, 0, 0, 90),   "Line",                         GraphicsRegion::Line,                   GraphicsRegion::Text,           2 },
+    { QColor::fromRgb(0, 0, 255, 90),   "VerticalSeparatorRegion",      GraphicsRegion::VerticalSeparator,      GraphicsRegion::Separators,     2 },
+    { QColor::fromRgb(0, 0, 255, 90),   "HorizontalSeparatorRegion",    GraphicsRegion::HorizontalSeparator,    GraphicsRegion::Separators,     2 },
+    { QColor::fromRgb(0, 0, 128, 90),   "WhitespaceSeparatorRegion",    GraphicsRegion::WhiteSpaceSeparator,    GraphicsRegion::Separators,     2 },
+    { QColor::fromRgb(255, 120, 0, 90), "ImageRegion",                  GraphicsRegion::Image,                  GraphicsRegion::Miscellaneous,  1 },
+    { QColor::fromRgb(43, 39, 128, 90), "NoiseRegion",                  GraphicsRegion::Noise,                  GraphicsRegion::Miscellaneous,  2 },
+    { QColor::fromRgb(220, 246, 0, 90), "TableRegion",                  GraphicsRegion::Table,                  GraphicsRegion::Miscellaneous,  2 },
+    { QColor::fromRgb(170, 0, 255, 90), "MathsRegion",                  GraphicsRegion::Maths,                  GraphicsRegion::Miscellaneous,  2 },
+    { QColor::fromRgb(255, 0, 144, 90), "GraphicsRegion",               GraphicsRegion::Graphic,                GraphicsRegion::Miscellaneous,  2 },
+    { QColor::fromRgb(0, 204, 255, 90), "ChartRegion",                  GraphicsRegion::Chart,                  GraphicsRegion::Miscellaneous,  2 },
+    { QColor::fromRgb(128, 0, 255),     "Baseline",                     GraphicsRegion::Baseline,               GraphicsRegion::Typology,       3 },
+    { QColor::fromRgb(128, 0, 255),     "Meanline",                     GraphicsRegion::Meanline,               GraphicsRegion::Typology,       3 },
+    { QColor::fromRgb(255, 255, 255),   "Text",                         GraphicsRegion::Text,                   GraphicsRegion::None,           0 },
+    { QColor::fromRgb(255, 255, 255),   "Separators",                   GraphicsRegion::Separators,             GraphicsRegion::None,           0 },
+    { QColor::fromRgb(255, 255, 255),   "Miscellaneous",                GraphicsRegion::Miscellaneous,          GraphicsRegion::None,           0 },
+    { QColor::fromRgb(255, 255, 255),   "Typological Lines",            GraphicsRegion::Typology,               GraphicsRegion::None,           0 }
+};
+
 class Xml
 {
     public:
@@ -29,7 +52,7 @@ class Xml
         static QString getPath(const QString& filename);
 
         void load(const QString& filename);
-        void fillSettings();
+        inline static GraphicsRegion::Data dataFromRegion(GraphicsRegion::Id region);
 
     private:
         XmlItem *init(const QDomElement& root, XmlItem *rootTreeItem);
@@ -57,4 +80,7 @@ inline QDomDocument Xml::document() const
 inline QString Xml::filename() const
 { return filename_; }
 
+inline GraphicsRegion::Data Xml::dataFromRegion(GraphicsRegion::Id region)
+{ return datas_[region]; }
+
 #endif // XML_H
-- 
1.7.2.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/khalimsky has been updated
       via  15818fbcdb105f1f7eb01158735bd6a3b1f0be18 (commit)
      from  b6639f3d0ce081505e3cc56084e1b127e7dfb771 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
15818fb mln/world/k1/un_immerse.hh: Work in K1 space instead of K2.
-----------------------------------------------------------------------
Summary of changes:
 milena/mln/world/k1/un_immerse.hh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hooks/post-receive
-- 
Olena, a generic and efficient image processing platform
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/khalimsky has been updated
       via  b6639f3d0ce081505e3cc56084e1b127e7dfb771 (commit)
      from  c8f12e33e0957cf812129ba9a3ebd560621e873e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
b6639f3 mln/util/ztree_of_shapes.hh: Fix warnings.
-----------------------------------------------------------------------
Summary of changes:
 milena/ChangeLog                   |    4 ++++
 milena/mln/util/ztree_of_shapes.hh |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
hooks/post-receive
-- 
Olena, a generic and efficient image processing platform
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    12 Feb '13
                    
                        ---
 milena/ChangeLog                   |    4 ++++
 milena/mln/util/ztree_of_shapes.hh |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f6fc620..20dff54 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-12  Guillaume Lazzara  <z(a)lrde.epita.fr>
+
+	* mln/util/ztree_of_shapes.hh: Fix warnings.
+
 2013-02-11  Guillaume Lazzara  <z(a)lrde.epita.fr>
 
 	* mln/world/kn/compute_tree_of_shapes.hh: Do not use random
diff --git a/milena/mln/util/ztree_of_shapes.hh b/milena/mln/util/ztree_of_shapes.hh
index 641f0fc..7e8ddeb 100644
--- a/milena/mln/util/ztree_of_shapes.hh
+++ b/milena/mln/util/ztree_of_shapes.hh
@@ -400,7 +400,7 @@ namespace mln
       // debug::println(parent_);
 # endif // ! RELEASE
 
-      for (int i = 0; i < tree.R.size(); ++i)
+      for (unsigned i = 0; i < tree.R.size(); ++i)
 	R.push_back(offset_of(tree.R[i]));
 
       // Initialize R0, 0-representative faces and R01 representative
-- 
1.7.2.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        #236: Implement a VTK loader
----------------------+-----------------------------------------------------
 Reporter:  levill_r  |       Owner:  Olena Team
     Type:  task      |      Status:  new       
 Priority:  minor     |   Milestone:  Olena 1.1 
Component:  Milena    |     Version:  1.0       
 Keywords:  I/O       |  
----------------------+-----------------------------------------------------
 I.e., `mln::io::vtk::load`.
 See also source:milena/mln/io/vtk/save.hh.
-- 
Ticket URL: <https://trac.lrde.org/olena/ticket/236>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [Olena] #188: Implement more windows, neighborhoods, and corresponding iterators for complex-based images
                        
                        
by Olena Trac 12 Feb '13
                    by Olena Trac 12 Feb '13
12 Feb '13
                    
                        #188: Implement more windows, neighborhoods, and corresponding iterators for
complex-based images
----------------------+-----------------------------------------------------
 Reporter:  levill_r  |       Owner:  levill_r 
     Type:  task      |      Status:  new      
 Priority:  minor     |   Milestone:  Olena 1.1
Component:  Milena    |     Version:  1.0      
 Keywords:            |  
----------------------+-----------------------------------------------------
 This ticket is a sequel to #162.
 In addition to the neighborhoods, windows, and iterators for complex-based
 images from #162, implement windows/neighborhoods (and corresponding
 iterators) returning the following elements (where ''n'' is a (fixed)
 dimension and ''p'' a psite on an ''n''-face).
  `complex_cell_window`:: the set of the faces in the « cell » including
 ''p'' (named « ''p''-hat » in
   couprie.08.pami), i.e. the set of all ''m''-faces transitively adjacent
 to ''p'',
   where ''m'' is in [0, ''n''-1].[[BR]]
   In that definition, ''p'' is said adjacent to an ''m''-face ''q'' if
 there is a sequence (''m,,1,,'', ''m,,2,,'', ..., ''m,,k,,'') of faces so
 that
    * ''m,,1,,'' is an (''n''-1)-face adjacent to ''p'' ;
    * ''m,,2,,'' is an (''n''-2)-face adjacent to ''m,,1,,'' ;
    * ... (and so on)
    * ''m,,k,,'' is an (''m''+1)-face adjacent to ''q''.
  `complex_boundary_cell_window`:: Likewise, but excluding ''p'' (named «
 ''p''-hat* » in couprie.08.pami).
 And maybe:
  `complex_lower_dims_connected_window`:: the set of ''n''-faces sharing a
 (''n''-1)-face or (''n''-2)-face etc. (by transitivity) with ''p'' (is it
 useful?);
  `complex_higher_dims_connected_window`:: the set of ''n''-faces sharing a
 (''n''+1)-face or (''n''+2)-face etc. (by transitivity) with ''p'' (is it
 useful?);
  * what else?
 As in #139,
  * we might want to factor things using implementation classes:
    * ``mln::internal::complex_vicinity``
    * ``mln::internal::complex_vicinity_piter``
  (we might even be able to factor them with graph-based ones);
  * we could have one or several generic classes, using static or dynamic
 predicates, to implement those windows and neighborhoods.
 Note that some of these iterators might implement operators on complexes,
 see
 http://en.wikipedia.org/wiki/Simplicial_complex#Closure.2C_star.2C_and_link.
 Do not forget to update [wiki:Olena/ComplexBasedImages].
-- 
Ticket URL: <https://trac.lrde.org/olena/ticket/188>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            43feab8 Test to change the static const array and	load wanted data in QSettings but do not work.
                        
                        
by Antoine Froger 12 Feb '13
                    by Antoine Froger 12 Feb '13
12 Feb '13
                    
                        * xml.cpp: Create the function "fillSettings" that store wanted data from the array in settings with group string for hierarchy.
* regionwidget.cpp: Try to implement the function "createItem" which take a GraphicsRegion and load data from QSettings with it. Do not wok because can t get the string from the enum and casting the enum in int and string do not work in that case.
* configs.h: Implement functions to get/ set data from groups of settings created in xml.cpp.
---
 GScribo/GScribo.pro                          |    4 +-
 GScribo/GScribo.pro.user                     |   26 +++++----
 GScribo/Preferences/generaloptions.cpp       |    4 +-
 GScribo/Preferences/ocroptions.cpp           |    6 +--
 GScribo/Preferences/preprocessingoptions.cpp |    6 +-
 GScribo/Preferences/segmentationoptions.cpp  |    2 -
 GScribo/configs.h                            |   32 +++++++++++-
 GScribo/mainwindow.cpp                       |    7 ++-
 GScribo/mainwindow.h                         |    6 +-
 GScribo/region.h                             |   19 ++++---
 GScribo/regionwidget.cpp                     |   56 +++++++++++++--------
 GScribo/regionwidget.h                       |    7 +--
 GScribo/xml.cpp                              |   70 ++++++++++++++++++++++++--
 GScribo/xml.h                                |   24 +--------
 14 files changed, 174 insertions(+), 95 deletions(-)
diff --git a/GScribo/GScribo.pro b/GScribo/GScribo.pro
index 9a7f566..d845d32 100644
--- a/GScribo/GScribo.pro
+++ b/GScribo/GScribo.pro
@@ -19,17 +19,18 @@ SOURCES += main.cpp \
     Rendering/regionitem.cpp \
     PagesWidget/pageswidget.cpp \
     PagesWidget/pagesmodel.cpp \
+    PagesWidget/pagesdelegate.cpp \
     Preferences/segmentationoptions.cpp \
     Preferences/preprocessingoptions.cpp \
     Preferences/ocroptions.cpp \
     Preferences/generaloptions.cpp \
     Preferences/preferencesdialog.cpp \
+    Processing/progressdialog.cpp \
     XmlWidget/xmlwidget.cpp \
     XmlWidget/xmlmodel.cpp \
     XmlWidget/xmlitem.cpp \
     XmlWidget/xmlattributes.cpp \
     XmlWidget/attributesmodel.cpp \
-    PagesWidget/pagesdelegate.cpp \
     XmlWidget/xmlview.cpp \
     regionwidget.cpp
 HEADERS += mainwindow.h \
@@ -49,6 +50,7 @@ HEADERS += mainwindow.h \
     Preferences/generaloptions.h \
     Preferences/optionwidget.h \
     Preferences/preferencesdialog.h \
+    Processing/progressdialog.h \
     XmlWidget/xmlwidget.h \
     XmlWidget/xmlmodel.h \
     XmlWidget/xmlitem.h \
diff --git a/GScribo/GScribo.pro.user b/GScribo/GScribo.pro.user
index c09700a..f152178 100644
--- a/GScribo/GScribo.pro.user
+++ b/GScribo/GScribo.pro.user
@@ -76,7 +76,7 @@
   <valuemap type="QVariantMap">
    <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
    <valuelist key="abstractProcess.Environment" type="QVariantList">
-    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-03fTGGiTWR,guid=f9287e073281b805202d469e0005349f</value>
+    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-bUeJ6Q6yr3,guid=f61c0677e7161026c52fc89400064242</value>
     <value type="QString">DESKTOP_SESSION=fluxbox</value>
     <value type="QString">DISPLAY=:0.0</value>
     <value type="QString">GDMSESSION=fluxbox</value>
@@ -85,6 +85,7 @@
     <value type="QString">GTK_MODULES=canberra-gtk-module</value>
     <value type="QString">HOME=/lrde/home/stage/froger_a</value>
     <value type="QString">LANG=fr_FR.UTF-8</value>
+    <value type="QString">LANGUAGE=</value>
     <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
     <value type="QString">LOGNAME=froger_a</value>
     <value type="QString">OLDPWD=/lrde/home/stage/froger_a/qt</value>
@@ -93,16 +94,16 @@
     <value type="QString">QTDIR=/usr/share/qt4</value>
     <value type="QString">SHELL=/bin/bash</value>
     <value type="QString">SHLVL=2</value>
-    <value type="QString">SSH_AGENT_PID=25183</value>
-    <value type="QString">SSH_AUTH_SOCK=/tmp/ssh-WbmKk25130/agent.25130</value>
+    <value type="QString">SSH_AGENT_PID=29535</value>
+    <value type="QString">SSH_AUTH_SOCK=/tmp/ssh-PCwYf29482/agent.29482</value>
     <value type="QString">TERM=xterm</value>
     <value type="QString">USER=froger_a</value>
     <value type="QString">USERNAME=froger_a</value>
     <value type="QString">WINDOWID=10485796</value>
-    <value type="QString">WINDOWPATH=7:8:8:8:8</value>
-    <value type="QString">XAUTHORITY=/tmp/.gdmYZ8GSW</value>
+    <value type="QString">WINDOWPATH=7:8:8:8:8:8</value>
+    <value type="QString">XAUTHORITY=/tmp/.gdmQ6NBSW</value>
     <value type="QString">XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/</value>
-    <value type="QString">XDG_SESSION_COOKIE=9a5c41ad78622411b8e25b00459a554f-1360586360.314321-1166498812</value>
+    <value type="QString">XDG_SESSION_COOKIE=9a5c41ad78622411b8e25b00459a554f-1360655387.142140-2081338543</value>
     <value type="QString">XTERM_LOCALE=fr_FR.UTF-8</value>
     <value type="QString">XTERM_SHELL=/bin/bash</value>
     <value type="QString">XTERM_VERSION=XTerm(261)</value>
@@ -125,7 +126,7 @@
   <valuemap type="QVariantMap">
    <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
    <valuelist key="abstractProcess.Environment" type="QVariantList">
-    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-03fTGGiTWR,guid=f9287e073281b805202d469e0005349f</value>
+    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-bUeJ6Q6yr3,guid=f61c0677e7161026c52fc89400064242</value>
     <value type="QString">DESKTOP_SESSION=fluxbox</value>
     <value type="QString">DISPLAY=:0.0</value>
     <value type="QString">GDMSESSION=fluxbox</value>
@@ -134,6 +135,7 @@
     <value type="QString">GTK_MODULES=canberra-gtk-module</value>
     <value type="QString">HOME=/lrde/home/stage/froger_a</value>
     <value type="QString">LANG=fr_FR.UTF-8</value>
+    <value type="QString">LANGUAGE=</value>
     <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
     <value type="QString">LOGNAME=froger_a</value>
     <value type="QString">OLDPWD=/lrde/home/stage/froger_a/qt</value>
@@ -142,16 +144,16 @@
     <value type="QString">QTDIR=/usr/share/qt4</value>
     <value type="QString">SHELL=/bin/bash</value>
     <value type="QString">SHLVL=2</value>
-    <value type="QString">SSH_AGENT_PID=25183</value>
-    <value type="QString">SSH_AUTH_SOCK=/tmp/ssh-WbmKk25130/agent.25130</value>
+    <value type="QString">SSH_AGENT_PID=29535</value>
+    <value type="QString">SSH_AUTH_SOCK=/tmp/ssh-PCwYf29482/agent.29482</value>
     <value type="QString">TERM=xterm</value>
     <value type="QString">USER=froger_a</value>
     <value type="QString">USERNAME=froger_a</value>
     <value type="QString">WINDOWID=10485796</value>
-    <value type="QString">WINDOWPATH=7:8:8:8:8</value>
-    <value type="QString">XAUTHORITY=/tmp/.gdmYZ8GSW</value>
+    <value type="QString">WINDOWPATH=7:8:8:8:8:8</value>
+    <value type="QString">XAUTHORITY=/tmp/.gdmQ6NBSW</value>
     <value type="QString">XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/</value>
-    <value type="QString">XDG_SESSION_COOKIE=9a5c41ad78622411b8e25b00459a554f-1360586360.314321-1166498812</value>
+    <value type="QString">XDG_SESSION_COOKIE=9a5c41ad78622411b8e25b00459a554f-1360655387.142140-2081338543</value>
     <value type="QString">XTERM_LOCALE=fr_FR.UTF-8</value>
     <value type="QString">XTERM_SHELL=/bin/bash</value>
     <value type="QString">XTERM_VERSION=XTerm(261)</value>
diff --git a/GScribo/Preferences/generaloptions.cpp b/GScribo/Preferences/generaloptions.cpp
index 39a0160..620a8fd 100644
--- a/GScribo/Preferences/generaloptions.cpp
+++ b/GScribo/Preferences/generaloptions.cpp
@@ -16,7 +16,7 @@ GeneralOptions::~GeneralOptions()
 
 void GeneralOptions::loadConfig()
 {
-    Configs * const conf = Configs::getInstance();
+    Configs *const conf = Configs::getInstance();
 
     ui->saveXml->setChecked(conf->generalSaveXmlEnabled());
     ui->sameDir->setChecked(conf->generalSaveXmlSameDir());
@@ -27,7 +27,7 @@ void GeneralOptions::loadConfig()
 
 void GeneralOptions::saveConfig()
 {
-    Configs * const conf = Configs::getInstance();
+    Configs *const conf = Configs::getInstance();
 
     conf->setGeneralSaveXmlEnabled(ui->saveXml->isChecked());
     conf->setGeneralSaveXmlSameDir(ui->sameDir->isChecked());
diff --git a/GScribo/Preferences/ocroptions.cpp b/GScribo/Preferences/ocroptions.cpp
index ac337ed..fff05b2 100644
--- a/GScribo/Preferences/ocroptions.cpp
+++ b/GScribo/Preferences/ocroptions.cpp
@@ -1,8 +1,6 @@
 #include "ocroptions.h"
 #include "ui_ocroptions.h"
 
-//using namespace scribo::toolchain::internal;
-
 static const char *language[][2] =
 {
     { "English", "eng" },
@@ -39,7 +37,7 @@ int OcrOptions::findIndex(const QString& lang)
 
 void OcrOptions::loadConfig()
 {
-    Configs * const conf = Configs::getInstance();
+    Configs *const conf = Configs::getInstance();
 
     ui->enable_ocr->setChecked(conf->ocrEnabled());
     ui->ocr_language->setCurrentIndex(findIndex(conf->ocrLanguage()));
@@ -48,7 +46,7 @@ void OcrOptions::loadConfig()
 
 void OcrOptions::saveConfig()
 {
-    Configs * const conf = Configs::getInstance();
+    Configs *const conf = Configs::getInstance();
 
     conf->setOcrEnabled(ui->enable_ocr->isChecked());
     conf->setOcrLanguage(language[ui->ocr_language->currentIndex()][1]);
diff --git a/GScribo/Preferences/preprocessingoptions.cpp b/GScribo/Preferences/preprocessingoptions.cpp
index f7a6647..640ad32 100644
--- a/GScribo/Preferences/preprocessingoptions.cpp
+++ b/GScribo/Preferences/preprocessingoptions.cpp
@@ -23,7 +23,7 @@ PreprocessingOptions::~PreprocessingOptions()
 
 void PreprocessingOptions::loadConfig()
 {
-    Configs * const conf = Configs::getInstance();
+    Configs *const conf = Configs::getInstance();
 
     ui->subsampleCb->setChecked(conf->preprocessingSubsample());
     ui->remove_bgCb->setChecked(conf->preprocessingRemoveBg());
@@ -35,11 +35,11 @@ void PreprocessingOptions::loadConfig()
 
 void PreprocessingOptions::saveConfig()
 {
-    Configs * const conf = Configs::getInstance();
+    Configs *const conf = Configs::getInstance();
 
     conf->setPreprocessingSubsample(ui->subsampleCb->isChecked());
     conf->setPreprocessingRemoveBg(ui->remove_bgCb->isChecked());
     conf->setPreprocessingDeskew(ui->deskewCb->isChecked());
     conf->setPreprocessingRemoveNoise(ui->remove_noiseCb->isChecked());
-    conf->setPreprocessingBinAlgo(ui->bin_algoCbox->currentIndex());
+    //conf->setPreprocessingBinAlgo(ui->bin_algoCbox->currentIndex());
 }
diff --git a/GScribo/Preferences/segmentationoptions.cpp b/GScribo/Preferences/segmentationoptions.cpp
index ef47f66..d35209f 100644
--- a/GScribo/Preferences/segmentationoptions.cpp
+++ b/GScribo/Preferences/segmentationoptions.cpp
@@ -1,8 +1,6 @@
 #include "segmentationoptions.h"
 #include "ui_segmentationoptions.h"
 
-//using namespace scribo::toolchain::internal;
-
 SegmentationOptions::SegmentationOptions(QWidget *parent) :
         OptionWidget(parent),
         ui(new Ui::SegmentationOptions)
diff --git a/GScribo/configs.h b/GScribo/configs.h
index 97e5528..d4023b9 100644
--- a/GScribo/configs.h
+++ b/GScribo/configs.h
@@ -4,6 +4,7 @@
 //#include <scribo/toolchain/internal/text_in_doc_preprocess_functor.hh>
 #include <QSettings>
 #include <QDir>
+#include <QDebug>
 
 #include "region.h"
 
@@ -11,10 +12,14 @@ class Configs :
         public QSettings
 {
     public:
-        Configs() : QSettings("olena-scribo", "gui") { }
+        inline static Configs *getInstance();
 
-        static Configs * getInstance()
-        { static Configs *conf = new Configs(); return conf; }
+        inline bool isRegionInit();
+        inline QColor regionColor(const GraphicsRegion::Id& region);
+        inline QString regionName(const GraphicsRegion::Id& region);
+
+        inline bool isRegionChecked(const GraphicsRegion::Id& region);
+        inline void setRegionChecked(const GraphicsRegion::Id& region, bool checked);
 
         inline bool preprocessingSubsample();
         inline void setPreprocessingSubsample(bool b);
@@ -51,8 +56,29 @@ class Configs :
 
         inline QString generalSaveXmlCustomDirPath();
         inline void setGeneralSaveXmlCustomDirPath(const QString& path);
+
+    private:
+        explicit Configs() : QSettings("olena-scribo", "gui") { }
 };
 
+inline Configs *Configs::getInstance()
+{ static Configs *conf = new Configs(); return conf; }
+
+inline bool Configs::isRegionInit()
+{ return value("region/init", false).toBool(); }
+
+inline bool Configs::isRegionChecked(const GraphicsRegion::Id ®ion)
+{ return value("region/" + QString::number(region) + "/checked", true).toBool(); }
+
+inline void Configs::setRegionChecked(const GraphicsRegion::Id ®ion, bool checked)
+{ setValue("region/" + QString::number(region) + "/checked", checked); }
+
+inline QColor Configs::regionColor(const GraphicsRegion::Id& region)
+{ return value("region/" + QString::number(region) + "color").value<QColor>(); }
+
+inline QString Configs::regionName(const GraphicsRegion::Id ®ion)
+{ beginGroup("region"); beginGroup(QString::number(region)); QString l = value("name").toString(); endGroup(); endGroup(); qDebug() << l; return l; }
+
 inline bool Configs::preprocessingSubsample()
 { return value("preprocessing/subsample", false).toBool(); }
 
diff --git a/GScribo/mainwindow.cpp b/GScribo/mainwindow.cpp
index 44c4583..e939694 100644
--- a/GScribo/mainwindow.cpp
+++ b/GScribo/mainwindow.cpp
@@ -9,11 +9,12 @@ MainWindow::MainWindow(QWidget *parent) :
 
     setWindowTitle(tr("GScribo"));
 
+    xml_.fillSettings();
     initGraphicsRegion();
     initTextRegion();
     initXmlWidget();
-    initPageWidget();
     initRegionWidget();
+    initPageWidget();
     initToolBar();
     initMenuBar();
 
@@ -190,8 +191,8 @@ void MainWindow::onSegment()
 
 void MainWindow::onPreferences()
 {
-    //PreferencesDialog *preferenceDialog = new PreferencesDialog(this);
-    //preferenceDialog->show();
+    PreferencesDialog *preferenceDialog = new PreferencesDialog(this);
+    preferenceDialog->show();
 }
 
 void MainWindow::onXmlSaved(const QString& filename)
diff --git a/GScribo/mainwindow.h b/GScribo/mainwindow.h
index 7e84fc3..efe6b81 100644
--- a/GScribo/mainwindow.h
+++ b/GScribo/mainwindow.h
@@ -9,8 +9,8 @@
 #include <QFileDialog>
 #include <QGroupBox>
 
-//#include "Preferences/preferencesdialog.h"
-//#include "Processing/progressdialog.h"
+#include "Preferences/preferencesdialog.h"
+#include "Processing/progressdialog.h"
 #include "PagesWidget/pageswidget.h"
 #include "XmlWidget/xmlwidget.h"
 //#include "Processing/runner.h"
@@ -64,7 +64,7 @@ class MainWindow:
 
         QPlainTextEdit textEdit_;
 
-        //ProgressDialog progressDialog_;
+        ProgressDialog progressDialog_;
         //Runner runner_;
 
         XmlWidget xmlWidget_;
diff --git a/GScribo/region.h b/GScribo/region.h
index b3d7d2a..d1fcee7 100644
--- a/GScribo/region.h
+++ b/GScribo/region.h
@@ -5,15 +5,21 @@
 
 namespace GraphicsRegion
 {
+    // WARNING : The order is important.
     enum Id
     {
-        Text = 0,
+        None,
+
+        Text,
+        TextRegion,
         Line,
 
+        Separators,
         VerticalSeparator,
         HorizontalSeparator,
         WhiteSpaceSeparator,
 
+        Miscellaneous,
         Image,
         Noise,
         Table,
@@ -21,15 +27,9 @@ namespace GraphicsRegion
         Graphic,
         Chart,
 
+        Typology,
         Baseline,
-        Meanline,
-
-        TextRegion,
-        SeparatorRegion,
-        MiscRegion,
-        TypoRegion,
-
-        None
+        Meanline
     };
 
     struct Data
@@ -37,6 +37,7 @@ namespace GraphicsRegion
         QColor color;
         QString name;
         GraphicsRegion::Id region;
+        GraphicsRegion::Id parent;
         int zValue;
     };
 }
diff --git a/GScribo/regionwidget.cpp b/GScribo/regionwidget.cpp
index 219a9ba..b343b3f 100644
--- a/GScribo/regionwidget.cpp
+++ b/GScribo/regionwidget.cpp
@@ -1,4 +1,5 @@
 #include "regionwidget.h"
+#include <QDebug>
 
 RegionWidget::RegionWidget(QWidget *parent) :
     QTreeWidget(parent)
@@ -6,34 +7,39 @@ RegionWidget::RegionWidget(QWidget *parent) :
     setHeaderHidden(true);
     setSelectionMode(QAbstractItemView::NoSelection);
 
-    addTopLevelItem(createRoot("Text", GraphicsRegion::TextRegion, GraphicsRegion::Text, GraphicsRegion::Line));
-    addTopLevelItem(createRoot("Typological Lines", GraphicsRegion::TypoRegion, GraphicsRegion::Baseline, GraphicsRegion::Meanline));
-    addTopLevelItem(createRoot("Separators", GraphicsRegion::SeparatorRegion, GraphicsRegion::VerticalSeparator, GraphicsRegion::WhiteSpaceSeparator));
-    addTopLevelItem(createRoot("Miscellaneous", GraphicsRegion::MiscRegion, GraphicsRegion::Image, GraphicsRegion::Chart));
+    Configs *const configs = Configs::getInstance();
 
-    expandAll();
+    configs->beginGroup("region");
 
-    connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(checkStateChanged(QTreeWidgetItem*)));
-}
+    foreach(QString group, configs->childGroups())
+    {
+        configs->beginGroup(group);
+        GraphicsRegion::Id region = static_cast<GraphicsRegion::Id>(group.toInt());
+        QTreeWidgetItem *rootItem = createItem(static_cast<GraphicsRegion::Id>(group.toInt()));
 
-QTreeWidgetItem *RegionWidget::createRoot(const QString& text, const GraphicsRegion::Id& region, const GraphicsRegion::Id& begin, const GraphicsRegion::Id& end)
-{
-    // Create root.
-    QTreeWidgetItem *rootItem = createItem(text, region);
+        foreach(QString subgroup, configs->childGroups())
+            rootItem->addChild(createItem(static_cast<GraphicsRegion::Id>(subgroup.toInt())));
+
+        addTopLevelItem(rootItem);
+        configs->endGroup();
+    }
 
-    // Fill root with corresponding childs.
-    for(int region_ = begin; region_ <= end; region_++)
-        fillRoot(rootItem, static_cast<GraphicsRegion::Id>(region_));
+    configs->endGroup();
 
-    return rootItem;
+    expandAll();
+
+    connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(checkStateChanged(QTreeWidgetItem*)));
 }
 
-QTreeWidgetItem *RegionWidget::createItem(const QString& text, const GraphicsRegion::Id& region, const QColor& color)
+QTreeWidgetItem *RegionWidget::createItem(const GraphicsRegion::Id& region)
 {
+    Configs *const configs = Configs::getInstance();
+
     QTreeWidgetItem *item = new QTreeWidgetItem;
-    item->setText(0, text);
-    item->setCheckState(0, Qt::Checked);
-    item->setBackgroundColor(0, color);
+
+    item->setText(0, configs->regionName(region));
+    item->setCheckState(0, configs->isRegionChecked(region) ? Qt::Checked : Qt::Unchecked);
+    item->setBackgroundColor(0, configs->regionColor(region));
     // Store graphical id in the object to recognize it afterward.
     item->setData(0, Qt::UserRole, static_cast<int>(region));
 
@@ -42,9 +48,14 @@ QTreeWidgetItem *RegionWidget::createItem(const QString& text, const GraphicsReg
 
 void RegionWidget::checkStateChanged(QTreeWidgetItem *item)
 {
+    GraphicsRegion::Id region = static_cast<GraphicsRegion::Id>(item->data(0, Qt::UserRole).toInt());
+    bool isChecked;
+
     // If it's a root item, go to childs.
     if(item->childCount() != 0)
     {
+        isChecked = item->checkState(0) == Qt::Checked ? true : false;
+
         QTreeWidgetItem *child;
         for(int i = 0; i < item->childCount(); i++)
         {
@@ -57,14 +68,17 @@ void RegionWidget::checkStateChanged(QTreeWidgetItem *item)
         if(item->checkState(0) == Qt::Checked)
         {
             filterString_.append('|' + item->text(0));
-            emit checkStateChanged(static_cast<GraphicsRegion::Id>(item->data(0, Qt::UserRole).toInt()), true);
+            isChecked = true;
         }
         else
         {
             filterString_.remove('|' + item->text(0), Qt::CaseSensitive);
-            emit checkStateChanged(static_cast<GraphicsRegion::Id>(item->data(0, Qt::UserRole).toInt()), false);
+            isChecked = false;
         }
 
+        emit checkStateChanged(region, isChecked);
         emit checkStateChanged(filterString());
     }
+
+    Configs::getInstance()->setRegionChecked(region, isChecked);
 }
diff --git a/GScribo/regionwidget.h b/GScribo/regionwidget.h
index aaa6eda..5ab955d 100644
--- a/GScribo/regionwidget.h
+++ b/GScribo/regionwidget.h
@@ -17,9 +17,7 @@ class RegionWidget :
         inline QString filterString() const;
 
     private:
-        QTreeWidgetItem *createRoot(const QString& text, const GraphicsRegion::Id& region, const GraphicsRegion::Id& begin, const GraphicsRegion::Id& end);
-        QTreeWidgetItem *createItem(const QString& text, const GraphicsRegion::Id& region, const QColor& color = QColor::fromRgb(255, 255, 255));
-        inline void fillRoot(QTreeWidgetItem *rootItem, const GraphicsRegion::Id& region);
+        QTreeWidgetItem *createItem(const GraphicsRegion::Id& region);
 
         QString filterString_;
 
@@ -31,9 +29,6 @@ class RegionWidget :
         void checkStateChanged(const QString& filterString);
 };
 
-inline void RegionWidget::fillRoot(QTreeWidgetItem *rootItem, const GraphicsRegion::Id& region)
-{ GraphicsRegion::Data data = Xml::dataFromRegion(region); filterString_.append('|' + data.name); rootItem->addChild(createItem(data.name, region, data.color)); }
-
 inline QString RegionWidget::filterString() const
 { return filterString_.right(filterString_.count()-1); }
 
diff --git a/GScribo/xml.cpp b/GScribo/xml.cpp
index 74e62b7..932fdad 100644
--- a/GScribo/xml.cpp
+++ b/GScribo/xml.cpp
@@ -1,15 +1,38 @@
 #include "xml.h"
 
+// WARNING : The order is VERY IMPORTANT (depending on the enum).
+static const GraphicsRegion::Data datas_[] =
+{
+    /*           COLOR               |             NAME            |                 REGION                |              PARENT             |  Z */
+    { QColor::fromRgb(255, 255, 255),   "Text",                         GraphicsRegion::Text,                   GraphicsRegion::None,           0 },
+    { QColor::fromRgb(0, 100, 0, 90),   "TextRegion",                   GraphicsRegion::TextRegion,             GraphicsRegion::Text,           1 },
+    { QColor::fromRgb(255, 0, 0, 90),   "Line",                         GraphicsRegion::Line,                   GraphicsRegion::Text,           2 },
+    { QColor::fromRgb(255, 255, 255),   "Separators",                   GraphicsRegion::Separators,             GraphicsRegion::None,           0 },
+    { QColor::fromRgb(0, 0, 255, 90),   "VerticalSeparatorRegion",      GraphicsRegion::VerticalSeparator,      GraphicsRegion::Separators,     2 },
+    { QColor::fromRgb(0, 0, 255, 90),   "HorizontalSeparatorRegion",    GraphicsRegion::HorizontalSeparator,    GraphicsRegion::Separators,     2 },
+    { QColor::fromRgb(0, 0, 128, 90),   "WhitespaceSeparatorRegion",    GraphicsRegion::WhiteSpaceSeparator,    GraphicsRegion::Separators,     2 },
+    { QColor::fromRgb(255, 255, 255),   "Miscellaneous",                GraphicsRegion::Miscellaneous,          GraphicsRegion::None,           0 },
+    { QColor::fromRgb(255, 120, 0, 90), "ImageRegion",                  GraphicsRegion::Image,                  GraphicsRegion::Miscellaneous,  1 },
+    { QColor::fromRgb(43, 39, 128, 90), "NoiseRegion",                  GraphicsRegion::Noise,                  GraphicsRegion::Miscellaneous,  2 },
+    { QColor::fromRgb(220, 246, 0, 90), "TableRegion",                  GraphicsRegion::Table,                  GraphicsRegion::Miscellaneous,  2 },
+    { QColor::fromRgb(170, 0, 255, 90), "MathsRegion",                  GraphicsRegion::Maths,                  GraphicsRegion::Miscellaneous,  2 },
+    { QColor::fromRgb(255, 0, 144, 90), "GraphicsRegion",               GraphicsRegion::Graphic,                GraphicsRegion::Miscellaneous,  2 },
+    { QColor::fromRgb(0, 204, 255, 90), "ChartRegion",                  GraphicsRegion::Chart,                  GraphicsRegion::Miscellaneous,  2 },
+    { QColor::fromRgb(255, 255, 255),   "Typological Lines",            GraphicsRegion::Typology,               GraphicsRegion::None,           0 },
+    { QColor::fromRgb(128, 0, 255),     "Baseline",                     GraphicsRegion::Baseline,               GraphicsRegion::Typology,       3 },
+    { QColor::fromRgb(128, 0, 255),     "Meanline",                     GraphicsRegion::Meanline,               GraphicsRegion::Typology,       3 }
+};
+
 Xml::Xml(const QString& filename)
 {
     filename_ = filename;
+
     load(filename);
 }
 
 QString Xml::getPath(const QString& filename)
 {
-    // Get instance of the configuration settings.
-    Configs *const conf = Configs::getInstance();
+    Configs *const configs = Configs::getInstance();
 
     QString xmlPath = filename;
 
@@ -19,7 +42,46 @@ QString Xml::getPath(const QString& filename)
     xmlPath.remove(pos, xmlPath.length()-pos);
     xmlPath += "_gui.xml";
 
-    return conf->generalSaveXmlCustomDirPath() + "/" + xmlPath;
+    return configs->generalSaveXmlCustomDirPath() + "/" + xmlPath;
+}
+
+void Xml::fillSettings()
+{
+    Configs *const configs = Configs::getInstance();
+
+    // Check if the configuration file has already been created.
+    if(!configs->isRegionInit())
+    {
+        configs->beginGroup("region");
+        configs->setValue("init", true);
+
+        for(int i = 0; i < 17; i++)
+        {
+            // Create group : region\father\current\...
+            if(datas_[i].parent != GraphicsRegion::None)
+            {
+                configs->beginGroup(QString::number(datas_[datas_[i].parent].region));
+                configs->beginGroup(QString::number(datas_[i].region));
+
+                configs->setValue("color", datas_[i].color);
+                configs->setValue("name", datas_[i].name);
+
+                configs->endGroup();
+                configs->endGroup();
+            }
+            else
+            {
+                configs->beginGroup(QString::number(datas_[i].region));
+
+                configs->setValue("color", datas_[i].color);
+                configs->setValue("name", datas_[i].name);
+
+                configs->endGroup();
+            }
+        }
+
+        configs->endGroup();
+    }
 }
 
 void Xml::load(const QString& filename)
@@ -115,7 +177,7 @@ void Xml::processNode(const QDomElement& root, const GraphicsRegion::Data& data,
         regionItem->setRegionItem(graphicsItem);
         graphicsItem->setXmlItem(regionItem);
 
-        if(data.region == GraphicsRegion::Text)
+        if(data.region == GraphicsRegion::TextRegion)
             processLineNode(root.firstChild().nextSiblingElement("Line"), coordsItem);
 
         // Run through all nodes from the same data structure recursively.
diff --git a/GScribo/xml.h b/GScribo/xml.h
index 3975f82..844d043 100644
--- a/GScribo/xml.h
+++ b/GScribo/xml.h
@@ -15,24 +15,6 @@
 #include "configs.h"
 #include "region.h"
 
-static const GraphicsRegion::Data datas_[] =
-{
-    /*           COLOR               |             NAME             |               REGION           | ZVALUE */
-    { QColor::fromRgb(0, 100, 0, 90),   "TextRegion",                GraphicsRegion::Text,                1 },
-    { QColor::fromRgb(255, 0, 0, 90),   "Line",                      GraphicsRegion::Line,                2 },
-    { QColor::fromRgb(0, 0, 255, 90),   "VerticalSeparatorRegion",   GraphicsRegion::VerticalSeparator,   2 },
-    { QColor::fromRgb(0, 0, 255, 90),   "HorizontalSeparatorRegion", GraphicsRegion::HorizontalSeparator, 2 },
-    { QColor::fromRgb(0, 0, 128, 90),   "WhitespaceSeparatorRegion", GraphicsRegion::WhiteSpaceSeparator, 2 },
-    { QColor::fromRgb(255, 120, 0, 90), "ImageRegion",               GraphicsRegion::Image,               1 },
-    { QColor::fromRgb(43, 39, 128, 90), "NoiseRegion",               GraphicsRegion::Noise,               2 },
-    { QColor::fromRgb(220, 246, 0, 90), "TableRegion",               GraphicsRegion::Table,               2 },
-    { QColor::fromRgb(170, 0, 255, 90), "MathsRegion",               GraphicsRegion::Maths,               2 },
-    { QColor::fromRgb(255, 0, 144, 90), "GraphicsRegion",            GraphicsRegion::Graphic,             2 },
-    { QColor::fromRgb(0, 204, 255, 90), "ChartRegion",               GraphicsRegion::Chart,               2 },
-    { QColor::fromRgb(128, 0, 255),     "Baseline",                  GraphicsRegion::Baseline,            3 },
-    { QColor::fromRgb(128, 0, 255),     "Meanline",                  GraphicsRegion::Meanline,            3 }
-};
-
 class Xml
 {
     public:
@@ -45,12 +27,13 @@ class Xml
         inline QString filename() const;
 
         static QString getPath(const QString& filename);
-        inline static GraphicsRegion::Data dataFromRegion(GraphicsRegion::Id region);
 
         void load(const QString& filename);
+        void fillSettings();
 
     private:
         XmlItem *init(const QDomElement& root, XmlItem *rootTreeItem);
+
         void processNode(const QDomElement& root, const GraphicsRegion::Data& data, XmlItem *rootTreeItem);
         void processLineNode(const QDomElement& root, XmlItem *rootTreeItem);
         void processTypoNode(const QDomElement& root, const QPoint& xPoint);
@@ -74,7 +57,4 @@ inline QDomDocument Xml::document() const
 inline QString Xml::filename() const
 { return filename_; }
 
-inline GraphicsRegion::Data Xml::dataFromRegion(GraphicsRegion::Id region)
-{ return datas_[region]; }
-
 #endif // XML_H
-- 
1.7.2.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    11 Feb '13
                    
                        * regionwidget.cpp: Add color for region, send signals when check state change.
* xml.cpp: Add typological lines item separately from the root item to avoid selection segfault when clicking.
* scene.cpp: Add public slot to hide items which has been unchecked in the region widget.
* xmlwidget.cpp: Add public slot to hide xml which has been unchecked in the region widget. Not finished : the reg exp do not work well.
---
 GScribo/GScribo.pro                    |   12 +-
 GScribo/GScribo.pro.user               | 1069 +++++++-------------------------
 GScribo/Rendering/abstractregionitem.h |   13 +
 GScribo/Rendering/rootgraphicsitem.h   |   13 +-
 GScribo/Rendering/scene.cpp            |   39 +-
 GScribo/Rendering/scene.h              |    1 +
 GScribo/XmlWidget/xmlview.h            |    2 +-
 GScribo/XmlWidget/xmlwidget.cpp        |   21 +-
 GScribo/XmlWidget/xmlwidget.h          |   13 +-
 GScribo/dir.h                          |    2 +-
 GScribo/mainwindow.cpp                 |   12 +-
 GScribo/regionwidget.cpp               |   43 +-
 GScribo/regionwidget.h                 |   23 +-
 GScribo/regionwidgetitem.cpp           |   19 -
 GScribo/regionwidgetitem.h             |   43 --
 GScribo/xml.cpp                        |   10 +-
 GScribo/xml.h                          |    2 +-
 17 files changed, 361 insertions(+), 976 deletions(-)
 create mode 100644 GScribo/Rendering/abstractregionitem.h
 delete mode 100644 GScribo/regionwidgetitem.cpp
 delete mode 100644 GScribo/regionwidgetitem.h
diff --git a/GScribo/GScribo.pro b/GScribo/GScribo.pro
index 81bfa42..9a7f566 100644
--- a/GScribo/GScribo.pro
+++ b/GScribo/GScribo.pro
@@ -2,13 +2,13 @@
 # Project created by QtCreator 2013-01-21T09:20:54
 # -------------------------------------------------
 QT += xml
-INCLUDEPATH += /home/onix/olena/scribo/ \
-    /home/onix/olena/_build/scribo/demo/
+INCLUDEPATH += /lrde/home/stage/froger_a/olena/scribo/ \
+    /lrde/home/stage/froger_a/olena/_build/scribo/demo/
 QMAKE_CXXFLAGS += -DNDEBUG \
     -DMLN_WO_GLOBAL_VARS
 LIBS += -I/usr/include/graphicsImage \
     -lGraphicsMagick++ \
-    -ltesseract
+    -ltesseract_full
 TARGET = GScribo
 TEMPLATE = app
 SOURCES += main.cpp \
@@ -31,8 +31,7 @@ SOURCES += main.cpp \
     XmlWidget/attributesmodel.cpp \
     PagesWidget/pagesdelegate.cpp \
     XmlWidget/xmlview.cpp \
-    regionwidget.cpp \
-    regionwidgetitem.cpp
+    regionwidget.cpp
 HEADERS += mainwindow.h \
     variantpointer.h \
     configs.h \
@@ -60,8 +59,7 @@ HEADERS += mainwindow.h \
     PagesWidget/pagesdelegate.h \
     Rendering/rootgraphicsitem.h \
     XmlWidget/xmlview.h \
-    regionwidget.h \
-    regionwidgetitem.h
+    regionwidget.h
 FORMS += mainwindow.ui \
     Preferences/preferencesdialog.ui \
     Preferences/ocroptions.ui \
diff --git a/GScribo/GScribo.pro.user b/GScribo/GScribo.pro.user
index e0494a5..c09700a 100644
--- a/GScribo/GScribo.pro.user
+++ b/GScribo/GScribo.pro.user
@@ -1,892 +1,245 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.4.1, 2013-02-11T03:18:47. -->
 <qtcreator>
  <data>
-  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <variable>RunConfiguration0-BaseEnvironmentBase</variable>
+  <value type="int">2</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-CommandLineArguments</variable>
+  <valuelist type="QVariantList"/>
+ </data>
+ <data>
+  <variable>RunConfiguration0-ProFile</variable>
+  <value type="QString">GScribo.pro</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-RunConfiguration.name</variable>
+  <value type="QString">GScribo</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UseDyldImageSuffix</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UseTerminal</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserEnvironmentChanges</variable>
+  <valuelist type="QVariantList"/>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserSetName</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserSetWorkingDirectory</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserWorkingDirectory</variable>
+  <value type="QString"></value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-type</variable>
+  <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ </data>
+ <data>
+  <variable>activeRunConfiguration</variable>
   <value type="int">0</value>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <variable>activebuildconfiguration</variable>
+  <value type="QString">Debug</value>
+ </data>
+ <data>
+  <variable>buildConfiguration-Debug</variable>
   <valuemap type="QVariantMap">
-   <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
-   <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
-   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
-    <value type="QString" key="language">Cpp</value>
-    <valuemap type="QVariantMap" key="value">
-     <value type="QString" key="CurrentPreferences">CppGlobal</value>
-    </valuemap>
-   </valuemap>
-   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
-    <value type="QString" key="language">QmlJS</value>
-    <valuemap type="QVariantMap" key="value">
-     <value type="QString" key="CurrentPreferences">QmlJSGlobal</value>
-    </valuemap>
-   </valuemap>
-   <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
-   <value type="QByteArray" key="EditorConfiguration.Codec">System</value>
-   <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
-   <value type="int" key="EditorConfiguration.IndentSize">4</value>
-   <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
-   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
-   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
-   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
-   <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
-   <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
-   <value type="int" key="EditorConfiguration.TabSize">8</value>
-   <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
-   <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
-   <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
-   <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
-   <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
-   <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <value key="QtVersionId" type="int">0</value>
+   <value key="ToolChain" type="int">0</value>
+   <value key="addQDumper" type=""></value>
+   <value key="buildConfiguration" type="int">2</value>
   </valuemap>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.PluginSettings</variable>
-  <valuemap type="QVariantMap"/>
+  <variable>buildConfiguration-Release</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+   <value key="QtVersionId" type="int">0</value>
+   <value key="addQDumper" type=""></value>
+   <value key="buildConfiguration" type="int">0</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-buildstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <valuelist key="abstractProcess.Environment" type="QVariantList">
+    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-03fTGGiTWR,guid=f9287e073281b805202d469e0005349f</value>
+    <value type="QString">DESKTOP_SESSION=fluxbox</value>
+    <value type="QString">DISPLAY=:0.0</value>
+    <value type="QString">GDMSESSION=fluxbox</value>
+    <value type="QString">GDM_LANG=fr_FR.UTF-8</value>
+    <value type="QString">GDM_XSERVER_LOCATION=local</value>
+    <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+    <value type="QString">HOME=/lrde/home/stage/froger_a</value>
+    <value type="QString">LANG=fr_FR.UTF-8</value>
+    <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
+    <value type="QString">LOGNAME=froger_a</value>
+    <value type="QString">OLDPWD=/lrde/home/stage/froger_a/qt</value>
+    <value type="QString">PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/games</value>
+    <value type="QString">PWD=/lrde/home/stage/froger_a/qt/GScribo</value>
+    <value type="QString">QTDIR=/usr/share/qt4</value>
+    <value type="QString">SHELL=/bin/bash</value>
+    <value type="QString">SHLVL=2</value>
+    <value type="QString">SSH_AGENT_PID=25183</value>
+    <value type="QString">SSH_AUTH_SOCK=/tmp/ssh-WbmKk25130/agent.25130</value>
+    <value type="QString">TERM=xterm</value>
+    <value type="QString">USER=froger_a</value>
+    <value type="QString">USERNAME=froger_a</value>
+    <value type="QString">WINDOWID=10485796</value>
+    <value type="QString">WINDOWPATH=7:8:8:8:8</value>
+    <value type="QString">XAUTHORITY=/tmp/.gdmYZ8GSW</value>
+    <value type="QString">XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/</value>
+    <value type="QString">XDG_SESSION_COOKIE=9a5c41ad78622411b8e25b00459a554f-1360586360.314321-1166498812</value>
+    <value type="QString">XTERM_LOCALE=fr_FR.UTF-8</value>
+    <value type="QString">XTERM_SHELL=/bin/bash</value>
+    <value type="QString">XTERM_VERSION=XTerm(261)</value>
+    <value type="QString">_=/usr/bin/qtcreator</value>
+   </valuelist>
+   <valuelist key="abstractProcess.arguments" type="QVariantList">
+    <value type="QString">/amd/nfs/volume1/home/stage/froger_a/qt/GScribo/GScribo.pro</value>
+    <value type="QString">-spec</value>
+    <value type="QString">linux-g++</value>
+    <value type="QString">-r</value>
+    <value type="QString">CONFIG+=debug</value>
+   </valuelist>
+   <value key="abstractProcess.command" type="QString">/usr/bin/qmake-qt4</value>
+   <value key="abstractProcess.enabled" type="bool">false</value>
+   <value key="abstractProcess.workingDirectory" type="QString">/amd/nfs/volume1/home/stage/froger_a/qt/GScribo</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-buildstep1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <valuelist key="abstractProcess.Environment" type="QVariantList">
+    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-03fTGGiTWR,guid=f9287e073281b805202d469e0005349f</value>
+    <value type="QString">DESKTOP_SESSION=fluxbox</value>
+    <value type="QString">DISPLAY=:0.0</value>
+    <value type="QString">GDMSESSION=fluxbox</value>
+    <value type="QString">GDM_LANG=fr_FR.UTF-8</value>
+    <value type="QString">GDM_XSERVER_LOCATION=local</value>
+    <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+    <value type="QString">HOME=/lrde/home/stage/froger_a</value>
+    <value type="QString">LANG=fr_FR.UTF-8</value>
+    <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
+    <value type="QString">LOGNAME=froger_a</value>
+    <value type="QString">OLDPWD=/lrde/home/stage/froger_a/qt</value>
+    <value type="QString">PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/games</value>
+    <value type="QString">PWD=/lrde/home/stage/froger_a/qt/GScribo</value>
+    <value type="QString">QTDIR=/usr/share/qt4</value>
+    <value type="QString">SHELL=/bin/bash</value>
+    <value type="QString">SHLVL=2</value>
+    <value type="QString">SSH_AGENT_PID=25183</value>
+    <value type="QString">SSH_AUTH_SOCK=/tmp/ssh-WbmKk25130/agent.25130</value>
+    <value type="QString">TERM=xterm</value>
+    <value type="QString">USER=froger_a</value>
+    <value type="QString">USERNAME=froger_a</value>
+    <value type="QString">WINDOWID=10485796</value>
+    <value type="QString">WINDOWPATH=7:8:8:8:8</value>
+    <value type="QString">XAUTHORITY=/tmp/.gdmYZ8GSW</value>
+    <value type="QString">XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/</value>
+    <value type="QString">XDG_SESSION_COOKIE=9a5c41ad78622411b8e25b00459a554f-1360586360.314321-1166498812</value>
+    <value type="QString">XTERM_LOCALE=fr_FR.UTF-8</value>
+    <value type="QString">XTERM_SHELL=/bin/bash</value>
+    <value type="QString">XTERM_VERSION=XTerm(261)</value>
+    <value type="QString">_=/usr/bin/qtcreator</value>
+   </valuelist>
+   <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value>
+   <valuelist key="abstractProcess.arguments" type="QVariantList">
+    <value type="QString">-w</value>
+   </valuelist>
+   <value key="abstractProcess.command" type="QString">/usr/bin/make</value>
+   <value key="abstractProcess.enabled" type="bool">true</value>
+   <value key="abstractProcess.workingDirectory" type="QString">/amd/nfs/volume1/home/stage/froger_a/qt/GScribo</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-cleanstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <value key="cleanConfig" type="bool">true</value>
+   <valuelist key="makeargs" type="QVariantList">
+    <value type="QString">clean</value>
+   </valuelist>
+  </valuemap>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.Target.0</variable>
+  <variable>buildconfiguration-Release-buildstep0</variable>
   <valuemap type="QVariantMap">
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
-    <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-32bit./usr/bin/gdb</value>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-     </valuemap>
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Compiler</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Nettoyer</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
-    <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/onix/qt/GScribo-build-desktop-Debug</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value>
-    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
-   </valuemap>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
-    <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-32bit./usr/bin/gdb</value>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-     </valuemap>
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Compiler</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Nettoyer</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
-    <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/onix/qt/GScribo-build-desktop-Release</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value>
-    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Déploiement</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Pas de déploiement</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Pas de déploiement</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
-    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
-    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
-    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
-    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
-    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
-    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
-    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
-    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
-    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
-    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
-     <value type="int">0</value>
-     <value type="int">1</value>
-     <value type="int">2</value>
-     <value type="int">3</value>
-     <value type="int">4</value>
-     <value type="int">5</value>
-     <value type="int">6</value>
-     <value type="int">7</value>
-     <value type="int">8</value>
-     <value type="int">9</value>
-     <value type="int">10</value>
-     <value type="int">11</value>
-     <value type="int">12</value>
-     <value type="int">13</value>
-     <value type="int">14</value>
-    </valuelist>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
-     <value type="int">0</value>
-     <value type="int">1</value>
-     <value type="int">2</value>
-     <value type="int">3</value>
-     <value type="int">4</value>
-     <value type="int">5</value>
-     <value type="int">6</value>
-     <value type="int">7</value>
-     <value type="int">8</value>
-     <value type="int">9</value>
-     <value type="int">10</value>
-     <value type="int">11</value>
-     <value type="int">12</value>
-     <value type="int">13</value>
-     <value type="int">14</value>
-    </valuelist>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Configuration d'exécution Qt4</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">GScribo</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value>
-    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
-    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">GScribo.pro</value>
-    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
-    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
-    <valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
-    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
-    <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
   </valuemap>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.Target.1</variable>
+  <variable>buildconfiguration-Release-buildstep1</variable>
   <valuemap type="QVariantMap">
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">2</value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.S60EmulatorTarget</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
-    <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">INVALID</value>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-     </valuemap>
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Compiler</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Nettoyer</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
-    <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/onix/qt/GScribo</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">-1</value>
-    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
-   </valuemap>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
-    <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">INVALID</value>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-     </valuemap>
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Compiler</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Nettoyer</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
-    <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/onix/qt/GScribo</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">-1</value>
-    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Déploiement</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Pas de déploiement</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Pas de déploiement</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
-    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
-    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
-    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
-    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
-    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
-    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
-    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
-    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
-    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
-    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
-     <value type="int">0</value>
-     <value type="int">1</value>
-     <value type="int">2</value>
-     <value type="int">3</value>
-     <value type="int">4</value>
-     <value type="int">5</value>
-     <value type="int">6</value>
-     <value type="int">7</value>
-     <value type="int">8</value>
-     <value type="int">9</value>
-     <value type="int">10</value>
-     <value type="int">11</value>
-     <value type="int">12</value>
-     <value type="int">13</value>
-     <value type="int">14</value>
-    </valuelist>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
-     <value type="int">0</value>
-     <value type="int">1</value>
-     <value type="int">2</value>
-     <value type="int">3</value>
-     <value type="int">4</value>
-     <value type="int">5</value>
-     <value type="int">6</value>
-     <value type="int">7</value>
-     <value type="int">8</value>
-     <value type="int">9</value>
-     <value type="int">10</value>
-     <value type="int">11</value>
-     <value type="int">12</value>
-     <value type="int">13</value>
-     <value type="int">14</value>
-    </valuelist>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">GScribo sur l'émulateur Symbian</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.S60EmulatorRunConfiguration</value>
-    <value type="QString" key="Qt4ProjectManager.S60EmulatorRunConfiguration.ProFile">GScribo.pro</value>
-    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
-    <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
   </valuemap>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.Target.2</variable>
+  <variable>buildconfiguration-Release-cleanstep0</variable>
   <valuemap type="QVariantMap">
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">3</value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.S60DeviceTarget</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
-    <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">INVALID</value>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-     </valuemap>
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Compiler</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Nettoyer</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
-    <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/onix/qt/GScribo</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">-1</value>
-    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
-   </valuemap>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
-    <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">INVALID</value>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-     </valuemap>
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Compiler</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Nettoyer</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
-    <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/onix/qt/GScribo</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">-1</value>
-    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Créer le paquet SIS</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Create SIS package</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.S60SignBuildStep</value>
-      <value type="QString" key="Qt4ProjectManager.S60CreatePackageStep.Certificate"></value>
-      <value type="QString" key="Qt4ProjectManager.S60CreatePackageStep.Keyfile"></value>
-      <value type="int" key="Qt4ProjectManager.S60CreatePackageStep.SignMode">0</value>
-      <value type="bool" key="Qt4ProjectManager.S60CreatorPackageStep.SmartInstaller">false</value>
-      <value type="bool" key="Qt4ProjectManager.S60CreatorPackageStep.SuppressPatchWarningDialog">false</value>
-     </valuemap>
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Déployer</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.S60DeployStep</value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Déploiement</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Pas de déploiement</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Déployer sur un périphérique Symbian</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
-    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
-    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
-    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
-    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
-    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
-    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
-    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
-    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
-    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
-    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
-     <value type="int">0</value>
-     <value type="int">1</value>
-     <value type="int">2</value>
-     <value type="int">3</value>
-     <value type="int">4</value>
-     <value type="int">5</value>
-     <value type="int">6</value>
-     <value type="int">7</value>
-     <value type="int">8</value>
-     <value type="int">9</value>
-     <value type="int">10</value>
-     <value type="int">11</value>
-     <value type="int">12</value>
-     <value type="int">13</value>
-     <value type="int">14</value>
-    </valuelist>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
-     <value type="int">0</value>
-     <value type="int">1</value>
-     <value type="int">2</value>
-     <value type="int">3</value>
-     <value type="int">4</value>
-     <value type="int">5</value>
-     <value type="int">6</value>
-     <value type="int">7</value>
-     <value type="int">8</value>
-     <value type="int">9</value>
-     <value type="int">10</value>
-     <value type="int">11</value>
-     <value type="int">12</value>
-     <value type="int">13</value>
-     <value type="int">14</value>
-    </valuelist>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">GScribo sur périphérique Symbian</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.S60DeviceRunConfiguration</value>
-    <value type="QString" key="Qt4ProjectManager.S60DeviceRunConfiguration.CommandLineArguments"></value>
-    <value type="QString" key="Qt4ProjectManager.S60DeviceRunConfiguration.ProFile">GScribo.pro</value>
-    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
-    <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
   </valuemap>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.Target.3</variable>
+  <variable>buildconfigurations</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">Debug</value>
+   <value type="QString">Release</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>buildstep0</variable>
   <valuemap type="QVariantMap">
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">4</value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.MaemoDeviceTarget</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
-   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
-    <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">INVALID</value>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-     </valuemap>
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Compiler</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Nettoyer</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
-    <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/onix/qt/GScribo-build-maemo-Debug</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">-1</value>
-    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
-   </valuemap>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
-    <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">INVALID</value>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
-     </valuemap>
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Compiler</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
-    </valuemap>
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Nettoyer</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
-    <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/onix/qt/GScribo-build-maemo-Release</value>
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">-1</value>
-    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Déployer le paquet par montage UTFS</value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MaemoDeployStep</value>
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedFiles"/>
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedHosts"/>
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedRemotePaths"/>
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployedTimes"/>
-     </valuemap>
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Déploiement</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
-    </valuemap>
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Compilation du paquet Debian et installation sur le périphérique Maemo5</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Déployer sur un périphérique Maemo</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">2.2MaemoDeployConfig</value>
-    <value type="qulonglong" key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId">0</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
-    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
-    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
-    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
-    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
-    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
-    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
-    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
-    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
-    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
-    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
-    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
-     <value type="int">0</value>
-     <value type="int">1</value>
-     <value type="int">2</value>
-     <value type="int">3</value>
-     <value type="int">4</value>
-     <value type="int">5</value>
-     <value type="int">6</value>
-     <value type="int">7</value>
-     <value type="int">8</value>
-     <value type="int">9</value>
-     <value type="int">10</value>
-     <value type="int">11</value>
-     <value type="int">12</value>
-     <value type="int">13</value>
-     <value type="int">14</value>
-    </valuelist>
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
-     <value type="int">0</value>
-     <value type="int">1</value>
-     <value type="int">2</value>
-     <value type="int">3</value>
-     <value type="int">4</value>
-     <value type="int">5</value>
-     <value type="int">6</value>
-     <value type="int">7</value>
-     <value type="int">8</value>
-     <value type="int">9</value>
-     <value type="int">10</value>
-     <value type="int">11</value>
-     <value type="int">12</value>
-     <value type="int">13</value>
-     <value type="int">14</value>
-    </valuelist>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">GScribo (sur un périphérique distant)</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MaemoRunConfiguration</value>
-    <value type="QString" key="Qt4ProjectManager.MaemoRunConfiguration.Arguments"></value>
-    <value type="int" key="Qt4ProjectManager.MaemoRunConfiguration.BaseEnvironmentBase">1</value>
-    <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.ExportedLocalDirs"/>
-    <value type="QString" key="Qt4ProjectManager.MaemoRunConfiguration.ProFile">GScribo.pro</value>
-    <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.RemoteMountPoints"/>
-    <valuelist type="QVariantList" key="Qt4ProjectManager.MaemoRunConfiguration.UserEnvironmentChanges"/>
-    <value type="QString" key="RemoteLinux.RunConfig.AlternateRemoteExecutable"></value>
-    <value type="bool" key="RemoteLinux.RunConfig.UseAlternateRemoteExecutable">false</value>
-    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
-    <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
-   </valuemap>
-   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+   <value key="mkspec" type="QString"></value>
   </valuemap>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.TargetCount</variable>
-  <value type="int">4</value>
+  <variable>buildstep1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+  </valuemap>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
-  <value type="QString">{5e5821f7-3a40-405f-b196-cbc6284a3a45}</value>
+  <variable>buildsteps</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">trolltech.qt4projectmanager.qmake</value>
+   <value type="QString">trolltech.qt4projectmanager.make</value>
+  </valuelist>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
-  <value type="int">10</value>
+  <variable>cleanstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+   <value key="clean" type="bool">true</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>cleansteps</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">trolltech.qt4projectmanager.make</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>defaultFileEncoding</variable>
+  <value type="QByteArray">System</value>
+ </data>
+ <data>
+  <variable>project</variable>
+  <valuemap type="QVariantMap"/>
  </data>
 </qtcreator>
diff --git a/GScribo/Rendering/abstractregionitem.h b/GScribo/Rendering/abstractregionitem.h
new file mode 100644
index 0000000..02b889b
--- /dev/null
+++ b/GScribo/Rendering/abstractregionitem.h
@@ -0,0 +1,13 @@
+#ifndef ABSTRACTREGIONITEM_H
+#define ABSTRACTREGIONITEM_H
+
+#include <QGraphicsItem>
+
+class AbstractRegionItem :
+        public QGraphicsItem
+{
+    public:
+        explicit AbstractRegionItem(QGraphicsItem *parent = 0, QGraphicsScene *scene = 0);
+};
+
+#endif // ABSTRACTREGIONITEM_H
diff --git a/GScribo/Rendering/rootgraphicsitem.h b/GScribo/Rendering/rootgraphicsitem.h
index 8e87491..2e95297 100644
--- a/GScribo/Rendering/rootgraphicsitem.h
+++ b/GScribo/Rendering/rootgraphicsitem.h
@@ -9,19 +9,22 @@ class RootGraphicsItem :
         public QGraphicsPolygonItem
 {
     public:
-        explicit RootGraphicsItem(int numberRegion) { childsFromRegion_.fill(QList<QGraphicsItem *>(), numberRegion); }
+        explicit RootGraphicsItem(int numberRegion)
+        { childsFromRegion_.fill(QList<QGraphicsItem *>(), numberRegion); }
+        ~RootGraphicsItem()
+        { foreach(QList<QGraphicsItem *> list, childsFromRegion_) { foreach(QGraphicsItem *child, list) delete child; } }
 
-        inline QList<QGraphicsItem *> childsFrom(GraphicsRegion::Id region) const;
-        inline void addItemFrom(QGraphicsItem *graphicalItem, GraphicsRegion::Id region);
+        inline void addItemFrom(QGraphicsItem *graphicalItem, const GraphicsRegion::Id& region);
+        inline QList<QGraphicsItem *> childsFrom(const GraphicsRegion::Id& region) const;
 
     private:
         QVector<QList<QGraphicsItem *> > childsFromRegion_;
 };
 
-inline QList<QGraphicsItem *> RootGraphicsItem::childsFrom(GraphicsRegion::Id region) const
+inline QList<QGraphicsItem *> RootGraphicsItem::childsFrom(const GraphicsRegion::Id& region) const
 { return childsFromRegion_[region]; }
 
-inline void RootGraphicsItem::addItemFrom(QGraphicsItem *graphicalItem, GraphicsRegion::Id region)
+inline void RootGraphicsItem::addItemFrom(QGraphicsItem *graphicalItem, const GraphicsRegion::Id& region)
 { childsFromRegion_[region] << graphicalItem; }
 
 #endif // ROOTGRAPHICSITEM_H
diff --git a/GScribo/Rendering/scene.cpp b/GScribo/Rendering/scene.cpp
index 07542ec..e15d154 100644
--- a/GScribo/Rendering/scene.cpp
+++ b/GScribo/Rendering/scene.cpp
@@ -51,7 +51,6 @@ void Scene::clearSelection()
         regionItem->unselect();
     }
 
-    baseSelection_.clear();
     selectedRegions_.clear();
     emit selectionCleared();
 }
@@ -62,6 +61,7 @@ void Scene::mousePressEvent(QGraphicsSceneMouseEvent *event)
     {
         isPressing_ = true;
 
+        baseSelection_.clear();
         pressPos_ = event->scenePos();
         selection_.show();
     }
@@ -101,7 +101,8 @@ void Scene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
               else
                   select(selection_.rect());
 
-              emit newSelection(selectedRegions_);
+              baseSelection_ = selectedRegions();
+               emit newSelection(selectedRegions_);
           }
 
           selection_.setRect(0, 0, 0, 1);
@@ -177,6 +178,7 @@ void Scene::unselect(const QList<RegionItem *>& unselectedRegions)
     // Check if after the removal, the selected list isn't empty.
     if(!selectedRegions_.isEmpty())
         ensureVisible(selectedRegions_.last());
+
     emit newSelection();
 }
 
@@ -188,6 +190,26 @@ void Scene::ensureVisible(QGraphicsItem *graphicalItem)
         view->ensureVisible(graphicalItem);
 }
 
+void Scene::setVisible(const GraphicsRegion::Id& region, bool visible)
+{
+    if(root_)
+    {
+        QGraphicsItem *child;
+
+        if(visible)
+        {
+            foreach(child, root_->childsFrom(region))
+                child->setVisible(true);
+        }
+
+        else
+        {
+            foreach(child, root_->childsFrom(region))
+                child->setVisible(false);
+        }
+    }
+}
+
 void Scene::setRoot(RootGraphicsItem *root)
 {
     // Delete all items.
@@ -195,6 +217,14 @@ void Scene::setRoot(RootGraphicsItem *root)
 
     root_ = root;
     addItem(root);
+
+    // Add typo lines separately because can't be selected.
+    QGraphicsItem *line;
+    foreach(line, root->childsFrom(GraphicsRegion::Baseline))
+        addItem(line);
+
+    foreach(line, root->childsFrom(GraphicsRegion::Meanline))
+        addItem(line);
 }
 
 void Scene::changeScene(const QString& filename, RootGraphicsItem *root)
@@ -210,8 +240,5 @@ void Scene::changeScene(const QString& filename, RootGraphicsItem *root)
 
     // Add new items.
     if(root)
-    {
-        root_ = root;
-        addItem(root);
-    }
+        setRoot(root);
 }
diff --git a/GScribo/Rendering/scene.h b/GScribo/Rendering/scene.h
index b3cf1cb..b51a36c 100644
--- a/GScribo/Rendering/scene.h
+++ b/GScribo/Rendering/scene.h
@@ -60,6 +60,7 @@ class Scene :
         inline void selectBase();
         void unselect(const QList<RegionItem *>& unselectedItems);
 
+        void setVisible(const GraphicsRegion::Id& region, bool visible);
         void ensureVisible(QGraphicsItem *graphicsItem);
 
     signals:
diff --git a/GScribo/XmlWidget/xmlview.h b/GScribo/XmlWidget/xmlview.h
index a26593e..d7f3d1e 100644
--- a/GScribo/XmlWidget/xmlview.h
+++ b/GScribo/XmlWidget/xmlview.h
@@ -62,7 +62,7 @@ inline void XmlView::displayOnly(QList<XmlItem *> displayedItems)
 { display(displayedItems, false); }
 
 inline void XmlView::displayAll()
-{ displayedItems_.clear(); proxy_.displayAll(); }
+{ hideAll(); proxy_.displayAll(); }
 
 inline QList<XmlItem *> XmlView::selectedItems() const
 { return transform(selectedIndexes()); }
diff --git a/GScribo/XmlWidget/xmlwidget.cpp b/GScribo/XmlWidget/xmlwidget.cpp
index 66a3470..cc74fe0 100644
--- a/GScribo/XmlWidget/xmlwidget.cpp
+++ b/GScribo/XmlWidget/xmlwidget.cpp
@@ -3,27 +3,32 @@
 XmlWidget::XmlWidget(QWidget *parent) :
         QSplitter(Qt::Horizontal, parent)
 {
-    proxy_.setFilterRegExp(QRegExp("Page|.Region|Line", Qt::CaseInsensitive));
+    basePattern_ = "Page";
+    proxy_.setFilterFixedString(basePattern_);
     proxy_.setFilterRole(Qt::UserRole);
     proxy_.setSourceModel(&model_);
     proxy_.setDynamicSortFilter(true);
 
     view_.setModel(&proxy_);
 
-    property_.setModel(&attributesModel_);
-    property_.setUniformRowHeights(true);
-    property_.setSelectionMode(QAbstractItemView::NoSelection);
-    property_.setItemDelegateForColumn(0, new XmlDelegate(Qt::UserRole));
-    property_.setItemDelegateForColumn(1, new XmlDelegate(Qt::UserRole+1));
+    attributes_.setModel(&attributesModel_);
+    attributes_.setSelectionMode(QAbstractItemView::NoSelection);
+    attributes_.setItemDelegateForColumn(0, new XmlDelegate(Qt::UserRole));
+    attributes_.setItemDelegateForColumn(1, new XmlDelegate(Qt::UserRole+1));
 
     addWidget(&view_);
-    addWidget(&property_);
+    addWidget(&attributes_);
 
-    connect(&view_, SIGNAL(resetProperty()), &property_, SLOT(reset()));
+    connect(&view_, SIGNAL(resetProperty()), &attributes_, SLOT(reset()));
     connect(&view_, SIGNAL(clicked(QModelIndex)), this, SLOT(loadAttributes(QModelIndex)));
     connect(&view_, SIGNAL(loadAttributes(XmlAttributes)), &attributesModel_, SLOT(load(XmlAttributes)));
 }
 
+void XmlWidget::setFilterString(const QString& filterString)
+{
+    proxy_.setFilterFixedString(basePattern_ + '|' + filterString);
+}
+
 void XmlWidget::changeView(XmlItem *rootItem)
 {
     attributesModel_.reset();
diff --git a/GScribo/XmlWidget/xmlwidget.h b/GScribo/XmlWidget/xmlwidget.h
index 4582f0e..c9817c8 100644
--- a/GScribo/XmlWidget/xmlwidget.h
+++ b/GScribo/XmlWidget/xmlwidget.h
@@ -2,6 +2,7 @@
 #define XMLWIDGET_H
 
 #include <QSortFilterProxyModel>
+#include <QTableView>
 #include <QTreeWidget>
 #include <QSplitter>
 #include <QDomElement>
@@ -24,19 +25,23 @@ class XmlWidget :
         explicit XmlWidget(QWidget *parent = 0);
 
         inline XmlView *view();
-        inline QTreeView *property();
+        inline QTableView *attributes();
 
         void changeView(XmlItem *rootItem);
 
     private:
         QSortFilterProxyModel proxy_;
         SelectionProxy proxy2_;
+        QString basePattern_;
 
         XmlModel model_;
         AttributesModel attributesModel_;
 
         XmlView view_;
-        QTreeView property_;
+        QTableView attributes_;
+
+    public slots:
+        void setFilterString(const QString& filterString);
 
     private slots:
         inline void loadAttributes(const QModelIndex& index);
@@ -45,8 +50,8 @@ class XmlWidget :
 inline XmlView *XmlWidget::view()
 { return &view_; }
 
-inline QTreeView *XmlWidget::property()
-{ return &property_; }
+inline QTableView *XmlWidget::attributes()
+{ return &attributes_; }
 
 inline void XmlWidget::loadAttributes(const QModelIndex &index)
 { attributesModel_.load(index.data(Qt::UserRole+2).value<XmlItem *>()->attributes()); }
diff --git a/GScribo/dir.h b/GScribo/dir.h
index 3de42da..a6c036b 100644
--- a/GScribo/dir.h
+++ b/GScribo/dir.h
@@ -1,7 +1,7 @@
 #ifndef DIR_H
 #define DIR_H
 
-#define SCRIBO_LOCAL_DEMODIR "/home/onix/olena/_build/scribo/demo"
+#define SCRIBO_LOCAL_DEMODIR "/lrde/home/stage/froger_a/olena/_build/scribo/demo"
 #define SCRIBO_PREFIX_BINDIR "/usr/local/bin"
 
 #endif // DIR_H
diff --git a/GScribo/mainwindow.cpp b/GScribo/mainwindow.cpp
index 622bc72..44c4583 100644
--- a/GScribo/mainwindow.cpp
+++ b/GScribo/mainwindow.cpp
@@ -1,4 +1,4 @@
-#include "mainwindow.h"
+ #include "mainwindow.h"
 #include "ui_mainwindow.h"
 
 MainWindow::MainWindow(QWidget *parent) :
@@ -71,6 +71,7 @@ void MainWindow::initRegionWidget()
 
 void MainWindow::initXmlWidget()
 {
+    xmlWidget_.setFilterString(regionWidget_.filterString());
     dockXml_.setWindowTitle("Xml");
     dockXml_.setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable);
     dockXml_.setWidget(&xmlWidget_);
@@ -115,6 +116,11 @@ void MainWindow::connectWidgets()
     connect(xmlWidget_.view(), SIGNAL(emptySelection()), &scene_, SLOT(selectBase()));
     connect(xmlWidget_.view(), SIGNAL(resetSelection()), &scene_, SLOT(clearSelection()));
 
+    // Connect the scene with the region widget.
+    connect(®ionWidget_, SIGNAL(checkStateChanged(GraphicsRegion::Id,bool)), &scene_, SLOT(setVisible(GraphicsRegion::Id,bool)));
+    // Connect the xml widget with the region widget.
+    connect(®ionWidget_, SIGNAL(checkStateChanged(QString)), &xmlWidget_, SLOT(setFilterString(QString)));
+
     /*connect(&runner, SIGNAL(progress()), &progressDialog, SLOT(run()));
     connect(&runner, SIGNAL(new_progress_max_value(int)), &progressDialog, SLOT(setMaximum(int)));
     connect(&runner, SIGNAL(new_progress_label(QString)), &progressDialog, SLOT(setLabelText(QString)));
@@ -239,7 +245,11 @@ void MainWindow::onRegionSelection(QList<RegionItem *> regionItems)
     if(!regionItems.isEmpty())
         xmlWidget_.view()->displayOnly(toXmlItems(regionItems));
     else
+    {
+        xmlWidget_.view()->reset();
         xmlWidget_.view()->displayAll();
+        xmlWidget_.view()->expandAll();
+    }
 }
 
 void MainWindow::onXmlChangeSelection(QList<XmlItem *> xmlItems, bool select)
diff --git a/GScribo/regionwidget.cpp b/GScribo/regionwidget.cpp
index bfa1e9d..219a9ba 100644
--- a/GScribo/regionwidget.cpp
+++ b/GScribo/regionwidget.cpp
@@ -4,6 +4,7 @@ RegionWidget::RegionWidget(QWidget *parent) :
     QTreeWidget(parent)
 {
     setHeaderHidden(true);
+    setSelectionMode(QAbstractItemView::NoSelection);
 
     addTopLevelItem(createRoot("Text", GraphicsRegion::TextRegion, GraphicsRegion::Text, GraphicsRegion::Line));
     addTopLevelItem(createRoot("Typological Lines", GraphicsRegion::TypoRegion, GraphicsRegion::Baseline, GraphicsRegion::Meanline));
@@ -12,13 +13,13 @@ RegionWidget::RegionWidget(QWidget *parent) :
 
     expandAll();
 
-    connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(onItemChanged(QTreeWidgetItem*)));
+    connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(checkStateChanged(QTreeWidgetItem*)));
 }
 
-RegionWidgetItem *RegionWidget::createRoot(const QString& text, const GraphicsRegion::Id& region, const GraphicsRegion::Id& begin, const GraphicsRegion::Id& end)
+QTreeWidgetItem *RegionWidget::createRoot(const QString& text, const GraphicsRegion::Id& region, const GraphicsRegion::Id& begin, const GraphicsRegion::Id& end)
 {
     // Create root.
-    RegionWidgetItem *rootItem = createItem(text, region);
+    QTreeWidgetItem *rootItem = createItem(text, region);
 
     // Fill root with corresponding childs.
     for(int region_ = begin; region_ <= end; region_++)
@@ -27,19 +28,43 @@ RegionWidgetItem *RegionWidget::createRoot(const QString& text, const GraphicsRe
     return rootItem;
 }
 
-RegionWidgetItem *RegionWidget::createItem(const QString& text, const GraphicsRegion::Id& region, const QColor& color)
+QTreeWidgetItem *RegionWidget::createItem(const QString& text, const GraphicsRegion::Id& region, const QColor& color)
 {
-    RegionWidgetItem *item = new RegionWidgetItem(region);
+    QTreeWidgetItem *item = new QTreeWidgetItem;
     item->setText(0, text);
+    item->setCheckState(0, Qt::Checked);
     item->setBackgroundColor(0, color);
+    // Store graphical id in the object to recognize it afterward.
+    item->setData(0, Qt::UserRole, static_cast<int>(region));
 
     return item;
 }
 
-void RegionWidget::onItemChanged(QTreeWidgetItem *item)
+void RegionWidget::checkStateChanged(QTreeWidgetItem *item)
 {
-    RegionWidgetItem *regionWidgetItem = static_cast<RegionWidgetItem *>(item);
+    // If it's a root item, go to childs.
+    if(item->childCount() != 0)
+    {
+        QTreeWidgetItem *child;
+        for(int i = 0; i < item->childCount(); i++)
+        {
+            child = item->child(i);
+            child->setCheckState(0, item->checkState(0));
+        }
+    }
+    else
+    {
+        if(item->checkState(0) == Qt::Checked)
+        {
+            filterString_.append('|' + item->text(0));
+            emit checkStateChanged(static_cast<GraphicsRegion::Id>(item->data(0, Qt::UserRole).toInt()), true);
+        }
+        else
+        {
+            filterString_.remove('|' + item->text(0), Qt::CaseSensitive);
+            emit checkStateChanged(static_cast<GraphicsRegion::Id>(item->data(0, Qt::UserRole).toInt()), false);
+        }
 
-    if(regionWidgetItem->isCheckStateChanged())
-        emit checkStateChanged(regionWidgetItem->region());
+        emit checkStateChanged(filterString());
+    }
 }
diff --git a/GScribo/regionwidget.h b/GScribo/regionwidget.h
index 6b2655f..aaa6eda 100644
--- a/GScribo/regionwidget.h
+++ b/GScribo/regionwidget.h
@@ -4,7 +4,6 @@
 #include <QTreeWidget>
 #include <QLabel>
 
-#include "regionwidgetitem.h"
 #include "xml.h"
 
 class RegionWidget :
@@ -15,19 +14,27 @@ class RegionWidget :
     public:
         explicit RegionWidget(QWidget *parent = 0);
 
+        inline QString filterString() const;
+
     private:
-        RegionWidgetItem *createRoot(const QString& text, const GraphicsRegion::Id& region, const GraphicsRegion::Id& begin, const GraphicsRegion::Id& end);
-        RegionWidgetItem *createItem(const QString& text, const GraphicsRegion::Id& region, const QColor& color = QColor::fromRgb(255, 255, 255));
-        inline void fillRoot(RegionWidgetItem *rootItem, const GraphicsRegion::Id& region);
+        QTreeWidgetItem *createRoot(const QString& text, const GraphicsRegion::Id& region, const GraphicsRegion::Id& begin, const GraphicsRegion::Id& end);
+        QTreeWidgetItem *createItem(const QString& text, const GraphicsRegion::Id& region, const QColor& color = QColor::fromRgb(255, 255, 255));
+        inline void fillRoot(QTreeWidgetItem *rootItem, const GraphicsRegion::Id& region);
+
+        QString filterString_;
 
     private slots:
-        void onItemChanged(QTreeWidgetItem *item);
+        void checkStateChanged(QTreeWidgetItem *item);
 
     signals:
-        void checkStateChanged(GraphicsRegion::Id region);
+        void checkStateChanged(const GraphicsRegion::Id& region, bool checked);
+        void checkStateChanged(const QString& filterString);
 };
 
-inline void RegionWidget::fillRoot(RegionWidgetItem *rootItem, const GraphicsRegion::Id& region)
-{ GraphicsRegion::Data data = Xml::dataFromRegion(region); rootItem->addChild(createItem(data.name, region, data.color)); }
+inline void RegionWidget::fillRoot(QTreeWidgetItem *rootItem, const GraphicsRegion::Id& region)
+{ GraphicsRegion::Data data = Xml::dataFromRegion(region); filterString_.append('|' + data.name); rootItem->addChild(createItem(data.name, region, data.color)); }
+
+inline QString RegionWidget::filterString() const
+{ return filterString_.right(filterString_.count()-1); }
 
 #endif // REGIONWIDGET_H
diff --git a/GScribo/regionwidgetitem.cpp b/GScribo/regionwidgetitem.cpp
deleted file mode 100644
index 8cb2809..0000000
--- a/GScribo/regionwidgetitem.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "regionwidgetitem.h"
-
-RegionWidgetItem::RegionWidgetItem(const GraphicsRegion::Id& region)
-{
-    region_ = region;
-    isCheckStateChanged_ = false;
-    QTreeWidgetItem::setCheckState(0, Qt::Checked);
-}
-
-void RegionWidgetItem::setCheckState(int column, Qt::CheckState state)
-{
-    // Look if the check state has changed or not.
-    if(checkState(column) != state)
-        isCheckStateChanged_ = true;
-    else
-        isCheckStateChanged_ = false;
-
-    QTreeWidgetItem::setCheckState(column, state);
-}
diff --git a/GScribo/regionwidgetitem.h b/GScribo/regionwidgetitem.h
deleted file mode 100644
index 484f7cc..0000000
--- a/GScribo/regionwidgetitem.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef REGIONWIDGETITEM_H
-#define REGIONWIDGETITEM_H
-
-#include <QTreeWidgetItem>
-
-#include "region.h"
-
-class RegionWidgetItem :
-        public QTreeWidgetItem
-{
-    public:
-        explicit RegionWidgetItem(const GraphicsRegion::Id& region = GraphicsRegion::None);
-
-        inline bool isCheckStateChanged() const;
-        void setCheckState(int column, Qt::CheckState state);
-
-        inline GraphicsRegion::Id region() const;
-        inline void setRegion(GraphicsRegion::Id region);
-
-    protected:
-        inline void emitDataChanged();
-
-    private:
-        GraphicsRegion::Id region_;
-        bool isCheckStateChanged_;
-};
-
-inline bool RegionWidgetItem::isCheckStateChanged() const
-{ return isCheckStateChanged_; }
-
-inline void RegionWidgetItem::emitDataChanged()
-{
-    QTreeWidgetItem::emitDataChanged();
-    isCheckStateChanged_ = false;
-}
-
-inline GraphicsRegion::Id RegionWidgetItem::region() const
-{ return region_; }
-
-inline void RegionWidgetItem::setRegion(GraphicsRegion::Id region)
-{ region_ = region; }
-
-#endif // REGIONWIDGETITEM_H
diff --git a/GScribo/xml.cpp b/GScribo/xml.cpp
index f55dda4..74e62b7 100644
--- a/GScribo/xml.cpp
+++ b/GScribo/xml.cpp
@@ -174,21 +174,21 @@ void Xml::processLineNode(const QDomElement& root, XmlItem *precItem)
         graphicsItem->setXmlItem(lineItem);
 
         // Get meanline and baseline.
-        processTypoNode(root, QPoint(xMin, xMax), graphicsItem);
+        processTypoNode(root, QPoint(xMin, xMax));
         // Run through all line nodes recursively.
         processLineNode(root.nextSiblingElement(datas_[1].name), lineItem);
     }
 }
 
-void Xml::processTypoNode(const QDomElement& root, const QPoint& xPoint, RegionItem *parentgraphicsItem)
+void Xml::processTypoNode(const QDomElement& root, const QPoint& xPoint)
 {
     int yPos = root.attribute("baseline", "null").toInt();
-    QGraphicsLineItem *baselineItem = new QGraphicsLineItem(QLine(QPoint(xPoint.x(), yPos), QPoint(xPoint.y(), yPos)), parentgraphicsItem);
+    QGraphicsLineItem *baselineItem = new QGraphicsLineItem(QLine(QPoint(xPoint.x(), yPos), QPoint(xPoint.y(), yPos)));
     baselineItem->setZValue(datas_[11].zValue);
     graphicsItem_->addItemFrom(baselineItem, datas_[11].region);
 
     yPos = root.attribute("meanline", "null").toInt();
-    QGraphicsLineItem *meanlineItem = new QGraphicsLineItem(QLine(QPoint(xPoint.x(), yPos), QPoint(xPoint.y(), yPos)), parentgraphicsItem);
+    QGraphicsLineItem *meanlineItem = new QGraphicsLineItem(QLine(QPoint(xPoint.x(), yPos), QPoint(xPoint.y(), yPos)));
     meanlineItem->setZValue(datas_[12].zValue);
-    graphicsItem_->addItemFrom(baselineItem, datas_[12].region);
+    graphicsItem_->addItemFrom(meanlineItem, datas_[12].region);
 }
diff --git a/GScribo/xml.h b/GScribo/xml.h
index ec5e911..3975f82 100644
--- a/GScribo/xml.h
+++ b/GScribo/xml.h
@@ -53,7 +53,7 @@ class Xml
         XmlItem *init(const QDomElement& root, XmlItem *rootTreeItem);
         void processNode(const QDomElement& root, const GraphicsRegion::Data& data, XmlItem *rootTreeItem);
         void processLineNode(const QDomElement& root, XmlItem *rootTreeItem);
-        void processTypoNode(const QDomElement& root, const QPoint& xPoint, RegionItem *rootGraphicsItem);
+        void processTypoNode(const QDomElement& root, const QPoint& xPoint);
 
         RootGraphicsItem *graphicsItem_;
         XmlItem *xmlItem_;
-- 
1.7.2.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/khalimsky has been updated
       via  c8f12e33e0957cf812129ba9a3ebd560621e873e (commit)
       via  4ddbf89b2d906dd0a4f590c4c834cd7ae36729da (commit)
       via  fd858dcbbfe31600933aeaf290678eed6847b9b8 (commit)
      from  ef5c21b243f3ef39ea22323313c1c6625b839366 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
c8f12e3 mln/world/kn/compute_tree_of_shapes.hh: Do not use random anymore.
4ddbf89 Add a new structure for compressed tree.
fd858dc Small fixes.
-----------------------------------------------------------------------
Summary of changes:
 milena/ChangeLog                              |   22 +
 milena/mln/util/map.hh                        |    8 +-
 milena/mln/util/set.hh                        |    1 +
 milena/mln/util/tree_of_shapes.hh             |   44 +-
 milena/mln/util/ztree_of_shapes.hh            |  788 +++++++++++++++++++++++++
 milena/mln/world/kn/compute_tree_of_shapes.hh |   33 +
 6 files changed, 869 insertions(+), 27 deletions(-)
 create mode 100644 milena/mln/util/ztree_of_shapes.hh
hooks/post-receive
-- 
Olena, a generic and efficient image processing platform
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            olena-2.0-192-gc8f12e3	mln/world/kn/compute_tree_of_shapes.hh: Do not use random anymore.
                        
                        
by Guillaume Lazzara 11 Feb '13
                    by Guillaume Lazzara 11 Feb '13
11 Feb '13
                    
                        ---
 milena/ChangeLog                              |    5 ++++
 milena/mln/world/kn/compute_tree_of_shapes.hh |   33 +++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 521a626..f6fc620 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,10 @@
 2013-02-11  Guillaume Lazzara  <z(a)lrde.epita.fr>
 
+	* mln/world/kn/compute_tree_of_shapes.hh: Do not use random
+	anymore.
+
+2013-02-11  Guillaume Lazzara  <z(a)lrde.epita.fr>
+
 	Add a new structure for compressed tree.
 
 	* mln/util/tree_of_shapes.hh: Remove methods related to compressed
diff --git a/milena/mln/world/kn/compute_tree_of_shapes.hh b/milena/mln/world/kn/compute_tree_of_shapes.hh
index c29be4d..8abeb54 100644
--- a/milena/mln/world/kn/compute_tree_of_shapes.hh
+++ b/milena/mln/world/kn/compute_tree_of_shapes.hh
@@ -308,6 +308,38 @@ namespace mln
 	  EV l_;
 	  bool found;
 
+	  static bool up = true;
+	  if (up)
+	  {
+	    l_ = upper_level_next_to_lcur(q, found);
+	    if (found)
+	      return l_;
+	    else
+	    {
+	      up = false;
+	      l_ = lower_level_next_to_lcur(q, found);
+	      if (! found)
+		std::abort();
+	      return l_;
+	    }
+	  }
+	  else // going down
+	  {
+	    l_ = lower_level_next_to_lcur(q, found);
+	    if (found)
+	      return l_;
+	    else
+	    {
+	      up = true;
+	      l_ = upper_level_next_to_lcur(q, found);
+	      if (! found)
+		std::abort();
+	      return l_;
+	    }
+	  }
+
+/*
+
 	  bool up = int(2. * std::rand() / (RAND_MAX + 1.));
 	  if (up)
 	  {
@@ -335,6 +367,7 @@ namespace mln
 	      return l_;
 	    }
 	  }
+*/
 	}
 
 
-- 
1.7.2.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0