The QContactRelationshipFilter class provides a filter based around relationship criteria. More...
#include <QContactRelationshipFilter>
Inherits: QContactFilter.
This class was introduced in Qt Mobility 1.0.
QContactRelationshipFilter () | |
QContactRelationshipFilter ( const QContactFilter & other ) | |
QContactId | relatedContactId () const |
QContactRelationship::Role | relatedContactRole () const |
QString | relationshipType () const |
void | setRelatedContactId ( const QContactId & relatedContactId ) |
void | setRelatedContactRole ( QContactRelationship::Role relatedContactRole ) |
void | setRelationshipType ( const QString & relationshipType ) |
The QContactRelationshipFilter class provides a filter based around relationship criteria.
It may be used to select contacts which are involved in relationships which are of a certain type, or which involve certain contacts.
One common use-case might be to select the contacts which are a member of a particular group. This use-case may be met with the following filter:
QContactRelationshipFilter groupFilter; // select all contacts which are involved groupFilter.setRelationshipType(QContactRelationship::HasMember); // in a group relationship groupFilter.setRelatedContactId(groupContact.id()); // with the group contact groupFilter.setRelatedContactRole(QContactRelationship::First); // where the group contact is the first participant
Another common use-case might be to select the groups which a particular contact is a member of. This use-case may be met with the following filter:
QContactRelationshipFilter whichGroupsFilter; // select all contacts which are involved whichGroupsFilter.setRelationshipType(QContactRelationship::HasMember); // in a group relationship whichGroupsFilter.setRelatedContactId(particularContact.id()); // with the particular contact whichGroupsFilter.setRelatedContactRole(QContactRelationship::Second); // where the particular contact is the second participant
Constructs a new relationship filter
Constructs a copy of other if possible, else constructs a new QContactRelationshipFilter. *
This function was introduced in Qt Mobility 1.0.
Returns the id of the contact with whom the tested contact must have a relationship in order for the tested contact to match this filter
This function was introduced in Qt Mobility 1.0.
See also setRelatedContactId().
Returns the role in the relationship with the tested contact that the related contact must play in order for the tested contact to match this filter
This function was introduced in Qt Mobility 1.0.
See also setRelatedContactRole().
Returns the type of relationship that a contact must have in order to match the filter
This function was introduced in Qt Mobility 1.0.
See also setRelationshipType().
Sets the id of the contact with whom the tested contact must have a relationship in order for the tested contact to match this filter to be relatedContactId
This function was introduced in Qt Mobility 1.0.
See also relatedContactId().
Sets the role in the relationship with the tested contact that the related contact must play in order for the tested contact to match this filter to be relatedContactRole
This function was introduced in Qt Mobility 1.0.
See also relatedContactRole().
Sets the type of relationship which a contact must have in order to match this filter to relationshipType
This function was introduced in Qt Mobility 1.0.
See also relationshipType().
© 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.