qtmobility/src/contacts/qcontactrelationship.h
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    57 
    57 
    58 class Q_CONTACTS_EXPORT QContactRelationship
    58 class Q_CONTACTS_EXPORT QContactRelationship
    59 {
    59 {
    60 public:
    60 public:
    61 #ifdef Q_QDOC
    61 #ifdef Q_QDOC
    62     const char* HasMember;
    62     static const QLatin1Constant HasMember;
    63     const char* Aggregates;
    63     static const QLatin1Constant Aggregates;
    64     const char* Is;
    64     static const QLatin1Constant Is;
    65     const char* IsSameAs;
    65     static const QLatin1Constant IsSameAs;
    66     const char* HasAssistant;
    66     static const QLatin1Constant HasAssistant;
    67     const char* HasManager;
    67     static const QLatin1Constant HasManager;
    68     const char* HasSpouse;
    68     static const QLatin1Constant HasSpouse;
    69 #else
    69 #else
    70     Q_DECLARE_LATIN1_LITERAL(HasMember, "HasMember");
    70     Q_DECLARE_LATIN1_CONSTANT(HasMember, "HasMember");
    71     Q_DECLARE_LATIN1_LITERAL(Aggregates, "Aggregates");
    71     Q_DECLARE_LATIN1_CONSTANT(Aggregates, "Aggregates");
    72     Q_DECLARE_LATIN1_LITERAL(Is, "IsSameAs"); // deprecated
    72     Q_DECLARE_LATIN1_CONSTANT(IsSameAs, "IsSameAs");
    73     Q_DECLARE_LATIN1_LITERAL(IsSameAs, "IsSameAs");
    73     Q_DECLARE_LATIN1_CONSTANT(HasAssistant, "HasAssistant");
    74     Q_DECLARE_LATIN1_LITERAL(HasAssistant, "HasAssistant");
    74     Q_DECLARE_LATIN1_CONSTANT(HasManager, "HasManager");
    75     Q_DECLARE_LATIN1_LITERAL(HasManager, "HasManager");
    75     Q_DECLARE_LATIN1_CONSTANT(HasSpouse, "HasSpouse");
    76     Q_DECLARE_LATIN1_LITERAL(HasSpouse, "HasSpouse");
       
    77 #endif
    76 #endif
    78 
    77 
    79     QContactRelationship();
    78     QContactRelationship();
    80     ~QContactRelationship();
    79     ~QContactRelationship();
    81 
    80 
    90 
    89 
    91     void setFirst(const QContactId& firstId);
    90     void setFirst(const QContactId& firstId);
    92     void setSecond(const QContactId& secondId);
    91     void setSecond(const QContactId& secondId);
    93     void setRelationshipType(const QString& relationshipType);
    92     void setRelationshipType(const QString& relationshipType);
    94 
    93 
       
    94     enum Role {
       
    95         First = 0,
       
    96         Second,
       
    97         Either
       
    98     };
       
    99 
    95 private:
   100 private:
    96     QSharedDataPointer<QContactRelationshipPrivate> d;
   101     QSharedDataPointer<QContactRelationshipPrivate> d;
    97 };
   102 };
       
   103 
       
   104 Q_CONTACTS_EXPORT uint qHash(const QContactRelationship& key);
       
   105 #ifndef QT_NO_DEBUG_STREAM
       
   106 Q_CONTACTS_EXPORT QDebug operator<<(QDebug dbg, const QContactRelationship& rel);
       
   107 #endif
    98 
   108 
    99 QTM_END_NAMESPACE
   109 QTM_END_NAMESPACE
   100 
   110 
   101 #endif
   111 #endif
   102 
   112