source: trunk/doc/html/qwsinputmethod.html@ 190

Last change on this file since 190 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 6.7 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qwindowsystem_qws.cpp:3127 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QWSInputMethod Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QWSInputMethod Class Reference</h1>
33
34<p>The QWSInputMethod class provides international input methods
35for Qt/Embedded.
36<a href="#details">More...</a>
37<p><tt>#include &lt;<a href="qwindowsystem_qws-h.html">qwindowsystem_qws.h</a>&gt;</tt>
38<p><a href="qwsinputmethod-members.html">List of all member functions.</a>
39<h2>Public Members</h2>
40<ul>
41<li class=fn><a href="#QWSInputMethod"><b>QWSInputMethod</b></a> ()</li>
42<li class=fn>virtual <a href="#~QWSInputMethod"><b>~QWSInputMethod</b></a> ()</li>
43<li class=fn>virtual bool <a href="#filter"><b>filter</b></a> ( int&nbsp;unicode, int&nbsp;keycode, int&nbsp;modifiers, bool&nbsp;isPress, bool&nbsp;autoRepeat ) = 0</li>
44<li class=fn>virtual void <a href="#reset"><b>reset</b></a> ()</li>
45<li class=fn>virtual void <a href="#setMicroFocus"><b>setMicroFocus</b></a> ( int&nbsp;x, int&nbsp;y )</li>
46<li class=fn>virtual void <a href="#setFont"><b>setFont</b></a> ( const QFont &amp; )</li>
47</ul>
48<h2>Protected Members</h2>
49<ul>
50<li class=fn>void <a href="#sendIMEvent"><b>sendIMEvent</b></a> ( QWSServer::IMState&nbsp;state, const&nbsp;QString&nbsp;&amp;&nbsp;txt, int&nbsp;cpos, int&nbsp;selLen = 0 )</li>
51</ul>
52<hr><a name="details"></a><h2>Detailed Description</h2>
53
54
55The QWSInputMethod class provides international input methods
56for Qt/Embedded.
57<p>
58<p> Subclass this class to implement your own input method.
59<p> An input methods consists of a keyboard filter and optionally a
60graphical interface. The keyboard filter intercepts key events
61from physical or virtual keyboards by implementing the <a href="#filter">filter</a>()
62function.
63<p> Use <a href="#sendIMEvent">sendIMEvent</a>() to send composition events. Composition starts
64with the input method sending an <tt>IMStart</tt> event, followed by a
65number of <tt>IMCompose</tt> events and ending with an <tt>IMEnd</tt> event or
66when the virtual <a href="#reset">reset</a>() function is called.
67<p> The functions <a href="#setMicroFocus">setMicroFocus</a>() and <a href="#setFont">setFont</a>() can be reimplemented
68to receive more information about the state of the focus widget.
69<p> Use QWSServer::setCurrentInputMethod() to install an input method.
70<p> <p>See also <a href="qws.html">Qt/Embedded</a>.
71
72<hr><h2>Member Function Documentation</h2>
73<h3 class=fn><a name="QWSInputMethod"></a>QWSInputMethod::QWSInputMethod ()
74</h3>
75Constructs a new input method
76
77<h3 class=fn><a name="~QWSInputMethod"></a>QWSInputMethod::~QWSInputMethod ()<tt> [virtual]</tt>
78</h3>
79Destructs the input method uninstalling it if it is currently installed.
80
81<h3 class=fn>bool <a name="filter"></a>QWSInputMethod::filter ( int&nbsp;unicode, int&nbsp;keycode, int&nbsp;modifiers, bool&nbsp;isPress, bool&nbsp;autoRepeat )<tt> [pure virtual]</tt>
82</h3>
83
84<p> This function must be implemented in subclasses to handle key
85input from physical or virtual keyboards. Returning TRUE will
86block the event from further processing.
87<p> The Unicode value is given in <em>unicode</em> and the key code in <em>keycode</em>. Keyboard modifiers are OR-ed together in <em>modifiers</em>.
88If <em>isPress</em> is TRUE this is a key press; otherwise it is a key
89release. If <em>autoRepeat</em> is TRUE this is an auto-repeated key
90press.
91<p> All normal key events should be blocked while in compose mode
92(i.e., between <tt>IMStart</tt> and <tt>IMEnd</tt>).
93<p>
94<h3 class=fn>void <a name="reset"></a>QWSInputMethod::reset ()<tt> [virtual]</tt>
95</h3>
96Implemented in subclasses to reset the state of the input method.
97
98<h3 class=fn>void <a name="sendIMEvent"></a>QWSInputMethod::sendIMEvent ( QWSServer::IMState&nbsp;state, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;txt, int&nbsp;cpos, int&nbsp;selLen = 0 )<tt> [protected]</tt>
99</h3>
100
101<p> Causes a <a href="qimevent.html">QIMEvent</a> to be sent to the focus widget. <em>state</em> may be
102one of <a href="qwsserver.html#IMState-enum">QWSServer::IMStart</a>, <a href="qwsserver.html#IMState-enum">QWSServer::IMCompose</a> or <a href="qwsserver.html#IMState-enum">QWSServer::IMEnd</a>.
103<p> <em>txt</em> is the text being composed (or the finished text if state
104is <tt>IMEnd</tt>). <em>cpos</em> is the current cursor position.
105<p> If state is <tt>IMCompose</tt>, <em>selLen</em> is the number of characters in
106the composition string (starting at <em>cpos</em>) that should be
107marked as selected by the input widget receiving the event.
108
109<h3 class=fn>void <a name="setFont"></a>QWSInputMethod::setFont ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp; )<tt> [virtual]</tt>
110</h3>
111Implemented in subclasses to handle font changes in the focus
112widget.
113<p> This functionality is provided for future expansion; it is not
114used in this version of Qt/Embedded.
115
116<h3 class=fn>void <a name="setMicroFocus"></a>QWSInputMethod::setMicroFocus ( int&nbsp;x, int&nbsp;y )<tt> [virtual]</tt>
117</h3>
118
119<p> Implemented in subclasses to handle microFocusHint changes in the
120focus widget. <em>x</em> and <em>y</em> are the global coordinates of the
121text cursor.
122<p>
123<!-- eof -->
124<hr><p>
125This file is part of the <a href="index.html">Qt toolkit</a>.
126Copyright &copy; 1995-2007
127<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
128<table width=100% cellspacing=0 border=0><tr>
129<td>Copyright &copy; 2007
130<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
131<td align=right><div align=right>Qt 3.3.8</div>
132</table></div></address></body>
133</html>
Note: See TracBrowser for help on using the repository browser.