diff -r c2ce9944148c -r 0bba81dde1bc attributeitem.h --- a/attributeitem.h Wed Feb 10 13:48:42 2010 +0000 +++ b/attributeitem.h Fri Feb 19 13:47:03 2010 +0000 @@ -11,7 +11,7 @@ A list of these tables AttributeTable is maintained for every MapEditor. */ class AttributeItem:public BranchItem { - +public: enum Type { Undefined, //!< Undefined type IntList, //!< Free integer @@ -21,9 +21,10 @@ UniqueString//!< UniqueString, e.g. for IDs }; -public: AttributeItem(const QList &data, TreeItem *parent = 0); virtual ~AttributeItem(); + void set (const QString &k, const QString &v, const Type &t); + void get (QString &k, QString &v, Type &t); void setKey (const QString &k, const Type &t); QString getKey (); void setValue (const QString &v); @@ -31,10 +32,14 @@ void setType (const Type &t); AttributeItem::Type getAttributeType (); QString getTypeString (); + void setInternal (bool b); + bool isInternal(); QString getDataXML(); protected: - QString freeString; //!< String value for type FreeString bool internal; //!< Internal attributes cannot be edited by user + QString key; + QVariant value; + Type attrType; }; #endif