Detailed Description
The QContactId class provides information that uniquely identifies a contact in a particular manager.
It consists of a manager URI which identifies the manager which contains the contact,
A QContactId is "null" when it is default-constructed and therefore not associated with a contact in any manager.
Member Function Documentation
QContactId::QContactId()
* Constructs a new contact id. The contact is said to be "null", it has null engine id and isNull() for it returns true. This is the default constructor
See also isNull().
QContactId::QContactId(const QContactId & other)
Constructs a new contact id as a copy of other
QContactId::QContactId(QContactEngineId * engineId)
Constructs a manager-unique id which wraps the given engine-unique contact id engineId. This id takes ownership of the engine-unique contact id and will delete it when the id goes out of scope. Engine implementors must not delete the engineId or undefined behaviour will occur. The created contact id is not null, if the engineId is not null.
QContactId::~QContactId()
Cleans up the memory in use by the contact id
QContactId QContactId::fromString(const QString & idString) [static]
Deserializes the given idString. Returns a default-constructed (null) contact id if the given idString is not a valid, serialized contact id, or if the manager engine from which the id came could not be found.
See also toString().
bool QContactId::isNull() const
Returns true if this is the null (default constructed) id which has a null engine id;
QString QContactId::managerUri() const
Returns the URI of the manager which contains the contact identified by this id
QString QContactId::toString() const
Returns the contact id as a string. This string can be converted back to equal contact id using fromString.
See also fromString().
bool QContactId::operator!=(const QContactId & other) const
Returns true if either the manager URI or id of the contact id is different to that of other
bool QContactId::operator<(const QContactId & other) const
Returns true if this id is less than the other id. This id will be considered less than the other id if the manager URI of this id is alphabetically less than the manager URI of the other id. If both ids have the same manager URI, this id will be considered less than the other id if the engine id of this id is less than the engine id of the other id.
The null contact id is less than any non-null id.
This operator is provided primarily to allow use of a QContactId as a key in a QMap.
QContactId & QContactId::operator=(const QContactId & other)
Assigns the contact id to be equal to other
bool QContactId::operator==(const QContactId & other) const
Returns true if the other contact id has the same manager URI and they have equal engine ids. Returns true also, if both are null contact ids.