The QContactRelationship class describes a one-to-one relationship between a locally-stored contact and another (possibly remote) contact. More...
#include <QContactRelationship>
This class was introduced in Qt Mobility 1.0.
enum | Role { First, Second, Either } |
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 |
const QLatin1Constant | Aggregates |
const QLatin1Constant | HasAssistant |
const QLatin1Constant | HasManager |
const QLatin1Constant | HasMember |
const QLatin1Constant | HasSpouse |
const QLatin1Constant | IsSameAs |
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.
Describes the roles that a contact may take in a relationship.
Constant | Value | Description |
---|---|---|
QContactRelationship::First | 0 | The contact is the first contact in the relationship |
QContactRelationship::Second | 1 | The contact is the second contact in the relationship |
QContactRelationship::Either | 2 | The contact is either the first or second contact in the relationship |
Constructs a new relationship
Creates a copy of the other relationship
This function was introduced in Qt Mobility 1.0.
Frees the memory in use by the relationship
Returns the id of the locally-stored contact which has a relationship of the given type with the second contact
This function was introduced in Qt Mobility 1.0.
See also relationshipType(), second(), and setFirst().
Returns the type of relationship which the source contact has with the destination contacts
This function was introduced in Qt Mobility 1.0.
See also setRelationshipType().
Returns the id of the contact with which the first contact has a relationship of the given type
This function was introduced in Qt Mobility 1.0.
See also setSecond(), relationshipType(), and first().
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.
This function was introduced in Qt Mobility 1.0.
See also first().
Sets the type of relationship that the source contact has with the destination contacts to relationshipType.
This function was introduced in Qt Mobility 1.0.
See also relationshipType().
Sets the second contact in the relationship to secondId. The first contact has a relationship of the specified type with this contact.
This function was introduced in Qt Mobility 1.0.
See also second().
Returns true if this relationship is not equal to other, otherwise returns false.
This function was introduced in Qt Mobility 1.0.
Assigns this relationship to be equal to other
This function was introduced in Qt Mobility 1.0.
Returns true if this relationship is equal to the other relationship, otherwise returns false.
This function was introduced in Qt Mobility 1.0.
The relationship type which identifies the first contact as aggregating the second contact into a metacontact
The relationship type which identifies the second contact as being the assistant of the first contact
The relationship type which identifies the second contact as being the manager of the first contact
The relationship type which identifies the first contact as being a group which includes the second contact
The relationship type which identifies the second contact as being the spouse of the first contact
The relationship type which identifies the first contact as being the same contact as the second contact