Sophie

Sophie

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

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" />
<!-- qfeedbackactuator.cpp -->
  <title>Qt Mobility 1.2: QFeedbackActuator 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="qtfeedback.html">QtFeedback</a></li>
<li>QFeedbackActuator</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="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QFeedbackActuator Class Reference</h1>
<!-- $$$QFeedbackActuator-brief -->
<p>The QFeedbackActuator class describes actuators for tactile feedback. <a href="#details">More...</a></p>
<!-- @@@QFeedbackActuator -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QFeedbackActuator&gt;</span></pre><p><b>Inherits: </b><a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a>.</p>
<p>This class was introduced in Qt Mobility 1.1.</p>
<ul>
<li><a href="qfeedbackactuator-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="qfeedbackactuator.html#Capability-enum">Capability</a></b> { Envelope, Period }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#State-enum">State</a></b> { Busy, Ready, Unknown }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qfeedbackactuator.html#enabled-prop">enabled</a></b> : bool</li>
<li class="fn"><b><a href="qfeedbackactuator.html#id-prop">id</a></b> : const int</li>
<li class="fn"><b><a href="qfeedbackactuator.html#name-prop">name</a></b> : const QString</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qfeedbackactuator.html#state-prop">state</a></b> : const QFeedbackActuator::State</li>
<li class="fn"><b><a href="qfeedbackactuator.html#valid-prop">valid</a></b> : const bool</li>
</ul>
</td></tr>
</table>
<ul>
<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"> </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#QFeedbackActuator">QFeedbackActuator</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#id-prop">id</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#isCapabilitySupported">isCapabilitySupported</a></b> ( Capability <i>capability</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#enabled-prop">isEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#valid-prop">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#name-prop">name</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#enabled-prop">setEnabled</a></b> ( bool <i>enabled</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> State </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#state-prop">state</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#operator-eq-eq">operator==</a></b> ( const QFeedbackActuator &amp; <i>other</i> ) const</td></tr>
</table>
<ul>
<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>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#enabledChanged">enabledChanged</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#signals">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QFeedbackActuator *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qfeedbackactuator.html#actuators">actuators</a></b> ()</td></tr>
</table>
<ul>
<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>
</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 public variable inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-variables">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>
<!-- $$$QFeedbackActuator-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QFeedbackActuator class describes actuators for tactile feedback.</p>
<p>An actuator knows how to play a <a href="qfeedbackeffect.html">tactile effect</a>. The class gives access to a specified actuator.</p>
<p>An actuator can be used to play <a href="qfeedbackhapticseffect.html">QFeedbackHapticsEffect</a>s using <a href="qfeedbackhapticseffect.html#actuator-prop">setActuator()</a>. Usually, you will not have to set an actuator directly on a <a href="qfeedbackhapticseffect.html">QFeedbackHapticsEffect</a>. <a href="qfeedbackhapticseffect.html">QFeedbackHapticsEffect</a> and <a href="qfeedbackfileeffect.html">QFeedbackFileEffect</a> uses an appropriate actuator by default. However, you can query which actuators are available with <a href="qfeedbackactuator.html#actuators">actuators</a>().</p>
<pre class="cpp"> <span class="type">QFeedbackActuator</span> actuator; <span class="comment">// default system actuator</span>
 <span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span><span class="operator">&lt;</span><span class="type">QFeedbackActuator</span><span class="operator">&gt;</span> actuators <span class="operator">=</span> <span class="type">QFeedbackActuator</span><span class="operator">::</span><a href="qfeedbackactuator.html#actuators">actuators</a>();
 <a href="http://qt.nokia.com/doc/4.7/qtglobal.html#foreach">foreach</a> (<span class="keyword">const</span> <span class="type">QFeedbackActuator</span><span class="operator">&amp;</span> temp<span class="operator">,</span> actuators) {
     <span class="keyword">if</span> (temp<span class="operator">.</span>name() <span class="operator">=</span><span class="operator">=</span> <span class="string">&quot;ExampleActuatorName&quot;</span>) {
         actuator <span class="operator">=</span> temp;
     }
 }</pre>
