Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 50facae208d4a6f280e44a513b104320 > files > 1725

qt-mobility-doc-1.2.0-13.mga5.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtapsensor.cpp -->
  <title>Qt Mobility 1.2: QTapReading Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>QtMobility Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtsensors.html">QtSensors</a></li>
<li>QTapReading</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#qtapreading-units">QTapReading Units</a></li>
</ul>
</div>
<h1 class="title">QTapReading Class Reference</h1>
<!-- $$$QTapReading-brief -->
<p>The QTapReading class represents one reading from the tap sensor. <a href="#details">More...</a></p>
<!-- @@@QTapReading -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QTapReading&gt;</span></pre><p><b>Inherits: </b><a href="qsensorreading.html">QSensorReading</a>.</p>
<p>This class was introduced in Qt Mobility 1.0.</p>
<ul>
<li><a href="qtapreading-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtapreading.html#TapDirection-enum">TapDirection</a></b> { Undefined, X, Y, Z, ..., Z_Both }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qtapreading.html#doubleTap-prop">doubleTap</a></b> : const bool</li>
<li class="fn"><b><a href="qtapreading.html#tapDirection-prop">tapDirection</a></b> : const TapDirection</li>
</ul>
<ul>
<li class="fn">1 property inherited from <a href="qsensorreading.html#properties">QSensorReading</a></li>
<li class="fn">1 property inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtapreading.html#doubleTap-prop">isDoubleTap</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtapreading.html#setDoubleTap">setDoubleTap</a></b> ( bool <i>doubleTap</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtapreading.html#setTapDirection">setTapDirection</a></b> ( TapDirection <i>tapDirection</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> TapDirection </td><td class="memItemRight bottomAlign"><b><a href="qtapreading.html#tapDirection-prop">tapDirection</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">4 public functions inherited from <a href="qsensorreading.html#public-functions">QSensorReading</a></li>
<li class="fn">29 public functions inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 public slot inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-slots">QObject</a></li>
<li class="fn">1 signal inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#signals">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-variables">QObject</a></li>
<li class="fn">4 static public members inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#static-public-members">QObject</a></li>
<li class="fn">7 protected functions inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#protected-functions">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QTapReading-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QTapReading class represents one reading from the tap sensor.</p>
<a name="qtapreading-units"></a>
<h4>QTapReading Units</h4>
<p>The tap sensor registers tap events along the 3 axes that originate from the phone. The axes are arranged as follows.</p>
<p class="centerAlign"><img src="images/sensors-coordinates2.jpg" alt="" /></p><p>By default it returns only double tap events. The <a href="qtapsensor.html#returnDoubleTapEvents-prop">QTapSensor::returnDoubleTapEvents</a> property must be set to false to return individual tap events.</p>
</div>
<!-- @@@QTapReading -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$TapDirection$$$Undefined$$$X$$$Y$$$Z$$$X_Pos$$$Y_Pos$$$Z_Pos$$$X_Neg$$$Y_Neg$$$Z_Neg$$$X_Both$$$Y_Both$$$Z_Both -->
<h3 class="fn"><a name="TapDirection-enum"></a>enum QTapReading::<span class="name">TapDirection</span></h3>
<p>The tap direction is indicated using flags. Applications should check for the presence of a particular flag as multiple flags may be set at once.</p>
<p>The X, Y and Z flags allow an app to check for taps along an axis without caring about the direction.</p>
<pre class="cpp"> <span class="keyword">if</span> (reading<span class="operator">-</span><span class="operator">&gt;</span>tapDirection()<span class="operator">&amp;</span><span class="type"><a href="qtapreading.html">QTapReading</a></span><span class="operator">::</span>X) {
     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 }</pre>
<p>The *_Pos and *_Neg flags allow checking for taps in a specific direction. Note that some devices cannot determine the direction of a tap and will set both the _Pos and _Neg flag for the detected axis. Previous versions of the API did not allow this. Applications that check for the _Pos and _Neg flags as values should be updated so they can work with all devices.</p>
<p>For example, if you have code like</p>
<pre class="cpp"> if (reading-&gt;tapDirection() == QTapReading::X_Pos) {
     ..&#x2e;
 }</pre>
