API Documentation
Documentation for developing SailfishOS applicationsFirstTimeUseCounter QML Type
Use counter for displaying hints More...
| Import Statement: | import Sailfish.Silica 1.0 |
Properties
- active : bool
- count : int
- ignoreSystemHints : bool
- key : string
- limit : int
Methods
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
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.
This property controls the upper limit of the counter. Once the counter reaches the limit, it will not be activated any more.
Method Documentation
Sets counter to limit + 1. If FirstTimeUseCounter is not active this function does nothing.
Increases counter. If FirstTimeUseCounter is not active this function does nothing.