QContactTag Class
The QContactTag class contains a tag associated with a contact. More...
Header: | #include <QContactTag> |
Inherits: | QContactDetail |
Public Types
enum | TagField { FieldTag } |
Public Functions
- 22 public functions inherited from QContactDetail
Static Public Members
Detailed Description
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>().count() > 0) { // Do something with it }
Member Type Documentation
enum QContactTag::TagField
This enumeration defines the fields supported by QContactTag.
Constant | Value | Description |
---|---|---|
QContactTag::FieldTag | 0 | The value stored in this field contains the tag. |
Member Function Documentation
[static]
QContactFilter QContactTag::match(const QString &subString)
Returns a filter suitable for finding contacts which have a tag which contains the specified subString.
void QContactTag::setTag(const QString &tag)
Sets the tag associated with a contact which is stored in this detail to tag.
See also tag().
QString QContactTag::tag() const
Returns the tag associated with a contact which is stored in this detail.
See also setTag().
Member Variable Documentation
const DetailType QContactTag::Type
The enum constant for the type identifier of QContactTag details.