1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/attribute.h Fri Nov 09 12:07:22 2007 +0000
1.3 @@ -0,0 +1,49 @@
1.4 +#ifndef ATTRIBUTE_H
1.5 +#define ATTRIBUTE_H
1.6 +
1.7 +#include <QStringList>
1.8 +
1.9 +#include "xmlobj.h"
1.10 +
1.11 +
1.12 +/*! \brief A key and a list of values
1.13 +*/
1.14 +
1.15 +class Attribute:public XMLObj {
1.16 +public:
1.17 + Attribute();
1.18 + virtual void setKey (const QString &k);
1.19 + virtual QString getKey ();
1.20 + virtual void setValue (const QString &v);
1.21 + virtual QString getValue();
1.22 + virtual QString getDataXML();
1.23 +protected:
1.24 + QString key;
1.25 + QString value;
1.26 +};
1.27 +
1.28 +/*! \brief A table containing a list of keys and each of these keys has
1.29 + a list of default values. The keys and the values for each key are
1.30 + unique.
1.31 +*/
1.32 +class AttributeTable:public XMLObj{
1.33 +public:
1.34 + AttributeTable();
1.35 + virtual ~AttributeTable();
1.36 + virtual void clear();
1.37 + virtual void addKey (const QString &k); //!< Adds a key to the table
1.38 + virtual void removeKey (const QString &k); //!< Removes key and its default values
1.39 + virtual void addValue (const QString &k, const QString &v); //!< Adds key and value
1.40 + virtual QStringList getKeys ();
1.41 + virtual QStringList getValues(const QString &k);
1.42 + virtual QString getDataXML();
1.43 +
1.44 +protected:
1.45 + QStringList keys;
1.46 + QList <QStringList> values;
1.47 +};
1.48 +
1.49 +
1.50 +
1.51 +#endif
1.52 +