Sailfish Contacts
API DocumentationContactBrowser QML Type
Import Statement: | import Sailfish.Contacts 1.0 |
Properties
- allContactsModel : var
- canHideSearchField : bool
- canSelect : bool
- contactView : alias
- favoriteContactsModel : var
- pageHeader : Component
- pageHeaderItem : var
- placeholder : alias
- placeholderText : string
- recentContactsCategoryMask : alias
- requiredContactProperty : int
- searchActive : bool
- searchableContactProperty : int
- selectedContacts : alias
- symbolScroller : alias
- topMargin : real
- uniformSelectionTypes : bool
Signals
- contactClicked(var contact)
- contactPressAndHold(var contact)
Methods
- forceSearchFocus()
- openContextMenu(contactId, menu, menuProperties)
- resetScrollPosition()
- selectContactProperty(contactId, requiredProperty, propertySelectedCallback)
Detailed Description
Property Documentation
Reference to the main flickable item that presents the list of contacts.
Placeholder component shown when no contacts are available. Override to customize shown placeholder labels and actions.
If set, then only contacts with this property can be selected or found in a search.
Supported values are a combination of the following constants defined in PeopleModel:
Constant | Value |
---|---|
EmailAddressRequired | |
AccountUriRequired | |
PhoneNumberRequired |
If true, once a contact is selected, the browser will only show other contacts that also have the same type.
Signal Documentation
Method Documentation
Opens a context menu for the last contact that was clicked (or pressed+held) in the list. Or, if selectContactProperty() has opened a page with a list of contact properties for the matching contact, and that page is still active, the context menu is opened for the last selected property.
The given menu must be a Component.
The contactId parameter ensures that the menu is shown for the intended contact - i.e. the last clicked/held contact. If it does not match the last clicked/held contact, this does nothing.
Opens a menu to allow the user to select from a list of property values for the last contact that was clicked (or pressed+held) in the list. E.g. if requiredProperty==PeopleModel.PhoneNumberRequired, then a list of the contact's phone numbers is displayed. If a context menu is already open within the contact list, the new menu will be embedded within that instead of opening a separate menu.
When the user makes the selection, propertySelectedCallback is called with these arguments: - 'contact' - the SeasidePerson* object - 'propertyData' - a JavaScript object describing the selected property. E.g. if a phone number is selected, this map contains {"property": { "number": <selected-phone-number> }}. See common.js selectableProperties() for the possible property values. - 'contextMenu' - the context menu showing the list of properties, if applicable - 'propertyPicker' the property picker object
If the contact only has one property of the required type, no menu is shown, and the callback function is invoked immediately with that single property value. If the contact has no properties of the required type, propertySelectedCallback is invoked immediately with an empty propertyData map.
The contactId parameter ensures that the menu is shown for the intended contact - i.e. the last clicked/held contact. If it does not match the last clicked/held contact, this does nothing.
This does nothing if requiredProperty==PeopleModel.NoPropertyRequired.