ContactPhotoBuilder
Since: BlackBerry 10.0.0
#include <bb/pim/contacts/ContactPhotoBuilder>
To link against this class, add the following line to your .pro file: LIBS += -lbbpim
The ContactPhotoBuilder class lets you create, and specify properties for, a new ContactPhoto or edit an existing ContactPhoto.
You can use this class to set properties, such as file path, for a ContactPhoto. This class uses the builder pattern to create a ContactPhoto and set its properties. Each of the set*() functions returns a self reference to the builder, allowing you to chain function calls together. For example, here's how to create a ContactPhoto with a file path using the builder pattern:
ContactPhoto photo = ContactPhotoBuilder() .setOriginalPhoto("/images/photos/myPhoto1.png");
Overview
Public Functions Index
ContactPhotoBuilder () | |
ContactPhotoBuilder (ContactPhoto &photo) | |
ContactPhotoBuilder (const ContactPhotoBuilder ©) | |
~ContactPhotoBuilder () | |
operator ContactPhoto () | |
ContactPhotoBuilder & | operator= (const ContactPhotoBuilder &operand) |
ContactPhotoBuilder & | setOriginalPhoto (const QString &filepath) |
ContactPhotoBuilder & | setPrimaryPhoto (bool isPrimary) |
Public Functions
Edits the provided ContactPhoto.
You can use this function to edit the properties of an existing ContactPhoto, as an alternative to calling ContactPhoto::edit().
Copy constructor.
This function constructs a ContactPhotoBuilder containing exactly the same values as the provided ContactPhotoBuilder.
Parameters | |
---|---|
copy |
The ContactPhotoBuilder to be copied. |
BlackBerry 10.0.0
Destructor.
BlackBerry 10.0.0
ContactPhotoBuilder &
Assignment operator.
This operator copies all values from the provided ContactPhotoBuilder into this ContactPhotoBuilder.
Parameters | |
---|---|
operand |
The ContactPhotoBuilder from which to copy all values. |
A ContactPhotoBuilder with all copied data
BlackBerry 10.0.0
ContactPhotoBuilder &
Sets the file path of the original photo.
You should not prefix the file path with "file://". This string is added when you retrieve the photo using ContactPhoto::smallPhoto(), ContactPhoto::largePhoto(), or ContactPhoto::originalPhoto().
Parameters | |
---|---|
filepath |
The file path to set. |
A ContactPhotoBuilder with the provided file path.
BlackBerry 10.0.0
ContactPhotoBuilder &
Sets whether this photo is the primary photo for a contact.
The default value is false (the ContactPhoto that's created is not the primary photo).
Parameters | |
---|---|
isPrimary |
If true the photo is the primary photo for a contact, if false the photo is not a primary photo for a contact. |
A ContactPhotoBuilder with the provided indication of whether the photo is a primary photo for a contact.
BlackBerry 10.0.0