1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
<?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" />
<!-- qwindowsystem_qws.cpp -->
<title>Qt 4.8: KeyboardFilter 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>Qt 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="qtgui.html">QtGui</a></li>
<li>KeyboardFilter</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="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">KeyboardFilter Class Reference</h1>
<span class="small-subtitle">(QWSServer::KeyboardFilter)<br/></span>
<!-- $$$KeyboardFilter-brief -->
<p>The KeyboardFilter class is a base class for global keyboard event filters in Qt for Embedded Linux. <a href="#details">More...</a></p>
<!-- @@@KeyboardFilter -->
<pre class="cpp"> <span class="preprocessor">#include <<a href="qwsserver.html">QWSServer</a>></span></pre><ul>
<li><a href="qwsserver-keyboardfilter-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 </td><td class="memItemRight bottomAlign"><b><a href="qwsserver-keyboardfilter.html#dtor.KeyboardFilter">~KeyboardFilter</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwsserver-keyboardfilter.html#filter">filter</a></b> ( int <i>unicode</i>, int <i>keycode</i>, int <i>modifiers</i>, bool <i>isPress</i>, bool <i>autoRepeat</i> ) = 0</td></tr>
</table>
<a name="details"></a>
<!-- $$$KeyboardFilter-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The KeyboardFilter class is a base class for global keyboard event filters in Qt for Embedded Linux.</p>
<p>Note that this class is only available in <a href="qt-embedded-linux.html">Qt for Embedded Linux</a>.</p>
<p>In <a href="qt-embedded-linux.html">Qt for Embedded Linux</a>, all system generated events, including keyboard events, are passed to the server application which then propagates the event to the appropriate client. The KeyboardFilter class is used to implement a global, low-level filter on the server side. The server applies the filter to all keyboard events before passing them on to the clients:</p>
<p class="centerAlign"><img src="images/qwsserver_keyboardfilter.png" alt="" /></p><p>This feature can, for example, be used to filter things like APM (advanced power management) suspended from a button without having to filter for it in all applications.</p>
<p>To add a new keyboard filter you must first create the filter by deriving from this class, reimplementing the pure virtual <a href="qwsserver-keyboardfilter.html#filter">filter</a>() function. Then you can install the filter on the server using <a href="qwsserver.html">QWSServer</a>'s <a href="qwsserver.html#addKeyboardFilter">addKeyboardFilter()</a> function. <a href="qwsserver.html">QWSServer</a> also provides a <a href="qwsserver.html#removeKeyboardFilter">removeKeyboardFilter()</a> function.</p>
</div>
<p><b>See also </b><a href="qt-embedded-architecture.html">Qt for Embedded Linux Architecture</a>, <a href="qwsserver.html">QWSServer</a>, and <a href="qwsinputmethod.html">QWSInputMethod</a>.</p>
<!-- @@@KeyboardFilter -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$~KeyboardFilter[overload1]$$$~KeyboardFilter -->
<h3 class="fn"><a name="dtor.KeyboardFilter"></a>KeyboardFilter::<span class="name">~KeyboardFilter</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the keyboard filter.</p>
<!-- @@@~KeyboardFilter -->
<!-- $$$filter[overload1]$$$filterintintintboolbool -->
<h3 class="fn"><a name="filter"></a><span class="type">bool</span> KeyboardFilter::<span class="name">filter</span> ( <span class="type">int</span> <i>unicode</i>, <span class="type">int</span> <i>keycode</i>, <span class="type">int</span> <i>modifiers</i>, <span class="type">bool</span> <i>isPress</i>, <span class="type">bool</span> <i>autoRepeat</i> )<tt> [pure virtual]</tt></h3>
<p>Implement this function to return true if a given key event should be stopped from being processed any further; otherwise it should return false.</p>
<p>A key event can be identified by the given <i>unicode</i> value and the <i>keycode</i>, <i>modifiers</i>, <i>isPress</i> and <i>autoRepeat</i> parameters.</p>
<p>The <i>keycode</i> parameter is the Qt keycode value as defined by the <a href="qt.html#Key-enum">Qt::Key</a> enum. The <i>modifiers</i> is an OR combination of <a href="qt.html#KeyboardModifier-enum">Qt::KeyboardModifier</a> values, indicating whether <b>Shift/Alt/Ctrl</b> keys are pressed. The <i>isPress</i> parameter is true if the event is a key press event and <i>autoRepeat</i> is true if the event is caused by an auto-repeat mechanism and not an actual key press.</p>
<!-- @@@filter -->
</div>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
The documentation provided herein is licensed 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>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
Nokia, Qt and their respective logos are trademarks of Nokia Corporation
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|