Sophie

Sophie

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

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" />
<!-- qorientationsensor.cpp -->
  <title>Qt Mobility 1.2: QOrientationReading 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>QOrientationReading</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="#qorientationreading-units">QOrientationReading Units</a></li>
</ul>
</div>
<h1 class="title">QOrientationReading Class Reference</h1>
<!-- $$$QOrientationReading-brief -->
<p>The QOrientationReading class represents one reading from the orientation sensor. <a href="#details">More...</a></p>
<!-- @@@QOrientationReading -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QOrientationReading&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="qorientationreading-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="qorientationreading.html#Orientation-enum">Orientation</a></b> { Undefined, TopUp, TopDown, LeftUp, ..., FaceDown }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qorientationreading.html#orientation-prop">orientation</a></b> : const Orientation</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"> Orientation </td><td class="memItemRight bottomAlign"><b><a href="qorientationreading.html#orientation-prop">orientation</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qorientationreading.html#setOrientation">setOrientation</a></b> ( Orientation <i>orientation</i> )</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>
<!-- $$$QOrientationReading-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QOrientationReading class represents one reading from the orientation sensor.</p>
<p>The orientation sensor reports the orientation of the device. As it operates below the UI level it does not report on or even know how the UI is rotated. Most importantly this means that this sensor cannot be used to detect if a device is in portrait or landscape mode.</p>
<p>This sensor is useful to detect that a particular side of the device is pointing up.</p>
<a name="qorientationreading-units"></a>
<h4>QOrientationReading Units</h4>
<p>The orientation sensor returns the orientation of the device using the pre-defined values found in the <a href="qorientationreading.html#Orientation-enum">QOrientationReading::Orientation</a> enum.</p>
</div>
<!-- @@@QOrientationReading -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Orientation$$$Undefined$$$TopUp$$$TopDown$$$LeftUp$$$RightUp$$$FaceUp$$$FaceDown -->
<h3 class="fn"><a name="Orientation-enum"></a>enum QOrientationReading::<span class="name">Orientation</span></h3>
<p>This enum represents the orientation of the device.</p>
<p>To explain the meaning of each value it is helpful to refer to the following diagram.</p>
<p class="centerAlign"><img src="images/sensors-sides.jpg" alt="" /></p><p>The orientations are shown here in order: TopUp, TopDown, LeftUp, RightUp, FaceUp, FaceDown.</p>
<p class="centerAlign"><img src="images/sensors-orientation.jpg" alt="" /></p><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>QOrientationReading::Undefined</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The orientation is unknown.</td></tr>
<tr><td class="topAlign"><tt>QOrientationReading::TopUp</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The Top edge of the device is pointing up.</td></tr>
<tr><td class="topAlign"><tt>QOrientationReading::TopDown</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The Top edge of the device is pointing down.</td></tr>
<tr><td class="topAlign"><tt>QOrientationReading::LeftUp</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The Left edge of the device is pointing up.</td></tr>
<tr><td class="topAlign"><tt>QOrientationReading::RightUp</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The Right edge of the device is pointing up.</td></tr>
<tr><td class="topAlign"><tt>QOrientationReading::FaceUp</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">The Face of the device is pointing up.</td></tr>
<tr><td class="topAlign"><tt>QOrientationReading::FaceDown</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">The Face of the device is pointing down.</td></tr>
</table>
<p>It should be noted that the orientation sensor reports the orientation of the device and not the UI. The orientation of the device will not change just because the UI is rotated. This means this sensor cannot be used to detect if a device is in portrait or landscape mode.</p>
<!-- @@@Orientation -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$orientation-prop$$$orientation -->
<h3 class="fn"><a name="orientation-prop"></a><span class="name">orientation</span> : const <span class="type"><a href="qorientationreading.html#Orientation-enum">Orientation</a></span></h3>
<p>This property holds the orientation of the device.</p>
<p>The unit is an enumeration describing the orientation of the device.</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"> Orientation </td><td class="memItemRight bottomAlign"><span class="name"><b>orientation</b></span> () const</td></tr>
</table>
<p><b>See also </b><a href="qorientationreading.html#qorientationreading-units">QOrientationReading Units</a>.</p>
<!-- @@@orientation -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$setOrientation[overload1]$$$setOrientationOrientation -->
<h3 class="fn"><a name="setOrientation"></a><span class="type">void</span> QOrientationReading::<span class="name">setOrientation</span> ( <span class="type"><a href="qorientationreading.html#Orientation-enum">Orientation</a></span> <i>orientation</i> )</h3>
<p>Sets the <i>orientation</i> for the reading.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qorientationreading.html#orientation-prop">orientation</a>().</p>
<!-- @@@setOrientation -->
</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>