diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-02-19 15:40:42 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-02-19 15:40:42 +0000 |
| commit | 1ce7a46bf44ee6317f8bb5dd2bb80fde2df759de (patch) | |
| tree | 2ffba5750bfd1b93d0c67a335a87d248f3ca61d8 /source/QXmppElement.h | |
| parent | ff76789c8405dd396a3902bd9c6a37e48e9989cd (diff) | |
| download | qxmpp-1ce7a46bf44ee6317f8bb5dd2bb80fde2df759de.tar.gz | |
make QXmppElement API closer to QDomElement
Diffstat (limited to 'source/QXmppElement.h')
| -rw-r--r-- | source/QXmppElement.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/QXmppElement.h b/source/QXmppElement.h index 58ec6918..780d00c0 100644 --- a/source/QXmppElement.h +++ b/source/QXmppElement.h @@ -30,6 +30,7 @@ class QDomElement; class QXmppElement; +class QXmppElementPrivate; class QXmppElementList : public QList<QXmppElement> { @@ -43,16 +44,19 @@ class QXmppElement { public: QXmppElement(); + QXmppElement(const QXmppElement &other); QXmppElement(const QDomElement &element); + ~QXmppElement(); QStringList attributeNames() const; QString attribute(const QString &name) const; void setAttribute(const QString &name, const QString &value); + void appendChild(const QXmppElement &child); QXmppElementList children() const; - QXmppElement firstChild(const QString &name) const; - void setChildren(const QXmppElementList &children); + QXmppElement firstChildElement(const QString &name = QString()) const; + void removeChild(const QXmppElement &child); QString tagName() const; void setTagName(const QString &type); @@ -63,11 +67,11 @@ public: bool isNull() const; void toXml(QXmlStreamWriter *writer) const; + QXmppElement &operator=(const QXmppElement &other); + private: - QMap<QString, QString> m_attributes; - QXmppElementList m_children; - QString m_tagName; - QString m_value; + QXmppElement(QXmppElementPrivate *other); + QXmppElementPrivate *d; }; #endif |
