+bool SimpleTreeItem::setData(int column, const QVariant &value, int role) {
+ if(column > columnCount() || role != Qt::DisplayRole)
+ return false;
+
+ if(column == columnCount())
+ _itemData.append(value);
+ else
+ _itemData[column] = value;
+
+ emit dataChanged(column);
+ return true;
+}
+
+int SimpleTreeItem::columnCount() const {
+ return _itemData.count();
+}
+
+/*****************************************
+ * PropertyMapItem
+ *****************************************/
+PropertyMapItem::PropertyMapItem(const QStringList &propertyOrder, AbstractTreeItem *parent)
+ : AbstractTreeItem(parent),
+ _propertyOrder(propertyOrder)
+{
+}
+
+PropertyMapItem::PropertyMapItem(AbstractTreeItem *parent)
+ : AbstractTreeItem(parent),
+ _propertyOrder(QStringList())
+{
+}
+
+
+PropertyMapItem::~PropertyMapItem() {
+}
+
+QVariant PropertyMapItem::data(int column, int role) const {
+ if(column >= columnCount())
+ return QVariant();
+
+ switch(role) {
+ case Qt::ToolTipRole:
+ return toolTip(column);
+ case Qt::DisplayRole:
+ return property(_propertyOrder[column].toAscii());
+ default:
+ return QVariant();
+ }
+
+}
+
+bool PropertyMapItem::setData(int column, const QVariant &value, int role) {
+ if(column >= columnCount() || role != Qt::DisplayRole)
+ return false;
+
+ emit dataChanged(column);
+ return setProperty(_propertyOrder[column].toAscii(), value);
+}
+
+int PropertyMapItem::columnCount() const {
+ return _propertyOrder.count();
+}
+
+void PropertyMapItem::appendProperty(const QString &property) {
+ _propertyOrder << property;
+}
+
+