ContactPhoto

Since: BlackBerry 10.0.0

#include <bb/pim/contacts/ContactPhoto>

To link against this class, add the following line to your .pro file: LIBS += -lbbpim

The ContactPhoto class represents a photo that's associated with a Contact.

This class contains references to photos on the file system that's associated with the contact. Each contact can have multiple photos associated with it, and one photo can be designated the primary photo of the contact.

You can retrieve a list of photos for a contact by using Contact::photos(). You can retrieve the primary photo for a contact by using Contact::primaryPhoto(), and set the primary photo by using ContactService::setPrimaryPhoto(). You can create a new ContactPhoto and specify values for an existing ContactPhoto by using a ContactPhotoBuilder.


Overview

Public Functions Index

ContactPhoto ()
ContactPhoto (const ContactPhoto &copy)
~ContactPhoto ()
ContactPhotoBuilderedit ()
intid () const
boolisValid () const
QStringlargePhoto () const
ContactPhoto &operator= (const ContactPhoto &copy)
QStringoriginalPhoto () const
QStringphotoHash () const
QStringsmallPhoto () const
intsourceAccountId () const

Public Functions

ContactPhoto ()

Constructs a new ContactPhoto.

Since:

BlackBerry 10.0.0

ContactPhoto (

Copy constructor.

This function constructs a ContactPhoto containing exactly the same values as the provided ContactPhoto.

Parameters
copy

The ContactPhoto to be copied.

Since:

BlackBerry 10.0.0

~ContactPhoto ()

Destructor.

Since:

BlackBerry 10.0.0

ContactPhotoBuilder edit ()

Edits the contents of this ContactPhoto.

This function returns a ContactPhotoBuilder that you can use to change the values of this ContactPhoto.

Return:

A ContactPhotoBuilder that you can use to change the values of this ContactPhoto.

Since:

BlackBerry 10.0.0

int id ()

Retrieves the internal ID of this ContactPhoto.

Return:

The internal ID of this ContactPhoto.

Since:

BlackBerry 10.0.0

bool isValid ()

Indicates whether this ContactPhoto is valid.

You should use this function to determine if a ContactPhoto is valid before you use it.

Return:

true if this ContactPhoto is valid, false otherwise.

Since:

BlackBerry 10.0.0

QString largePhoto ()

Retrieves the file path of the large photo that's associated with this ContactPhoto.

There is a "file://" prefix added to the response to help make Cascades integration easier.

Return:

The file path of the large photo that's associated with this ContactPhoto.

Since:

BlackBerry 10.0.0

ContactPhoto & operator= (

Assignment operator.

This operator copies all values from the provided ContactPhoto into this ContactPhoto.

Parameters
copy

The ContactPhoto from which to copy all values.

Return:

A ContactPhoto with all copied data

Since:

BlackBerry 10.0.0

QString originalPhoto ()

Retrieves the file path of the original photo that's associated with this ContactPhoto.

Both the small photo and large photo are created based on this original photo. There is a "file://" prefix added to the response to help make Cascades integration easier.

Return:

The file path of the original photo that's associated with this ContactPhoto.

Since:

BlackBerry 10.0.0

QString photoHash ()

Retrieves the photo hash that's associated with this ContactPhoto.

You should use this function to retrieve the hash of a ContactPhoto for comparison.

Return:

The hash of the photo that's associated with this ContactPhoto.

Since:

BlackBerry 10.3.0

QString smallPhoto ()

Retrieves the file path of the small photo that's associated with this ContactPhoto.

There is a "file://" prefix added to the response to help make Cascades integration easier.

Return:

The file path of the small photo that's associated with this ContactPhoto.

Since:

BlackBerry 10.0.0

int sourceAccountId ()

Retrieves the source account ID of this ContactPhoto.

You can use the source account ID to help locate the origin of the photo.

Return:

The source account ID of this ContactPhoto.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus