Index: trunk/tools/FlairGCS/src/Layout.cpp
===================================================================
--- trunk/tools/FlairGCS/src/Layout.cpp	(revision 244)
+++ trunk/tools/FlairGCS/src/Layout.cpp	(revision 269)
@@ -69,11 +69,11 @@
 QGridLayout *Layout::getQGridLayout() { return qgridlayout; }
 
-void Layout::XmlEvent(QDomElement dom) {
+void Layout::XmlEvent(QDomElement *dom) {
   XmlWidget *widget = NULL;
-  QString type = dom.tagName();
-  QString name = dom.attribute("name");
-  QString old_name = dom.attribute("old_name");
-  int row = dom.attribute("row").toInt();
-  int col = dom.attribute("col").toInt();
+  QString type = dom->tagName();
+  QString name = dom->attribute("name");
+  QString old_name = dom->attribute("old_name");
+  int row = dom->attribute("row").toInt();
+  int col = dom->attribute("col").toInt();
 
   // initially rowCount()=1 and columnCount()=1 but count()=0 !
@@ -103,5 +103,5 @@
 
   if (type == "TabWidget") {
-    int position = dom.attribute("position").toInt();
+    int position = dom->attribute("position").toInt();
     widget =
         new TabWidget(this, row, col, name, (QTabWidget::TabPosition)position);
@@ -114,18 +114,18 @@
   }
   if (type == "SpinBox") {
-    int value = dom.attribute("value").toInt();
-    QString suffix = dom.attribute("suffix");
-    int min = dom.attribute("min").toInt();
-    int max = dom.attribute("max").toInt();
-    int step = dom.attribute("step").toInt();
+    int value = dom->attribute("value").toInt();
+    QString suffix = dom->attribute("suffix");
+    int min = dom->attribute("min").toInt();
+    int max = dom->attribute("max").toInt();
+    int step = dom->attribute("step").toInt();
     widget = new SpinBox(this, row, col, name, suffix, value, min, max, step);
   }
   if (type == "DoubleSpinBox") {
-    QString value = dom.attribute("value");
-    QString suffix = dom.attribute("suffix");
-    double min = dom.attribute("min").toDouble();
-    double max = dom.attribute("max").toDouble();
-    double step = dom.attribute("step").toDouble();
-    int decimals = dom.attribute("decimals").toInt();
+    QString value = dom->attribute("value");
+    QString suffix = dom->attribute("suffix");
+    double min = dom->attribute("min").toDouble();
+    double max = dom->attribute("max").toDouble();
+    double step = dom->attribute("step").toDouble();
+    int decimals = dom->attribute("decimals").toInt();
     widget = new DoubleSpinBox(this, row, col, name, suffix, value, min, max,
                                step, decimals);
@@ -133,20 +133,20 @@
   if (type == "Vector3DSpinBox") {
     QString value[3];
-    value[0] = dom.attribute("value_x");
-    value[1] = dom.attribute("value_y");
-    value[2] = dom.attribute("value_z");
-    double min = dom.attribute("min").toDouble();
-    double max = dom.attribute("max").toDouble();
-    double step = dom.attribute("step").toDouble();
-    int decimals = dom.attribute("decimals").toInt();
+    value[0] = dom->attribute("value_x");
+    value[1] = dom->attribute("value_y");
+    value[2] = dom->attribute("value_z");
+    double min = dom->attribute("min").toDouble();
+    double max = dom->attribute("max").toDouble();
+    double step = dom->attribute("step").toDouble();
+    int decimals = dom->attribute("decimals").toInt();
     widget = new Vector3DSpinBox(this, row, col, name, value, min, max, step,
                                  decimals);
   }
   if (type == "CheckBox") {
-    int value = dom.attribute("value").toInt();
+    int value = dom->attribute("value").toInt();
     widget = new CheckBox(this, row, col, name, value);
   }
   if (type == "ComboBox") {
-    int value = dom.attribute("value").toInt();
+    int value = dom->attribute("value").toInt();
     widget = new ComboBox(this, row, col, name, value);
   }
@@ -155,8 +155,8 @@
   }
   if (type == "DataPlot1D") {
-    float ymin = dom.attribute("min").toFloat();
-    float ymax = dom.attribute("max").toFloat();
-    int enabled = dom.attribute("enabled").toInt();
-    int period = dom.attribute("period").toInt();
+    float ymin = dom->attribute("min").toFloat();
+    float ymax = dom->attribute("max").toFloat();
+    int enabled = dom->attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
     if (enabled == 1) {
       widget = new DataPlot1D(this, row, col, name, ymin, ymax, true, period);
@@ -166,12 +166,12 @@
   }
   if (type == "DataPlot2D") {
-    float xmin = dom.attribute("xmin").toFloat();
-    float xmax = dom.attribute("xmax").toFloat();
-    float ymin = dom.attribute("ymin").toFloat();
-    float ymax = dom.attribute("ymax").toFloat();
-    QString x_name = dom.attribute("x_name");
-    QString y_name = dom.attribute("y_name");
-    int enabled = dom.attribute("enabled").toInt();
-    int period = dom.attribute("period").toInt();
+    float xmin = dom->attribute("xmin").toFloat();
+    float xmax = dom->attribute("xmax").toFloat();
+    float ymin = dom->attribute("ymin").toFloat();
+    float ymax = dom->attribute("ymax").toFloat();
+    QString x_name = dom->attribute("x_name");
+    QString y_name = dom->attribute("y_name");
+    int enabled = dom->attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
     if (enabled == 1) {
       widget = new DataPlot2D(this, row, col, name, x_name, y_name, xmin, xmax,
@@ -183,11 +183,11 @@
   }
   if (type == "UsSensorPlot") {
-    float ymin = dom.attribute("ymin").toFloat();
-    float ymax = dom.attribute("ymax").toFloat();
-    QString y_name = dom.attribute("y_name");
-    int enabled = dom.attribute("enabled").toInt();
-    int period = dom.attribute("period").toInt();
-    QString type = dom.attribute("type");
-    int samples = dom.attribute("samples").toInt();
+    float ymin = dom->attribute("ymin").toFloat();
+    float ymax = dom->attribute("ymax").toFloat();
+    QString y_name = dom->attribute("y_name");
+    int enabled = dom->attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
+    QString type = dom->attribute("type");
+    int samples = dom->attribute("samples").toInt();
     if (enabled == 1) {
       widget = new UsSensorPlot(this, row, col, name, y_name,
@@ -199,17 +199,17 @@
   }
   if (type == "RangeFinderPlot") {
-    float xmin = dom.attribute("xmin").toFloat();
-    float xmax = dom.attribute("xmax").toFloat();
-    float ymin = dom.attribute("ymin").toFloat();
-    float ymax = dom.attribute("ymax").toFloat();
-    QString x_name = dom.attribute("x_name");
-    QString y_name = dom.attribute("y_name");
-    QString data_type = dom.attribute("type");
-    float start_angle = dom.attribute("start_angle").toFloat();
-    float end_angle = dom.attribute("end_angle").toFloat();
-    uint32_t nb_samples = dom.attribute("nb_samples").toUInt();
-    int enabled = dom.attribute("enabled").toInt();
-    int period = dom.attribute("period").toInt();
-    int invert_axis = dom.attribute("invert_axis").toInt();
+    float xmin = dom->attribute("xmin").toFloat();
+    float xmax = dom->attribute("xmax").toFloat();
+    float ymin = dom->attribute("ymin").toFloat();
+    float ymax = dom->attribute("ymax").toFloat();
+    QString x_name = dom->attribute("x_name");
+    QString y_name = dom->attribute("y_name");
+    QString data_type = dom->attribute("type");
+    float start_angle = dom->attribute("start_angle").toFloat();
+    float end_angle = dom->attribute("end_angle").toFloat();
+    uint32_t nb_samples = dom->attribute("nb_samples").toUInt();
+    int enabled = dom->attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
+    int invert_axis = dom->attribute("invert_axis").toInt();
     bool invert_axis_bool;
     if (invert_axis == 0) {
@@ -231,8 +231,8 @@
   }
   if (type == "Picture") {
-    int width = dom.attribute("width").toInt();
-    int height = dom.attribute("height").toInt();
-    int enabled = dom.attribute("enabled").toInt();
-    int period = dom.attribute("period").toInt();
+    int width = dom->attribute("width").toInt();
+    int height = dom->attribute("height").toInt();
+    int enabled = dom->attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
     if (enabled == 1) {
       widget = new Picture(this, row, col, name, width, height, true, period);
@@ -242,12 +242,12 @@
   }
   if (type == "Map") {
-    int period = dom.attribute("period").toInt();
-    int enabled = dom.attribute("enabled").toInt();
+    int period = dom->attribute("period").toInt();
+    int enabled = dom->attribute("enabled").toInt();
     int i = 0;
     QList<QtMobility::QGeoCoordinate> coordinates;
-    while (dom.hasAttribute("lat" + QString::number(i))) {
-      double latitude = dom.attribute("lat" + QString::number(i)).toDouble();
-      double longitude = dom.attribute("long" + QString::number(i)).toDouble();
-      double alt = dom.attribute("alt" + QString::number(i)).toDouble();
+    while (dom->hasAttribute("lat" + QString::number(i))) {
+      double latitude = dom->attribute("lat" + QString::number(i)).toDouble();
+      double longitude = dom->attribute("long" + QString::number(i)).toDouble();
+      double alt = dom->attribute("alt" + QString::number(i)).toDouble();
       QtMobility::QGeoCoordinate coordinate =
           QtMobility::QGeoCoordinate(latitude, longitude, alt);
@@ -272,6 +272,6 @@
     QStringList items;
     int count = 0;
-    while (dom.hasAttribute("item" + QString::number(count))) {
-      QString item = dom.attribute("item" + QString::number(count));
+    while (dom->hasAttribute("item" + QString::number(count))) {
+      QString item = dom->attribute("item" + QString::number(count));
       items.append(item);
       count++;
