1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/embedded/qkbd_qws.cpp -->
7
<title>Qt 4.0: QWSKeyboardHandler Class Reference</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QWSKeyboardHandler Class Reference</h1>
21
<p>The QWSKeyboardHandler class implements the keyboard driver for Qt/Embedded. <a href="#details">More...</a></p>
22
<pre>#include <QWSKeyboardHandler></pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
24
<li><a href="qwskeyboardhandler-members.html">List of all members, including inherited members</a></li>
26
<a name="public-functions"></a>
27
<h3>Public Functions</h3>
29
<li><div class="fn"/><b><a href="qwskeyboardhandler.html#QWSKeyboardHandler">QWSKeyboardHandler</a></b> ()</li>
30
<li><div class="fn"/>virtual <b><a href="qwskeyboardhandler.html#dtor.QWSKeyboardHandler">~QWSKeyboardHandler</a></b> ()</li>
31
<li><div class="fn"/>virtual void <b><a href="qwskeyboardhandler.html#processKeyEvent">processKeyEvent</a></b> ( int <i>unicode</i>, int <i>keycode</i>, Qt::KeyboardModifiers <i>modifiers</i>, bool <i>isPress</i>, bool <i>autoRepeat</i> )</li>
33
<a name="protected-functions"></a>
34
<h3>Protected Functions</h3>
36
<li><div class="fn"/>void <b><a href="qwskeyboardhandler.html#beginAutoRepeat">beginAutoRepeat</a></b> ( int <i>uni</i>, int <i>code</i>, Qt::KeyboardModifiers <i>mod</i> )</li>
37
<li><div class="fn"/>void <b><a href="qwskeyboardhandler.html#endAutoRepeat">endAutoRepeat</a></b> ()</li>
38
<li><div class="fn"/>int <b><a href="qwskeyboardhandler.html#transformDirKey">transformDirKey</a></b> ( int <i>key</i> )</li>
40
<a name="details"></a>
42
<h2>Detailed Description</h2>
43
<p>The QWSKeyboardHandler class implements the keyboard driver for Qt/Embedded.</p>
44
<p>The keyboard driver handles events from system devices and generates key events.</p>
45
<p>A QWSKeyboardHandler will usually open some system device in its constructor, create a <a href="qsocketnotifier.html">QSocketNotifier</a> on that opened device and when it receives data, it will call <a href="qwskeyboardhandler.html#processKeyEvent">processKeyEvent</a>() to send the event to Qt/Embedded for relaying to clients.</p>
47
<h2>Member Function Documentation</h2>
48
<h3 class="fn"><a name="QWSKeyboardHandler"></a>QWSKeyboardHandler::QWSKeyboardHandler ()</h3>
49
<p>Constructs a keyboard handler. The handler <i>may</i> be passed to the system for later destruction with <a href="qwsserver.html#setKeyboardHandler">QWSServer::setKeyboardHandler</a>(), although even without doing this, the handler can function, calling <a href="qwskeyboardhandler.html#processKeyEvent">processKeyEvent</a>() to emit events.</p>
50
<h3 class="fn"><a name="dtor.QWSKeyboardHandler"></a>QWSKeyboardHandler::~QWSKeyboardHandler () <tt> [virtual]</tt></h3>
51
<p>Destroys a keyboard handler. Note that if you have called <a href="qwsserver.html#setKeyboardHandler">QWSServer::setKeyboardHandler</a>(), you must not delete the handler.</p>
52
<h3 class="fn"><a name="beginAutoRepeat"></a>void QWSKeyboardHandler::beginAutoRepeat ( int <i>uni</i>, int <i>code</i>, <a href="qt.html#KeyboardModifier-enum">Qt::KeyboardModifiers</a> <i>mod</i> ) <tt> [protected]</tt></h3>
53
<p>Begin auto repeating the specified key press. After a short delay the key sequence will be sent periodically until <a href="qwskeyboardhandler.html#endAutoRepeat">endAutoRepeat</a>() is called.</p>
54
<p><i>uni</i> is the unicode value, <i>code</i> is the keycode and <i>mod</i> is the modifier state of the key sequence.</p>
55
<p>See also <a href="qwskeyboardhandler.html#endAutoRepeat">endAutoRepeat</a>().</p>
56
<h3 class="fn"><a name="endAutoRepeat"></a>void QWSKeyboardHandler::endAutoRepeat () <tt> [protected]</tt></h3>
57
<p>Stop auto-repeating a key press.</p>
58
<p>See also <a href="qwskeyboardhandler.html#beginAutoRepeat">beginAutoRepeat</a>().</p>
59
<h3 class="fn"><a name="processKeyEvent"></a>void QWSKeyboardHandler::processKeyEvent ( int <i>unicode</i>, int <i>keycode</i>, <a href="qt.html#KeyboardModifier-enum">Qt::KeyboardModifiers</a> <i>modifiers</i>, bool <i>isPress</i>, bool <i>autoRepeat</i> ) <tt> [virtual]</tt></h3>
60
<p>Subclasses call this function to send a key event. The server may additionally filter the event before sending it on to applications.</p>
61
<table align="center" cellpadding="2" cellspacing="1" border="0">
62
<tr valign="top" bgcolor="#a2c511"><th>Parameter</th><th>Meaning</th></tr>
63
<tr valign="top" bgcolor="#f0f0f0"><td><i>unicode</i></td><td>The Unicode value for the key, or 0xFFFF is none is appropriate.</td></tr>
64
<tr valign="top" bgcolor="#e0e0e0"><td><i>keycode</i></td><td>The Qt keycode for the key (see <a href="qt.html#Key-enum">Qt::Key</a> for the list of codes).</td></tr>
65
<tr valign="top" bgcolor="#f0f0f0"><td><i>modifiers</i></td><td>The set of modifier keys (see <a href="qt.html#Modifier-enum">Qt::Modifier</a>).</td></tr>
66
<tr valign="top" bgcolor="#e0e0e0"><td><i>isPress</i></td><td>Whether this is a press or a release.</td></tr>
67
<tr valign="top" bgcolor="#f0f0f0"><td><i>autoRepeat</i></td><td>Whether this event was generated by an auto-repeat mechanism, or an actual key press.</td></tr>
69
<h3 class="fn"><a name="transformDirKey"></a>int QWSKeyboardHandler::transformDirKey ( int <i>key</i> ) <tt> [protected]</tt></h3>
70
<p>Transforms an arrow key with keycode <i>key</i> (<tt>Qt::Key_Left</tt>, <tt>Qt::Key_Up</tt>, <tt>Qt::Key_Right</tt>, <tt>Qt::Key_Down</tt>) to the orientation of the display and returns the transformed keycode.</p>
71
<p /><address><hr /><div align="center">
72
<table width="100%" cellspacing="0" border="0"><tr class="address">
73
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
74
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
75
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
76
</tr></table></div></address></body>