Sophie

Sophie

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

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" />
<!-- qsensor.cpp -->
  <title>Qt Mobility 1.2: QSensorFilter 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>QSensorFilter</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-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QSensorFilter Class Reference</h1>
<!-- $$$QSensorFilter-brief -->
<p>The QSensorFilter class provides an efficient callback facility for asynchronous notifications of sensor changes. <a href="#details">More...</a></p>
<!-- @@@QSensorFilter -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QSensorFilter&gt;</span></pre><p><b>Inherited by: </b><a href="qaccelerometerfilter.html">QAccelerometerFilter</a>, <a href="qambientlightfilter.html">QAmbientLightFilter</a>, <a href="qcompassfilter.html">QCompassFilter</a>, <a href="qgyroscopefilter.html">QGyroscopeFilter</a>, <a href="qlightfilter.html">QLightFilter</a>, <a href="qmagnetometerfilter.html">QMagnetometerFilter</a>, <a href="qorientationfilter.html">QOrientationFilter</a>, <a href="qproximityfilter.html">QProximityFilter</a>, <a href="qrotationfilter.html">QRotationFilter</a>, and <a href="qtapfilter.html">QTapFilter</a>.</p>
<p>This class was introduced in Qt Mobility 1.0.</p>
<ul>
<li><a href="qsensorfilter-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qsensorfilter.html#filter">filter</a></b> ( QSensorReading * <i>reading</i> ) = 0</td></tr>
</table>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsensorfilter.html#dtor.QSensorFilter">~QSensorFilter</a></b> ()</td></tr>
</table>
<a name="details"></a>
<!-- $$$QSensorFilter-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QSensorFilter class provides an efficient callback facility for asynchronous notifications of sensor changes.</p>
<p>Some sensors (eg. the accelerometer) are often accessed very frequently. This may be slowed down by the use of signals and slots. The QSensorFilter interface provides a more efficient way for the sensor to notify your class that the sensor has changed.</p>
<p>Additionally, multiple filters can be added to a sensor. They are called in order and each filter has the option to modify the values in the reading or to suppress the reading altogether.</p>
<p>Note that the values in the class returned by <a href="qsensor.html#reading-prop">QSensor::reading</a>() will not be updated until after the filters have been run.</p>
</div>
<p><b>See also </b><a href="qsensorfilter.html#filter">filter</a>().</p>
<!-- @@@QSensorFilter -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$~QSensorFilter[overload1]$$$~QSensorFilter -->
<h3 class="fn"><a name="dtor.QSensorFilter"></a>QSensorFilter::<span class="name">~QSensorFilter</span> ()<tt> [protected]</tt></h3>
<p>Notifies the attached sensor (if any) that the filter is being destroyed.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@~QSensorFilter -->
<!-- $$$filter[overload1]$$$filterQSensorReading* -->
<h3 class="fn"><a name="filter"></a><span class="type">bool</span> QSensorFilter::<span class="name">filter</span> ( <span class="type"><a href="qsensorreading.html">QSensorReading</a></span> * <i>reading</i> )<tt> [pure virtual]</tt></h3>
<p>This function is called when the sensor <i>reading</i> changes.</p>
<p>The filter can modify the reading.</p>
<p>Returns true to allow the next filter to receive the value. If this is the last filter, returning true causes the signal to be emitted and the value is stored in the sensor.</p>
<p>Returns false to drop the reading.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@filter -->
</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>