author | insilmaril |
Thu Nov 08 15:28:03 2007 +0000 (2007-11-08) | |
changeset 620 | 24bfecc949a0 |
child 626 | 96c8e6860e0c |
permissions | -rw-r--r-- |
insilmaril@616 | 1 |
#ifndef ATTRIBUTE_H |
insilmaril@616 | 2 |
#define ATTRIBUTE_H |
insilmaril@616 | 3 |
|
insilmaril@616 | 4 |
#include <QStringList> |
insilmaril@616 | 5 |
|
insilmaril@616 | 6 |
#include "xmlobj.h" |
insilmaril@616 | 7 |
|
insilmaril@616 | 8 |
|
insilmaril@616 | 9 |
/*! \brief A key and a list of values |
insilmaril@616 | 10 |
*/ |
insilmaril@616 | 11 |
|
insilmaril@616 | 12 |
class Attribute:public XMLObj { |
insilmaril@616 | 13 |
public: |
insilmaril@616 | 14 |
Attribute(); |
insilmaril@616 | 15 |
virtual void setKey (const QString &k); |
insilmaril@616 | 16 |
virtual QString getKey (); |
insilmaril@616 | 17 |
virtual void setValue (const QString &v); |
insilmaril@616 | 18 |
virtual QString getValue(); |
insilmaril@616 | 19 |
virtual QString getDataXML(); |
insilmaril@616 | 20 |
protected: |
insilmaril@616 | 21 |
QString key; |
insilmaril@616 | 22 |
QString value; |
insilmaril@616 | 23 |
}; |
insilmaril@616 | 24 |
|
insilmaril@616 | 25 |
/*! \brief A table containing a list of keys and each of these keys has |
insilmaril@616 | 26 |
a list of default values. The keys and the values for each key are |
insilmaril@616 | 27 |
unique. |
insilmaril@616 | 28 |
*/ |
insilmaril@616 | 29 |
class AttributeTable:public XMLObj{ |
insilmaril@616 | 30 |
public: |
insilmaril@616 | 31 |
AttributeTable(); |
insilmaril@616 | 32 |
virtual ~AttributeTable(); |
insilmaril@616 | 33 |
virtual void clear(); |
insilmaril@616 | 34 |
virtual void addKey (const QString &k); //!< Adds a key to the table |
insilmaril@616 | 35 |
virtual void removeKey (const QString &k); //!< Removes key and its default values |
insilmaril@616 | 36 |
virtual void addValue (const QString &k, const QString &v); //!< Adds key and value |
insilmaril@616 | 37 |
virtual QStringList getKeys (); |
insilmaril@616 | 38 |
virtual QStringList getValues(const QString &k); |
insilmaril@616 | 39 |
virtual QString getDataXML(); |
insilmaril@616 | 40 |
|
insilmaril@616 | 41 |
protected: |
insilmaril@616 | 42 |
QStringList keys; |
insilmaril@616 | 43 |
QList <QStringList> values; |
insilmaril@616 | 44 |
}; |
insilmaril@616 | 45 |
|
insilmaril@616 | 46 |
|
insilmaril@616 | 47 |
|
insilmaril@616 | 48 |
#endif |
insilmaril@616 | 49 |