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  · 

QContactRelationship Class Reference

The QContactRelationship class describes a one-to-one relationship between a locally-stored contact and another (possibly remote) contact. More...

 #include <QContactRelationship>

Public Types

enum Role { First, Second, Either }

Public Functions

QContactRelationship ()
QContactRelationship ( const QContactRelationship & other )
~QContactRelationship ()
QContactId first () const
QString relationshipType () const
QContactId second () const
void setFirst ( const QContactId & firstId )
void setRelationshipType ( const QString & relationshipType )
void setSecond ( const QContactId & secondId )
bool operator!= ( const QContactRelationship & other ) const
QContactRelationship & operator= ( const QContactRelationship & other )
bool operator== ( const QContactRelationship & other ) const

Static Public Members

const QLatin1Constant Aggregates
const QLatin1Constant HasAssistant
const QLatin1Constant HasManager
const QLatin1Constant HasMember
const QLatin1Constant HasSpouse
const QLatin1Constant IsSameAs

Detailed Description

The QContactRelationship class describes a one-to-one relationship between a locally-stored contact and another (possibly remote) contact.

Each relationship is uniquely identified by the combination of the first contact id, second contact id, and the relationship type.

A relationship should not contain a second contact which is the same as the first contact. Any local contacts which are referenced in the relationship (that is, any source contact, or any second contact whose manager URI is left empty or whose manager URI references the manager that stores the source contact, and in which the relationship will be saved) should exist.

If any of these requirements are not met, validation of the relationship may fail when attempting to save the relationship in a QContactManager.

See also QContactRelationshipFilter.

Member Type Documentation

enum QContactRelationship::Role

Describes the roles that a contact may take in a relationship.

ConstantValueDescription
QContactRelationship::First0The contact is the first contact in the relationship
QContactRelationship::Second1The contact is the second contact in the relationship
QContactRelationship::Either2The contact is either the first or second contact in the relationship

Member Function Documentation

QContactRelationship::QContactRelationship ()

Constructs a new relationship

QContactRelationship::QContactRelationship ( const QContactRelationship & other )

Creates a copy of the other relationship

QContactRelationship::~QContactRelationship ()

Frees the memory in use by the relationship

QContactId QContactRelationship::first () const

Returns the id of the locally-stored contact which has a relationship of the given type with the second contact

See also relationshipType(), second(), and setFirst().

QString QContactRelationship::relationshipType () const

Returns the type of relationship which the source contact has with the destination contacts

See also setRelationshipType().

QContactId QContactRelationship::second () const

Returns the id of the contact with which the first contact has a relationship of the given type

See also setSecond(), relationshipType(), and first().

void QContactRelationship::setFirst ( const QContactId & firstId )

Sets the id of the first contact in the relationship to firstId. This contact must be stored in the manager in which the relationship is stored, and has a relationship of the specified type with the second contact.

See also first().

void QContactRelationship::setRelationshipType ( const QString & relationshipType )

Sets the type of relationship that the source contact has with the destination contacts to relationshipType.

See also relationshipType().

void QContactRelationship::setSecond ( const QContactId & secondId )

Sets the second contact in the relationship to secondId. The first contact has a relationship of the specified type with this contact.

See also second().

bool QContactRelationship::operator!= ( const QContactRelationship & other ) const

Returns true if this relationship is not equal to other, otherwise returns false.

QContactRelationship & QContactRelationship::operator= ( const QContactRelationship & other )

Assigns this relationship to be equal to other

bool QContactRelationship::operator== ( const QContactRelationship & other ) const

Returns true if this relationship is equal to the other relationship, otherwise returns false.

Member Variable Documentation

const QLatin1Constant QContactRelationship::Aggregates

The relationship type which identifies the first contact as aggregating the second contact into a metacontact

const QLatin1Constant QContactRelationship::HasAssistant

The relationship type which identifies the second contact as being the assistant of the first contact

const QLatin1Constant QContactRelationship::HasManager

The relationship type which identifies the second contact as being the manager of the first contact

const QLatin1Constant QContactRelationship::HasMember

The relationship type which identifies the first contact as being a group which includes the second contact

const QLatin1Constant QContactRelationship::HasSpouse

The relationship type which identifies the second contact as being the spouse of the first contact

const QLatin1Constant QContactRelationship::IsSameAs

The relationship type which identifies the first contact as being the same contact as the second contact

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();
Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 43
  4. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 9
Page suivante

Le Qt Labs au hasard

Logo

Génération de contenu dans des threads

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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.1
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