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"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { 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 Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main 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 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
|
---|
35 | for Qt/Embedded.
|
---|
36 | <a href="#details">More...</a>
|
---|
37 | <p><tt>#include <<a href="qwindowsystem_qws-h.html">qwindowsystem_qws.h</a>></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 unicode, int keycode, int modifiers, bool isPress, bool 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 x, int y )</li>
|
---|
46 | <li class=fn>virtual void <a href="#setFont"><b>setFont</b></a> ( const QFont & )</li>
|
---|
47 | </ul>
|
---|
48 | <h2>Protected Members</h2>
|
---|
49 | <ul>
|
---|
50 | <li class=fn>void <a href="#sendIMEvent"><b>sendIMEvent</b></a> ( QWSServer::IMState state, const QString & txt, int cpos, int selLen = 0 )</li>
|
---|
51 | </ul>
|
---|
52 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
53 |
|
---|
54 |
|
---|
55 | The QWSInputMethod class provides international input methods
|
---|
56 | for 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
|
---|
60 | graphical interface. The keyboard filter intercepts key events
|
---|
61 | from physical or virtual keyboards by implementing the <a href="#filter">filter</a>()
|
---|
62 | function.
|
---|
63 | <p> Use <a href="#sendIMEvent">sendIMEvent</a>() to send composition events. Composition starts
|
---|
64 | with the input method sending an <tt>IMStart</tt> event, followed by a
|
---|
65 | number of <tt>IMCompose</tt> events and ending with an <tt>IMEnd</tt> event or
|
---|
66 | when 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
|
---|
68 | to 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>
|
---|
75 | Constructs a new input method
|
---|
76 |
|
---|
77 | <h3 class=fn><a name="~QWSInputMethod"></a>QWSInputMethod::~QWSInputMethod ()<tt> [virtual]</tt>
|
---|
78 | </h3>
|
---|
79 | Destructs the input method uninstalling it if it is currently installed.
|
---|
80 |
|
---|
81 | <h3 class=fn>bool <a name="filter"></a>QWSInputMethod::filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat )<tt> [pure virtual]</tt>
|
---|
82 | </h3>
|
---|
83 |
|
---|
84 | <p> This function must be implemented in subclasses to handle key
|
---|
85 | input from physical or virtual keyboards. Returning TRUE will
|
---|
86 | block 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>.
|
---|
88 | If <em>isPress</em> is TRUE this is a key press; otherwise it is a key
|
---|
89 | release. If <em>autoRepeat</em> is TRUE this is an auto-repeated key
|
---|
90 | press.
|
---|
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>
|
---|
96 | Implemented in subclasses to reset the state of the input method.
|
---|
97 |
|
---|
98 | <h3 class=fn>void <a name="sendIMEvent"></a>QWSInputMethod::sendIMEvent ( QWSServer::IMState state, const <a href="qstring.html">QString</a> & txt, int cpos, int 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
|
---|
102 | one 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
|
---|
104 | is <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
|
---|
106 | the composition string (starting at <em>cpos</em>) that should be
|
---|
107 | marked as selected by the input widget receiving the event.
|
---|
108 |
|
---|
109 | <h3 class=fn>void <a name="setFont"></a>QWSInputMethod::setFont ( const <a href="qfont.html">QFont</a> & )<tt> [virtual]</tt>
|
---|
110 | </h3>
|
---|
111 | Implemented in subclasses to handle font changes in the focus
|
---|
112 | widget.
|
---|
113 | <p> This functionality is provided for future expansion; it is not
|
---|
114 | used in this version of Qt/Embedded.
|
---|
115 |
|
---|
116 | <h3 class=fn>void <a name="setMicroFocus"></a>QWSInputMethod::setMicroFocus ( int x, int y )<tt> [virtual]</tt>
|
---|
117 | </h3>
|
---|
118 |
|
---|
119 | <p> Implemented in subclasses to handle microFocusHint changes in the
|
---|
120 | focus widget. <em>x</em> and <em>y</em> are the global coordinates of the
|
---|
121 | text cursor.
|
---|
122 | <p>
|
---|
123 | <!-- eof -->
|
---|
124 | <hr><p>
|
---|
125 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
126 | Copyright © 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 © 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>
|
---|