Changeset 88 in flair-src for trunk/tools/FlairGCS/src/Layout.cpp


Ignore:
Timestamp:
Sep 28, 2016, 11:45:41 AM (5 years ago)
Author:
Sanahuja Guillaume
Message:

m

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/src/Layout.cpp

    r15 r88  
    2222#include <QGeoCoordinate>
    2323#include <QGridLayout>
     24#include "ListWidget.h"
     25#include <QStringList>
    2426
    2527Layout::Layout(QWidget *parent, XmlWidget *xml, QString name, QString type)
     
    248250    widget = new Label(this, row, col, name);
    249251  }
     252  if (type == "ListWidget") {
     253    // Parse the item list   
     254    QStringList items;
     255    int count = 0;
     256    while (dom.hasAttribute("item" + QString::number(count))) {
     257      QString item = dom.attribute("item" + QString::number(count));
     258      items.append(item);
     259      count++;
     260    }
     261    widget = new ListWidget(this, row, col, name, items);
     262  }
    250263
    251264  if (widget != NULL) {
Note: See TracChangeset for help on using the changeset viewer.