Loading...
Searching...
No Matches
QXmppElement.h
// SPDX-FileCopyrightText: 2010 Jeremy Lainé <jeremy.laine@m4x.org>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPELEMENT_H
#define QXMPPELEMENT_H
#include "QXmppGlobal.h"
#include <QMap>
#include <QStringList>
#include <QXmlStreamWriter>
class QDomElement;
class QXmppElement;
class QXmppElementPrivate;
using QXmppElementList = QList<QXmppElement>;
class QXMPP_EXPORT QXmppElement
{
public:
QXmppElement();
QXmppElement(const QXmppElement &other);
QXmppElement(const QDomElement &element);
~QXmppElement();
QDomElement sourceDomElement() const;
QStringList attributeNames() const;
QString attribute(const QString &name) const;
void setAttribute(const QString &name, const QString &value);
void appendChild(const QXmppElement &child);
QXmppElement firstChildElement(const QString &name = QString()) const;
QXmppElement nextSiblingElement(const QString &name = QString()) const;
void removeChild(const QXmppElement &child);
QString tagName() const;
void setTagName(const QString &type);
QString value() const;
void setValue(const QString &text);
bool isNull() const;
void toXml(QXmlStreamWriter *writer) const;
QXmppElement &operator=(const QXmppElement &other);
private:
QXmppElement(QXmppElementPrivate *other);
// ### QXmpp2: Use an std::shared_ptr if possible?
QXmppElementPrivate *d;
};
#endif
QXmppElement
Definition QXmppElement.h:21
QXmppElement::firstChildElement
QXmppElement firstChildElement(const QString &name=QString()) const
Definition QXmppElement.cpp:209
QXmppElement::setValue
void setValue(const QString &text)
Definition QXmppElement.cpp:286
QXmppElement::attribute
QString attribute(const QString &name) const
Definition QXmppElement.cpp:174
QXmppElement::nextSiblingElement
QXmppElement nextSiblingElement(const QString &name=QString()) const
Definition QXmppElement.cpp:223
QXmppElement::isNull
bool isNull() const
Definition QXmppElement.cpp:240
QXmppElement::removeChild
void removeChild(const QXmppElement &child)
Definition QXmppElement.cpp:248
QXmppElement::setAttribute
void setAttribute(const QString &name, const QString &value)
Definition QXmppElement.cpp:182
QXmppElement::attributeNames
QStringList attributeNames() const
Definition QXmppElement.cpp:166
QXmppElement::toXml
void toXml(QXmlStreamWriter *writer) const
Definition QXmppElement.cpp:294
QXmppElement::sourceDomElement
QDomElement sourceDomElement() const
Definition QXmppElement.cpp:144
QXmppElement::tagName
QString tagName() const
Definition QXmppElement.cpp:262
QXmppElement::QXmppElement
QXmppElement()
Definition QXmppElement.cpp:87
QXmppElement::value
QString value() const
Definition QXmppElement.cpp:278
QXmppElement::setTagName
void setTagName(const QString &type)
Definition QXmppElement.cpp:270
QXmppElement::appendChild
void appendChild(const QXmppElement &child)
Definition QXmppElement.cpp:190
QXmppElement::operator=
QXmppElement & operator=(const QXmppElement &other)
Definition QXmppElement.cpp:125