<p>The QFeedbackActuator class gives access to information about the actuator it represents. You can query if the actuator <a href="qfeedbackactuator.html#enabled-prop">is enabled</a> and if it <a href="qfeedbackactuator.html#valid-prop">is valid </a>. Whether an actuator is ready to play an effect can be queried by checking the actuator's <a href="qfeedbackactuator.html#state-prop">state</a>(). The <a href="qfeedbackactuator.html#State-enum">State</a> enum describes the states and actuator can have. You can also get a human readable name for the actuator with the <a href="qfeedbackactuator.html#name-prop">name</a>() function.</p>
</div>
<p><b>See also </b><a href="qfeedbackhapticseffect.html">QFeedbackHapticsEffect</a>, <a href="qfeedbackfileeffect.html">QFeedbackFileEffect</a>, and <a href="qfeedbackeffect.html">QFeedbackEffect</a>.</p>
<!-- @@@QFeedbackActuator -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Capability$$$Envelope$$$Period -->
<h3 class="fn"><a name="Capability-enum"></a>enum QFeedbackActuator::<span class="name">Capability</span></h3>
<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>QFeedbackActuator::Envelope</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Capability defining the wave type with attack/fade times and levels.</td></tr>
<tr><td class="topAlign"><tt>QFeedbackActuator::Period</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Capability defining that the device can play periodic effects.</td></tr>
</table>
<!-- @@@Capability -->
<!-- $$$State$$$Busy$$$Ready$$$Unknown -->
<h3 class="fn"><a name="State-enum"></a>enum QFeedbackActuator::<span class="name">State</span></h3>
<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>QFeedbackActuator::Busy</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The actuator is busy.</td></tr>
<tr><td class="topAlign"><tt>QFeedbackActuator::Ready</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The actuator is ready to play an effect.</td></tr>
<tr><td class="topAlign"><tt>QFeedbackActuator::Unknown</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The actuator is in an unknown state.</td></tr>
</table>
<!-- @@@State -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$enabled-prop$$$isEnabled$$$setEnabledbool$$$enabledChanged -->
<h3 class="fn"><a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></h3>
<p>This property holds whether the feedback actuator is enabled.</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>isEnabled</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setEnabled</b></span> ( bool <i>enabled</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qfeedbackactuator.html#enabledChanged">enabledChanged</a></b></span> ()</td></tr>
</table>
<!-- @@@enabled -->
<!-- $$$id-prop$$$id -->
<h3 class="fn"><a name="id-prop"></a><span class="name">id</span> : const <span class="type">int</span></h3>
<p>This property holds id of the feedback actuator.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>id</b></span> () const</td></tr>
</table>
<!-- @@@id -->
<!-- $$$name-prop$$$name -->
<h3 class="fn"><a name="name-prop"></a><span class="name">name</span> : const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span></h3>
<p>This property holds name of the feedback actuator.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>name</b></span> () const</td></tr>
</table>
<!-- @@@name -->
<!-- $$$state-prop$$$state -->
<h3 class="fn"><a name="state-prop"></a><span class="name">state</span> : const <span class="type"><a href="qfeedbackactuator.html#State-enum">QFeedbackActuator::State</a></span></h3>
<p>This property holds state of the feedback actuator.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> State </td><td class="memItemRight bottomAlign"><span class="name"><b>state</b></span> () const</td></tr>
</table>
<!-- @@@state -->
<!-- $$$valid-prop$$$isValid -->
<h3 class="fn"><a name="valid-prop"></a><span class="name">valid</span> : const <span class="type">bool</span></h3>
<p>This property holds validity of the feedback actuator.</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>isValid</b></span> () const</td></tr>
</table>
<!-- @@@valid -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QFeedbackActuator[overload1]$$$QFeedbackActuatorQObject* -->
<h3 class="fn"><a name="QFeedbackActuator"></a>QFeedbackActuator::<span class="name">QFeedbackActuator</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qfeedbackactuator.html">QFeedbackActuator</a>, passing <i>parent</i> to the <a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a> constructor.</p>
<p>The object will represent the default actuator on the system. If there are no actuators attached to the system, <a href="qfeedbackactuator.html#valid-prop">isValid</a>() will return false.</p>
<p><b>See also </b><a href="qfeedbackactuator.html#valid-prop">isValid</a>().</p>
<!-- @@@QFeedbackActuator -->
<!-- $$$actuators[overload1]$$$actuators -->
<h3 class="fn"><a name="actuators"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span>&lt;<span class="type">QFeedbackActuator</span> *&gt; QFeedbackActuator::<span class="name">actuators</span> ()<tt> [static]</tt></h3>
<p>Returns the list of actuators available on the system.</p>
<!-- @@@actuators -->
<!-- $$$enabledChanged[overload1]$$$enabledChanged -->
<h3 class="fn"><a name="enabledChanged"></a><span class="type">void</span> QFeedbackActuator::<span class="name">enabledChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the actuator is requested to enable or disable itself.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<p><b>See also </b><a href="qfeedbackactuator.html#enabled-prop">isEnabled</a>().</p>
<!-- @@@enabledChanged -->
<!-- $$$isCapabilitySupported[overload1]$$$isCapabilitySupportedCapability -->
<h3 class="fn"><a name="isCapabilitySupported"></a><span class="type">bool</span> QFeedbackActuator::<span class="name">isCapabilitySupported</span> ( <span class="type"><a href="qfeedbackactuator.html#Capability-enum">Capability</a></span> <i>capability</i> ) const</h3>
<p>Returns if the actuator supports the supplied <i>capability</i>.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@isCapabilitySupported -->
<!-- $$$operator==[overload1]$$$operator==constQFeedbackActuator& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QFeedbackActuator::<span class="name">operator==</span> ( const <span class="type">QFeedbackActuator</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this actuator is equal to <i>other</i>.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@operator== -->
</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>