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

API Documentation

Documentation for developing SailfishOS applications
  • 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
  • Methods
  • Detailed Description

FirstTimeUseCounter QML Type

Use counter for displaying hints More...

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

Properties

  • active : bool
  • count : int
  • ignoreSystemHints : bool
  • key : string
  • limit : int

Methods

  • exhaust()
  • increase()
  • reset()

Detailed Description

FirstTimeUseCounter provides a use counter. It is intended to be used in combination with TapInteractionHint, TouchInteractionHint and Loader, in order to limit the display of hints to a predefined number.

Example use:

 import QtQuick 2.6
 import Sailfish.Silica 1.0
 Loader {
     active: counter.active
     sourceComponent: Component {
         Item {
             Connections {
                 target: mainView
                 onUserAction: {
                     touchInteractionHint.restart()
                     counter.increase()
                 }
             }

             TouchInteractionHint {
                 id: touchInteractionHint
             }
         }
     }
     FirstTimeUseCounter {
         id: counter
         limit: 3
         key: "/apps/myapp/usecounter"
     }
 }

Property Documentation

[read-only] active : bool

Returns true as long as the upper limit has not been reached.


count : int

This property holds the current counter value.


ignoreSystemHints : bool

This property controls whether system hints are ignored or not when definining active state. Apps are not supposed to show hints until after system hints have been shown, and by default FirstTimeUseCounter takes this into account.


key : string

This property holds the key to a DConf value which is used for storing the counter.


limit : int

This property controls the upper limit of the counter. Once the counter reaches the limit, it will not be activated any more.


Method Documentation

exhaust()

Sets counter to limit + 1. If FirstTimeUseCounter is not active this function does nothing.


increase()

Increases counter. If FirstTimeUseCounter is not active this function does nothing.


reset()

Resets counter to 0.


  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn