Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QContactRelationshipFilter Class Reference

The QContactRelationshipFilter class provides a filter based around relationship criteria. More...

    #include <QContactRelationshipFilter>

Inherits QContactFilter.


Public Functions

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 )

Detailed Description

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(QContactRelationshipFilter::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(QContactRelationshipFilter::HasMember); // in a group relationship
    whichGroupsFilter.setRelatedContactId(particularContact.id());                // with the particular contact
    whichGroupsFilter.setRelatedContactRole(QContactRelationshipFilter::Second);  // where the particular contact is the second participant

Member Function Documentation

QContactRelationshipFilter::QContactRelationshipFilter ()

Constructs a new relationship filter

QContactRelationshipFilter::QContactRelationshipFilter ( const QContactFilter & other )

Constructs a copy of other if possible, else constructs a new QContactRelationshipFilter.

QContactId QContactRelationshipFilter::relatedContactId () const

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

See also setRelatedContactId().

QContactRelationship::Role QContactRelationshipFilter::relatedContactRole () const

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

See also setRelatedContactRole().

QString QContactRelationshipFilter::relationshipType () const

Returns the type of relationship that a contact must have in order to match the filter

See also setRelationshipType().

void QContactRelationshipFilter::setRelatedContactId ( const QContactId & relatedContactId )

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

See also relatedContactId().

void QContactRelationshipFilter::setRelatedContactRole ( QContactRelationship::Role relatedContactRole )

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

See also relatedContactRole().

void QContactRelationshipFilter::setRelationshipType ( const QString & relationshipType )

Sets the type of relationship which a contact must have in order to match this filter to relationshipType

See also relationshipType().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtmobility-1.0
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web