aboutsummaryrefslogtreecommitdiff
path: root/src/QXmppDataForm.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-12-10 09:55:39 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-12-10 09:55:39 +0000
commit11e2742230c8fcb5f642b45ca5d5e050d61382ad (patch)
tree0a910c03279b8a174349fd09f52b9e96ea6afa8c /src/QXmppDataForm.cpp
parentf8253c3f6da17ac20919b7a1e2c4ca7bfdfea5e9 (diff)
downloadqxmpp-11e2742230c8fcb5f642b45ca5d5e050d61382ad.tar.gz
improve QXmppDataForm documentation
Diffstat (limited to 'src/QXmppDataForm.cpp')
-rw-r--r--src/QXmppDataForm.cpp78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/QXmppDataForm.cpp b/src/QXmppDataForm.cpp
index 859f9a5f..b174157b 100644
--- a/src/QXmppDataForm.cpp
+++ b/src/QXmppDataForm.cpp
@@ -48,131 +48,209 @@ static field_type field_types[] = {
{static_cast<QXmppDataForm::Field::Type>(-1), NULL},
};
+/// Constructs a QXmppDataForm::Field of the specified \a type.
+///
+/// \param type
+
QXmppDataForm::Field::Field(QXmppDataForm::Field::Type type)
: m_type(type)
{
}
+/// Returns the field's description.
+
QString QXmppDataForm::Field::description() const
{
return m_description;
}
+/// Sets the field's description.
+///
+/// \param description
+
void QXmppDataForm::Field::setDescription(const QString &description)
{
m_description = description;
}
+/// Returns the field's key.
+
QString QXmppDataForm::Field::key() const
{
return m_key;
}
+/// Sets the field's key.
+///
+/// \param key
+
void QXmppDataForm::Field::setKey(const QString &key)
{
m_key = key;
}
+/// Returns the field's label.
+
QString QXmppDataForm::Field::label() const
{
return m_label;
}
+/// Sets the field's label.
+///
+/// \param label
+
void QXmppDataForm::Field::setLabel(const QString &label)
{
m_label = label;
}
+/// Returns the field's options.
+
QList<QPair<QString, QString> > QXmppDataForm::Field::options() const
{
return m_options;
}
+/// Sets the field's options.
+///
+/// \param options
+
void QXmppDataForm::Field::setOptions(const QList<QPair<QString, QString> > &options)
{
m_options = options;
}
+/// Returns true if the field is required, false otherwise.
+
bool QXmppDataForm::Field::isRequired() const
{
return m_required;
}
+/// Set to true if the field is required, false otherwise.
+///
+/// \param required
+
void QXmppDataForm::Field::setRequired(bool required)
{
m_required = required;
}
+/// Returns the field's type.
+
QXmppDataForm::Field::Type QXmppDataForm::Field::type() const
{
return m_type;
}
+/// Sets the field's type.
+///
+/// \param type
+
void QXmppDataForm::Field::setType(QXmppDataForm::Field::Type type)
{
m_type = type;
}
+/// Returns the field's value.
+
QVariant QXmppDataForm::Field::value() const
{
return m_value;
}
+/// Sets the field's value.
+///
+/// \param value
+
void QXmppDataForm::Field::setValue(const QVariant &value)
{
m_value = value;
}
+/// Constructs a QXmppDataForm of the specified \a type.
+///
+/// \param type
+
QXmppDataForm::QXmppDataForm(QXmppDataForm::Type type)
: m_type(type)
{
}
+/// Returns the form's fields.
+
QList<QXmppDataForm::Field> QXmppDataForm::fields() const
{
return m_fields;
}
+/// Returns the form's fields by reference.
+
QList<QXmppDataForm::Field> &QXmppDataForm::fields()
{
return m_fields;
}
+/// Sets the form's fields.
+///
+/// \param fields
+
void QXmppDataForm::setFields(const QList<QXmppDataForm::Field> &fields)
{
m_fields = fields;
}
+/// Returns the form's instructions.
+
QString QXmppDataForm::instructions() const
{
return m_instructions;
}
+/// Sets the form's instructions.
+///
+/// \param instructions
+
void QXmppDataForm::setInstructions(const QString &instructions)
{
m_instructions = instructions;
}
+/// Returns the form's title.
+
QString QXmppDataForm::title() const
{
return m_title;
}
+/// Sets the form's title.
+///
+/// \param title
+
void QXmppDataForm::setTitle(const QString &title)
{
m_title = title;
}
+/// Returns the form's type.
+
QXmppDataForm::Type QXmppDataForm::type() const
{
return m_type;
}
+/// Sets the form's type.
+///
+/// \param type
+
void QXmppDataForm::setType(QXmppDataForm::Type type)
{
m_type = type;
}
+/// Returns true if the form has an unknown type.
+
bool QXmppDataForm::isNull() const
{
return m_type == QXmppDataForm::None;