From 54576ab2d36c6736d3720fc4cfbcfc659c279e23 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Thu, 18 Feb 2010 12:37:52 +0000 Subject: introduce QXmppElementList --- source/QXmppElement.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'source/QXmppElement.h') diff --git a/source/QXmppElement.h b/source/QXmppElement.h index d684ddd3..58ec6918 100644 --- a/source/QXmppElement.h +++ b/source/QXmppElement.h @@ -29,6 +29,15 @@ #include class QDomElement; +class QXmppElement; + +class QXmppElementList : public QList +{ +public: + QXmppElementList(); + QXmppElementList(const QXmppElement &element); + QXmppElementList(const QList &other); +}; class QXmppElement { @@ -41,8 +50,9 @@ public: QString attribute(const QString &name) const; void setAttribute(const QString &name, const QString &value); - QList children() const; - void setChildren(QList &children); + QXmppElementList children() const; + QXmppElement firstChild(const QString &name) const; + void setChildren(const QXmppElementList &children); QString tagName() const; void setTagName(const QString &type); @@ -55,7 +65,7 @@ public: private: QMap m_attributes; - QList m_children; + QXmppElementList m_children; QString m_tagName; QString m_value; }; -- cgit v1.2.3