ContactGroupBuilder
Since: BlackBerry 10.3.0
#include <bb/pim/contacts/ContactGroupBuilder>
To link against this class, add the following line to your .pro file: LIBS += -lbbpim
The ContactGroupBuilder class lets you create and specify properties for a new ContactGroup or edit an existing ContactGroup.
You can use this class to set properties, such as attributes, a postal address, or a photo, for a ContactGroup. This class uses the builder pattern to create a ContactGroup and set its properties. Each of the functions returns a self reference to the builder, allowing you to chain function calls together. For example, here's how to create a ContactGroup with two attributes using the builder pattern:
ContactGroup createARandomContactGroup() { ContactService service; ContactGroupBuilder builder; return service.createContactGroup(builder); }
Any changes that you make to a ContactGroup using this builder are temporary until the changes are persisted by using the ContactService.
Overview
Public Functions Index
ContactGroupBuilder () | |
ContactGroupBuilder (ContactGroup &contact) | |
ContactGroupBuilder (const ContactGroupBuilder ©) | |
~ContactGroupBuilder () | |
operator ContactGroup () | |
ContactGroupBuilder & | operator= (const ContactGroupBuilder &cgb) |
ContactGroupBuilder & | setFavourite (bool isFavourite) |
ContactGroupBuilder & | setName (const QString &name) |
Public Functions
Edits the provided ContactGroup.
You can use this function to edit the properties of an existing ContactGroup, as an alternative to calling ContactGroup::edit().
Parameters | |
---|---|
contact |
The ContactGroup to edit. |
ContactGroup::edit()
BlackBerry 10.3.0
Copy constructor.
This function constructs a ContactGroupBuilder containing exactly the same values as the provided ContactGroupBuilder.
Parameters | |
---|---|
copy |
The ContactGroupBuilder to be copied. |
BlackBerry 10.3.0
Destructor.
BlackBerry 10.3.0
ContactGroupBuilder &
Assignment operator.
This operator copies all values from the provided ContactGroupBuilder into this ContactGroupBuilder.
Parameters | |
---|---|
cgb |
The ContactGroupBuilder from which to copy all values. |
A ContactGroupBuilder with all copied data.
BlackBerry 10.3.0
ContactGroupBuilder &
Sets whether the contact group is a favorite contact.
Favorite contacts are displayed in the favorites grid in the Contacts application.
Parameters | |
---|---|
isFavorite |
If true the contact group is a favorite contact, if false the contact group is not a favorite contact. |
A ContactGroupBuilder with the provided indication of whether the contact group is a favorite contact.
BlackBerry 10.3.0
ContactGroupBuilder &
Sets the name for the group.
Parameters | |
---|---|
name |
The group name to set. |
A ContactGroupBuilder with the modified group name.
BlackBerry 10.3.0