1.1 --- a/attribute.h Thu Nov 08 15:28:03 2007 +0000
1.2 +++ b/attribute.h Wed Dec 05 14:58:02 2007 +0000
1.3 @@ -5,21 +5,25 @@
1.4
1.5 #include "xmlobj.h"
1.6
1.7 +class AttributeTable;
1.8
1.9 -/*! \brief A key and a list of values
1.10 +/*! \brief A key and a value
1.11 */
1.12
1.13 class Attribute:public XMLObj {
1.14 public:
1.15 Attribute();
1.16 - virtual void setKey (const QString &k);
1.17 - virtual QString getKey ();
1.18 - virtual void setValue (const QString &v);
1.19 - virtual QString getValue();
1.20 - virtual QString getDataXML();
1.21 + void setKey (const QString &k);
1.22 + QString getKey ();
1.23 + void setValue (const QString &v);
1.24 + QString getValue();
1.25 + void setTable (AttributeTable *at);
1.26 + AttributeTable* getTable();
1.27 + QString getDataXML();
1.28 protected:
1.29 QString key;
1.30 QString value;
1.31 + AttributeTable *table;
1.32 };
1.33
1.34 /*! \brief A table containing a list of keys and each of these keys has
1.35 @@ -29,14 +33,15 @@
1.36 class AttributeTable:public XMLObj{
1.37 public:
1.38 AttributeTable();
1.39 - virtual ~AttributeTable();
1.40 - virtual void clear();
1.41 - virtual void addKey (const QString &k); //!< Adds a key to the table
1.42 - virtual void removeKey (const QString &k); //!< Removes key and its default values
1.43 - virtual void addValue (const QString &k, const QString &v); //!< Adds key and value
1.44 - virtual QStringList getKeys ();
1.45 - virtual QStringList getValues(const QString &k);
1.46 - virtual QString getDataXML();
1.47 + ~AttributeTable();
1.48 + void clear();
1.49 + void addKey (const QString &k); //!< Adds a key to the table
1.50 + void removeKey (const QString &k); //!< Removes key and its default values
1.51 + int countKeys(); //!< Return number of keys
1.52 + void addValue (const QString &k, const QString &v); //!< Adds key and value
1.53 + QStringList getKeys ();
1.54 + QStringList getValues(const QString &k);
1.55 + QString getDataXML();
1.56
1.57 protected:
1.58 QStringList keys;