Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

MapPinchArea

The MapPinchArea element provides basic Map pinch interaction. More...

Inherits QtObject

This type was introduced in Qt Location 5.0.

Properties

Signals

Detailed Description

MapPinchArea elements are used as part of a Map, to provide for the pinch-to-zoom gesture used on touch displays. This is comparable to the activity of the PinchArea element.

A MapPinchArea is automatically created with a new Map and available with the pinch property. This is the only way to create a MapPinchArea, and once created this way cannot be destroyed without its parent Map.

The two most commonly used properties of the MapPinchArea are the enabled and activeGestures properties. Both of these must be set before a MapPinchArea will have any effect upon interaction with the Map.

Performance

The MapPinchArea, when enabled, must process all incoming touch events in order to track the shape and size of the "pinch". The overhead added on touch events can be considered constant time.

Example Usage

The following example enables the pinch gesture on a map.

 Map {
     pinch.enabled: true
     pinch.activeGestures: MapPinchArea.ZoomGesture
 }

Property Documentation

read-onlyactive : bool

This read-only property holds whether a pinch gesture is active.


activeGestures : enumeration

This property holds the gestures that the pinch should control. By default the ZoomGesture is enabled.

  • PinchArea.NoGesture - Don't support any additional gestures (value: 0x0000).
  • PinchArea.ZoomGesture - Support the map zoom gesture (value: 0x0001).
  • PinchArea.RotationGesture - Support the map rotation gesture (value: 0x0002).
  • PinchArea.TiltGesture - Support the map tilt gesture (value: 0x0004).
  • PinchArea.PanGesture - Support the map pan gesture while pinching (value: 0x0008).

For the extremist, one may OR flag the RotationGesture or TiltGesture but these come with absolutely no warranty or guarantees at the moment (may be removed, changed, moved around)

Note: For the time being, only PinchArea.ZoomGesture is supported.


enabled : bool

This property holds whether the pinch gestures are enabled. Note: disabling pinch during active pinch does not have effect on the potentially active current pinch.


maximumZoomLevelChange : real

This property holds the maximum zoom level change per pinch, essentially meant to be used for setting the zoom sensitivity.

It is an indicative measure calculated from the dimensions of the map area, roughly corresponding how much zoom level could change with maximum pinch zoom. Default value is 2.0, maximum value is 10.0


rotationFactor : real

This property holds the rotation factor for zoom, essentially meant to be used for setting the rotation sensitivity.

It is an indicative measure; the default value 1.0 means the map roughly follows the fingers, whereas 2.0 means rotating twice as fast. Maximum value is 5.0.


Signal Documentation

void MapPinchArea::pinchStarted(PinchEvent event)

Raised when a pinch gesture is started.

See also pinchUpdated and pinchFinished.


void MapPinchArea::pinchUpdated(PinchEvent event)

Once a pinch has begun this event gets raised as the user moves her fingers across the map.

See also pinchStarted and pinchFinished.


Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web