Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 697

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QGesture Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGesture Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGesture class represents a gesture, containing properties
that describe the corresponding user input. <a href="#details">More...</a></p>

<p>Inherits <a href="qobject.html">QObject</a>.</p><p>Inherited by <a href="qpangesture.html">QPanGesture</a>, <a href="qpinchgesture.html">QPinchGesture</a>, <a href="qswipegesture.html">QSwipeGesture</a>, <a href="qtapandholdgesture.html">QTapAndHoldGesture</a> and <a href="qtapgesture.html">QTapGesture</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qgesture.html#GestureCancelPolicy-enum">GestureCancelPolicy</a></b> { CancelNone, CancelAllInContext }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgesture.html#QGesture">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />GestureCancelPolicy <b><a href="qgesture.html#gestureCancelPolicy">gestureCancelPolicy</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.GestureType <b><a href="qgesture.html#gestureType">gestureType</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qgesture.html#hasHotSpot">hasHotSpot</a></b> (<i>self</i>)</li><li><div class="fn" />QPointF <b><a href="qgesture.html#hotSpot">hotSpot</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgesture.html#setGestureCancelPolicy">setGestureCancelPolicy</a></b> (<i>self</i>, GestureCancelPolicy&#160;<i>policy</i>)</li><li><div class="fn" /><b><a href="qgesture.html#setHotSpot">setHotSpot</a></b> (<i>self</i>, QPointF&#160;<i>value</i>)</li><li><div class="fn" />Qt.GestureState <b><a href="qgesture.html#state">state</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgesture.html#unsetHotSpot">unsetHotSpot</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGesture class represents a gesture, containing properties
that describe the corresponding user input.</p>
<p>Gesture objects are not constructed directly by developers. They
are created by the <a href="qgesturerecognizer.html">QGestureRecognizer</a> object that is
registered with the application; see <a href="qgesturerecognizer.html#registerRecognizer">QGestureRecognizer.registerRecognizer</a>().</p>
<p>For an overview of gesture handling in Qt and information on
using gestures in your applications, see the <a href="gestures-overview.html">Gestures Programming</a> document.</p>
<a id="gesture-properties" name="gesture-properties" />
<h3>Gesture Properties</h3>
<p>The class has a list of properties that can be queried by the
user to get some gesture-specific arguments. For example, the pinch
gesture has a scale factor that is exposed as a property.</p>
<p>Developers of custom gesture recognizers can add additional
properties in order to provide additional information about a
gesture. This can be done by adding new dynamic properties to a
QGesture object, or by subclassing the QGesture class (or one of
its subclasses).</p>
<a id="lifecycle-of-a-gesture-object" name="lifecycle-of-a-gesture-object" />
<h3>Lifecycle of a Gesture Object</h3>
<p>A QGesture instance is implicitly created when needed and is
owned by Qt. Developers should never destroy them or store them for
later use as Qt may destroy particular instances of them and create
new ones to replace them.</p>
<p>The registered gesture recognizer monitors the input events for
the target object via its <a href="qgesturerecognizer.html#recognize">recognize()</a> function,
updating the properties of the gesture object as required.</p>
<p>The gesture object may be delivered to the target object in a
<a href="qgestureevent.html">QGestureEvent</a> if the corresponding
gesture is active or has just been canceled. Each event that is
delivered contains a list of gesture objects, since support for
more than one gesture may be enabled for the target object. Due to
the way events are handled in Qt, gesture events may be filtered by
other objects.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="GestureCancelPolicy-enum" />QGesture.GestureCancelPolicy</h3><p>This enum describes how accepting a gesture can cancel other
gestures automatically.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QGesture.CancelNone</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">On accepting this gesture no other gestures
will be affected.</td>
</tr>
<tr>
<td class="topAlign"><tt>QGesture.CancelAllInContext</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">On accepting this gesture all gestures that
are active in the context (respecting the <a href="qt.html#GestureFlag-enum">Qt.GestureFlag</a> that were specified
when subscribed to the gesture) will be cancelled.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGesture" />QGesture.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a new gesture object with the given
<i>parent</i>.</p>
<p><a href="qgesture.html">QGesture</a> objects are created by
gesture recognizers in the <a href="qgesturerecognizer.html#create">QGestureRecognizer.create</a>()
function.</p>


<h3 class="fn"><a name="gestureCancelPolicy" /><a href="qgesture.html#GestureCancelPolicy-enum">GestureCancelPolicy</a> QGesture.gestureCancelPolicy (<i>self</i>)</h3><h3 class="fn"><a name="gestureType" /><a href="qt.html#GestureType-enum">Qt.GestureType</a> QGesture.gestureType (<i>self</i>)</h3><h3 class="fn"><a name="hasHotSpot" />bool QGesture.hasHotSpot (<i>self</i>)</h3><h3 class="fn"><a name="hotSpot" /><a href="qpointf.html">QPointF</a> QGesture.hotSpot (<i>self</i>)</h3><h3 class="fn"><a name="setGestureCancelPolicy" />QGesture.setGestureCancelPolicy (<i>self</i>, <a href="qgesture.html#GestureCancelPolicy-enum">GestureCancelPolicy</a>&#160;<i>policy</i>)</h3><h3 class="fn"><a name="setHotSpot" />QGesture.setHotSpot (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="state" /><a href="qt.html#GestureState-enum">Qt.GestureState</a> QGesture.state (<i>self</i>)</h3><h3 class="fn"><a name="unsetHotSpot" />QGesture.unsetHotSpot (<i>self</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>