The QContactTag class contains a tag associated with a contact. More...
#include <QContactTag>
Inherits: QContactDetail.
This class was introduced in Qt Mobility 1.0.
void | setTag ( const QString & tag ) |
QString | tag () const |
const QLatin1Constant | DefinitionName |
const QLatin1Constant | FieldTag |
QContactFilter | match ( const QString & subString ) |
The QContactTag class contains a tag associated with a contact.
Typically the tags associated with a contact will be distinct, although this is usually only enforced when the contact is saved in the manager.
Here is an example of retrieving all the tags for a contact:
QSet<QString> tags; foreach(const QContactTag& tag, contact.details<QContactTag>()) { tags.insert(tag.tag()); }
Here is an example of checking for a specific tag value:
if (contact.details<QContactTag>(QContactTag::FieldTag, "MyTag").count() > 0) { // Do something with it }
This leaf-class has been part of the default schema since version 1.0 of the Qt Mobility project.
Returns a filter suitable for finding contacts which have a tag which contains the specified subString.
Sets the tag associated with a contact which is stored in this detail to tag.
This function was introduced in Qt Mobility 1.0.
See also tag().
Returns the tag associated with a contact which is stored in this detail.
This function was introduced in Qt Mobility 1.0.
See also setTag().
The string constant for the definition name of QContactTag details.
The field key constant for the value containing the tag.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.