Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

Sailfish Contacts

API Documentation
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Signals
  • Methods
  • Detailed Description

ContactBrowser QML Type

Import Statement: import Sailfish.Contacts 1.0
  • List of all members, including inherited members

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

allContactsModel : var


canHideSearchField : bool

Whether the search bar can be hidden by the user


canSelect : bool

Whether contacts can be highlighted and added to the selection model


[read-only] contactView : alias

Reference to the main flickable item that presents the list of contacts.


favoriteContactsModel : var


pageHeader : Component

Page or dialog header component


[read-only] pageHeaderItem : var

Page or dialog header object, instantiated from the component


placeholder : alias

Placeholder component shown when no contacts are available. Override to customize shown placeholder labels and actions.


placeholderText : string

Full-page placeholder text to be shown when no contacts are available


recentContactsCategoryMask : alias

Filter to apply to the recent contacts list


requiredContactProperty : int

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:

ConstantValue
EmailAddressRequired
AccountUriRequired
PhoneNumberRequired

searchActive : bool

Whether the search bar is shown


searchableContactProperty : int

Properties to be made searchable as part of a search query


[read-only] selectedContacts : alias

Model of the selected contacts


symbolScroller : alias

Configuration of the symbol scrollbar.


topMargin : real

Margin above the view (defaults to DialogHeader height if inside a dialog)


uniformSelectionTypes : bool

If true, once a contact is selected, the browser will only show other contacts that also have the same type.


Signal Documentation

contactClicked(var contact)


contactPressAndHold(var contact)


Method Documentation

forceSearchFocus()


openContextMenu(contactId, menu, menuProperties)

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.


resetScrollPosition()


selectContactProperty(contactId, requiredProperty, propertySelectedCallback)

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.


  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn