MapFlickableThe MapFlickable element provides basic flicking of the Map. More... Inherits QtObject This type was introduced in Qt Location 5.0. Properties
SignalsDetailed DescriptionMapFlickable elements are used as part of a Map, to provide for the common flick gesture that pans the map in an intuitive fashion. This is comparable to the activity of the Flickable element. A MapFlickable is automatically created with a new Map and available with the flick property. This is the only way to create a MapFlickable, and once created this way cannot be destroyed without its parent Map. The two most commonly used properties of the MapFlickable are enabled and deceleration. The former must be set in order for the MapFlickable to have any effect upon its parent Map. The latter property customizes the response of the MapFlickable to input from the user, by adjusting how much "friction" slows down the flick after the user has raised their finger or released the mouse button. PerformanceThe MapFlickable, when enabled, must process all incoming touch or cursor movement events in order to build up the "flick" gesture, and then complete an animation for the "deceleration" phase. The MapFlickable builds up a buffer of samples during the motion capture phase: currently a maximum of 3 past samples are processed at each new event. As a result, the overhead on movement events can be considered constant time, as there are many more than 3 events in a typical gesture. The cost of animation is identical to two parallel double float QPropertyAnimations with OutQuad easing curves. Example UsageThe following example enables the flick gesture on a map, and sets the deceleration/friction value to be double its standard level. Map { flick.enabled: true flick.deceleration: 5000 } Property DocumentationThis property holds the rate at which a flick will decelerate. The larger the value, the faster the flick decelerates. Default value is 2500, minimum value is 500 and maximum value is 10000. This property holds whether the flicking is enabled. By default flicking is enabled. Disabling flicking will terminate any potentially active flicks (movement or actual flick). Signal DocumentationThis handler is called when the view stops moving due to a flick. The order of onMovementEnded() and onFlickEnded() is not specified. This handler is called when the view is flicked. A flick starts from the point that the mouse or touch is released, while still in motion. This handler is called when the view stops moving due to user interaction. If a flick was generated, this handler will be triggered once the flick stops. If a flick was not generated, the handler will be triggered when the user stops dragging - that is a mouse or touch release. This handler is called when the view begins moving due to user interaction. Typically this means that the user is dragging a finger - or a mouse with one of more mouse buttons pressed - on the map. |