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  · 

MapGestureArea

The MapGestureArea element provides Map gesture interaction. More...

Inherits QtObject

This type was introduced in Qt Location 5.0.

Properties

Signals

Detailed Description

MapGestureArea elements are used as part of a Map, to provide for panning, flicking and pinch-to-zoom gesture used on touch displays.

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

The two most commonly used properties of the MapGestureArea are the enabled and activeGestures properties. Both of these must be set before a MapGestureArea will have any effect upon interaction with the Map. The flickDeceleration property controls how quickly the map pan slows after contact is released while panning the map.

Performance

The MapGestureArea, 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 zoom and pan gestures on the map, but not flicking. So the map scrolling will halt immediately on releasing the mouse button / touch.

 Map {
     gesture.enabled: true
     gesture.activeGestures: MapGestureArea.ZoomGesture | MapGestureArea.PanGesture
 }

Property Documentation

activeGestures : enumeration

This property holds the gestures that will be active. By default the zoom, pan and flick gestures are enabled.

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

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 GestureArea.ZoomGesture is supported.


enabled : bool

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


read-onlyisPanActive : bool

This read-only property holds whether any pan gesture (panning or flicking) is active.


isPinchActive : bool

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


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


panEnabled : bool

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


pinchEnabled : bool

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


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 MapGestureArea::pinchStarted(PinchEvent event)

Raised when a pinch gesture is started.

See also pinchUpdated and pinchFinished.


void MapGestureArea::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