24 #ifndef PROFILEFIELD_H
25 #define PROFILEFIELD_H
28 #include <QStringList>
35 class ProfileFieldPrivate;
111 QString
label()
const;
119 bool validate(
const QString &aValue)
const;
128 QDomElement
toXml(QDomDocument &aDoc)
const;
148 ProfileFieldPrivate *d_ptr;
155 #endif // PROFILEFIELD_H
QString type() const
Get the field type.
Definition: ProfileField.cpp:147
QStringList options() const
Gets the allowed values for the field.
Definition: ProfileField.cpp:157
bool validate(const QString &aValue) const
Checks if the given value is in the list of allowed values.
Definition: ProfileField.cpp:167
static const QString VISIBLE_NEVER
Field should never be visible in UI.
Definition: ProfileField.h:56
This class represents a profile field.
Definition: ProfileField.h:48
Definition: AccountsHelper.h:31
static const QString TYPE_BOOLEAN
Field type for boolean fields.
Definition: ProfileField.h:63
bool isReadOnly() const
Checks if the field is read only.
Definition: ProfileField.cpp:225
QString name() const
Gets the field name.
Definition: ProfileField.cpp:142
static const QString VISIBLE_ALWAYS
Field should be always visible in UI.
Definition: ProfileField.h:53
static const QString VISIBLE_USER
Field should be visible in UI if a value for the field has not.
Definition: ProfileField.h:60
QDomElement toXml(QDomDocument &aDoc) const
Exports the field to XML.
Definition: ProfileField.cpp:182
~ProfileField()
Destructor.
Definition: ProfileField.cpp:136
QString defaultValue() const
Gets the field default value.
Definition: ProfileField.cpp:152
QString visible() const
Gets the visibility of the field.
Definition: ProfileField.cpp:213
ProfileField(const QDomElement &aRoot)
Constructs a ProfileField from XML.
Definition: ProfileField.cpp:94
QString label() const
Gets the field label.
Definition: ProfileField.cpp:162