9#include "QXmppStanza.h"
11#if QXMPP_DEPRECATED_SINCE(1, 1)
21class QXmppDataFormPrivate;
22class QXmppDataFormFieldPrivate;
23class QXmppDataFormMediaPrivate;
24class QXmppDataFormMediaSourcePrivate;
33 MediaSource(
const QUrl &uri,
const QMimeType &contentType);
42 void setUri(
const QUrl &uri);
44 QMimeType contentType()
const;
45 void setContentType(
const QMimeType &contentType);
50 QSharedDataPointer<QXmppDataFormMediaSourcePrivate> d;
53#if QXMPP_DEPRECATED_SINCE(1, 1)
57 QT_DEPRECATED_X(
"Use QXmppDataForm::Field() instead")
59 QT_DEPRECATED_X(
"Use QXmppDataForm::Field() instead")
68 void setHeight(
int height);
73 void setWidth(
int width);
76 QList<QPair<QString, QString>> uris() const;
78 void setUris(const QList<QPair<QString, QString>> &uris);
84 QSharedDataPointer<QXmppDataFormMediaPrivate> d;
106 const QString &key = {},
107 const QVariant &value = {},
108 bool isRequired =
false,
109 const QString &label = {},
110 const QString &description = {},
111 const QList<QPair<QString, QString>> &options = {});
119 QString description()
const;
120 void setDescription(
const QString &description);
123 void setKey(
const QString &key);
125 QString label()
const;
126 void setLabel(
const QString &label);
128#if QXMPP_DEPRECATED_SINCE(1, 1)
129 QT_DEPRECATED_X(
"Use QXmppDataForm::Field::mediaSources() or QXmppDataForm::Field::mediaSize() instead")
133 void setMedia(const
Media &media);
136 QList<QPair<QString, QString>> options()
const;
137 void setOptions(
const QList<QPair<QString, QString>> &options);
139 bool isRequired()
const;
140 void setRequired(
bool required);
145 QVariant value()
const;
146 void setValue(
const QVariant &value);
148 QVector<QXmppDataForm::MediaSource> &mediaSources();
149 QVector<QXmppDataForm::MediaSource> mediaSources()
const;
150 void setMediaSources(
const QVector<QXmppDataForm::MediaSource> &mediaSources);
152 QSize mediaSize()
const;
154 void setMediaSize(
const QSize &size);
156 bool operator==(
const Field &other)
const;
159 QSharedDataPointer<QXmppDataFormFieldPrivate> d;
177 const QList<Field> &fields = {},
178 const QString &title = {},
179 const QString &instructions = {});
188 QString instructions()
const;
189 void setInstructions(
const QString &instructions);
191 QList<Field> fields()
const;
192 QList<Field> &fields();
193 void setFields(
const QList<QXmppDataForm::Field> &fields);
195 QString title()
const;
196 void setTitle(
const QString &title);
201 QString formType()
const;
206 void parse(
const QDomElement &element);
207 void toXml(QXmlStreamWriter *writer)
const;
211 QSharedDataPointer<QXmppDataFormPrivate> d;