<p>you can rewrite it as</p>
<pre class="cpp"> <span class="keyword">if</span> (reading<span class="operator">-</span><span class="operator">&gt;</span>tapDirection()<span class="operator">&amp;</span><span class="type"><a href="qtapreading.html">QTapReading</a></span><span class="operator">::</span>X_Pos) {
     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 }</pre>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QTapReading::Undefined</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">This value means that the direction is unknown.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::X</tt></td><td class="topAlign"><tt>0x0001</tt></td><td class="topAlign">This flag is set if the tap was along the X axis.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::Y</tt></td><td class="topAlign"><tt>0x0002</tt></td><td class="topAlign">This flag is set if the tap was along the Y axis.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::Z</tt></td><td class="topAlign"><tt>0x0004</tt></td><td class="topAlign">This flag is set if the tap was along the Z axis.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::X_Pos</tt></td><td class="topAlign"><tt>0x0011</tt></td><td class="topAlign">This flag is set if the tap was towards the positive X direction.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::Y_Pos</tt></td><td class="topAlign"><tt>0x0022</tt></td><td class="topAlign">This flag is set if the tap was towards the positive Y direction.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::Z_Pos</tt></td><td class="topAlign"><tt>0x0044</tt></td><td class="topAlign">This flag is set if the tap was towards the positive Z direction.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::X_Neg</tt></td><td class="topAlign"><tt>0x0101</tt></td><td class="topAlign">This flag is set if the tap was towards the negative X direction.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::Y_Neg</tt></td><td class="topAlign"><tt>0x0202</tt></td><td class="topAlign">This flag is set if the tap was towards the negative Y direction.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::Z_Neg</tt></td><td class="topAlign"><tt>0x0404</tt></td><td class="topAlign">This flag is set if the tap was towards the negative Z direction.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::X_Both</tt></td><td class="topAlign"><tt>0x0111</tt></td><td class="topAlign">Equivalent to <tt>X_Pos|X_Neg</tt>. Returned by devices that cannot detect the direction of a tap.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::Y_Both</tt></td><td class="topAlign"><tt>0x0222</tt></td><td class="topAlign">Equivalent to <tt>Y_Pos|Y_Neg</tt>. Returned by devices that cannot detect the direction of a tap.</td></tr>
<tr><td class="topAlign"><tt>QTapReading::Z_Both</tt></td><td class="topAlign"><tt>0x0444</tt></td><td class="topAlign">Equivalent to <tt>Z_Pos|Z_Neg</tt>. Returned by devices that cannot detect the direction of a tap.</td></tr>
</table>
<!-- @@@TapDirection -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$doubleTap-prop$$$isDoubleTap -->
<h3 class="fn"><a name="doubleTap-prop"></a><span class="name">doubleTap</span> : const <span class="type">bool</span></h3>
<p>This property holds a value indicating if there was a single or double tap.</p>
<ul>
<li>true - double tap</li>
<li>false - single tap</li>
</ul>
<p>This property was introduced in Qt Mobility 1.0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isDoubleTap</b></span> () const</td></tr>
</table>
<p><b>See also </b><a href="qtapreading.html#qtapreading-units">QTapReading Units</a>.</p>
<!-- @@@doubleTap -->
<!-- $$$tapDirection-prop$$$tapDirection -->
<h3 class="fn"><a name="tapDirection-prop"></a><span class="name">tapDirection</span> : const <span class="type"><a href="qtapreading.html#TapDirection-enum">TapDirection</a></span></h3>
<p>This property holds the direction of the tap.</p>
<p>This property was introduced in Qt Mobility 1.0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> TapDirection </td><td class="memItemRight bottomAlign"><span class="name"><b>tapDirection</b></span> () const</td></tr>
</table>
<p><b>See also </b><a href="qtapreading.html#qtapreading-units">QTapReading Units</a>.</p>
<!-- @@@tapDirection -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$setDoubleTap[overload1]$$$setDoubleTapbool -->
<h3 class="fn"><a name="setDoubleTap"></a><span class="type">void</span> QTapReading::<span class="name">setDoubleTap</span> ( <span class="type">bool</span> <i>doubleTap</i> )</h3>
<p>Sets the double tap status of the reading to <i>doubleTap</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qtapreading.html#doubleTap-prop">isDoubleTap</a>().</p>
<!-- @@@setDoubleTap -->
<!-- $$$setTapDirection[overload1]$$$setTapDirectionTapDirection -->
<h3 class="fn"><a name="setTapDirection"></a><span class="type">void</span> QTapReading::<span class="name">setTapDirection</span> ( <span class="type"><a href="qtapreading.html#TapDirection-enum">TapDirection</a></span> <i>tapDirection</i> )</h3>
<p>Sets the tap direction to <i>tapDirection</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qtapreading.html#tapDirection-prop">tapDirection</a>().</p>
<!-- @@@setTapDirection -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
  <p>
     <acronym title="Copyright">&copy;</acronym> 2008-2011 Nokia Corporation and/or its
     subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
     in Finland and/or other countries worldwide.</p>
  <p>
     All other trademarks are property of their respective owners. <a title="Privacy Policy"
     href="http://qt.nokia.com/about/privacy-policy">Privacy Policy</a></p>
  <br />
  <p>
    Licensees holding valid Qt Commercial licenses may use this document in accordance with the    Qt Commercial License Agreement provided with the Software or, alternatively, in accordance    with the terms contained in a written agreement between you and Nokia.</p>
  <p>
    Alternatively, this document may be used under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU
    Free Documentation License version 1.3</a>
    as published by the Free Software Foundation.</p>
</div>
</body>
</html>