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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
|
<?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: QWSInputMethod 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>QWSInputMethod</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="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#creating-custom-input-methods">Creating Custom Input Methods</a></li>
<li class="level2"><a href="#using-input-methods">Using Input Methods</a></li>
</ul>
</div>
<h1 class="title">QWSInputMethod Class Reference</h1>
<!-- $$$QWSInputMethod-brief -->
<p>The QWSInputMethod class provides international input methods in Qt for Embedded Linux. <a href="#details">More...</a></p>
<!-- @@@QWSInputMethod -->
<pre class="cpp"> <span class="preprocessor">#include <QWSInputMethod></span></pre><p><b>This class is under development and is subject to change.</b></p>
<p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="qwsinputmethod-members.html">List of all members, including inherited members</a></li>
<li><a href="qwsinputmethod-obsolete.html">Obsolete 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="qwsinputmethod.html#UpdateType-enum">UpdateType</a></b> { Update, FocusIn, FocusOut, Reset, Destroyed }</td></tr>
</table>
<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="qwsinputmethod.html#QWSInputMethod">QWSInputMethod</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#dtor.QWSInputMethod">~QWSInputMethod</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.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> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#filter-2">filter</a></b> ( const QPoint & <i>position</i>, int <i>state</i>, int <i>wheel</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#mouseHandler">mouseHandler</a></b> ( int <i>offset</i>, int <i>state</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#queryResponse">queryResponse</a></b> ( int <i>property</i>, const QVariant & <i>result</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#reset">reset</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#updateHandler">updateHandler</a></b> ( int <i>type</i> )</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> uint </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#inputResolutionShift">inputResolutionShift</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#sendCommitString">sendCommitString</a></b> ( const QString & <i>commitString</i>, int <i>replaceFromPosition</i> = 0, int <i>replaceLength</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#sendEvent">sendEvent</a></b> ( const QInputMethodEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#sendMouseEvent">sendMouseEvent</a></b> ( const QPoint & <i>position</i>, int <i>state</i>, int <i>wheel</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#sendPreeditString">sendPreeditString</a></b> ( const QString & <i>preeditString</i>, int <i>cursorPosition</i>, int <i>selectionLength</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#sendQuery">sendQuery</a></b> ( int <i>property</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> uint </td><td class="memItemRight bottomAlign"><b><a href="qwsinputmethod.html#setInputResolution">setInputResolution</a></b> ( bool <i>isHigh</i> )</td></tr>
</table>
<ul>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QWSInputMethod-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QWSInputMethod class provides international input methods 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>A <a href="qt-embedded-linux.html">Qt for Embedded Linux</a> application requires a server application to be running, or to be the server application itself. All system generated events, including keyboard and mouse events, are passed to the server application which then propagates the event to the appropriate client.</p>
<p>An input method consists of a filter and optionally a graphical interface, and is used to filter input events between the server and the client application.</p>
<a name="creating-custom-input-methods"></a>
<h3>Creating Custom Input Methods</h3>
<p>To implement a custom input method, derive from the QWSInputMethod class, and use the server's <a href="qwsserver.html#setCurrentInputMethod">setCurrentInputMethod()</a> function to install it.</p>
<p>When subclassing QWSInputMethod, you can reimplement the <a href="qwsinputmethod.html#filter">filter</a>() functions to handle input from both physical and virtual keyboards as well as mouse devices. Note that the default implementations do nothing. Use the <a href="qwsinputmethod.html#setInputResolution">setInputResolution</a>() function to control the number of bits shifted when filtering mouse input, i.e., when going from pointer resolution to screen resolution (the current resolution can be retrieved using the <a href="qwsinputmethod.html#inputResolutionShift">inputResolutionShift</a>() function).</p>
<p>Reimplement the <a href="qwsinputmethod.html#reset">reset</a>() function to restore the state of the input method. Note that the default implementation calls the <a href="qwsinputmethod.html#sendEvent">sendEvent</a>() function with empty preedit and commit strings if the input method is in compose mode (i.e., if the input method is actively composing a preedit string).</p>
<p>To receive replies to an input method query (sent using the <a href="qwsinputmethod.html#sendQuery">sendQuery</a>() function), you must reimplement the <a href="qwsinputmethod.html#queryResponse">queryResponse</a>() function, while the <a href="qwsinputmethod.html#mouseHandler">mouseHandler</a>() function must be reimplemented if you want to handle mouse events within the preedit text. Reimplement the <a href="qwsinputmethod.html#updateHandler">updateHandler</a>() function to handle update events including resets and focus changes. The <a href="qwsinputmethod.html#UpdateType-enum">UpdateType</a> enum describes the various types of update events recognized by the input method.</p>
<a name="using-input-methods"></a>
<h3>Using Input Methods</h3>
<p>In addition to the <a href="qwsinputmethod.html#filter">filter</a>(), <a href="qwsinputmethod.html#reset">reset</a>(), <a href="qwsinputmethod.html#queryResponse">queryResponse</a>(), <a href="qwsinputmethod.html#mouseHandler">mouseHandler</a>() and <a href="qwsinputmethod.html#updateHandler">updateHandler</a>() function mentioned in the previous section, the QWSInputMethod provides several other functions helping the window system to manage the installed input methods.</p>
<p>The <a href="qwsinputmethod.html#sendEvent">sendEvent</a>() function sends the given event to the focus widget, while the <a href="qwsinputmethod.html#sendPreeditString">sendPreeditString</a>() function sends the given preedit text (encapsulated by an event). QWSInputMethod also provides the <a href="qwsinputmethod.html#sendCommitString">sendCommitString</a>() convenience function which sends an event encapsulating the given commit string to the current focus widget, and the <a href="qwsinputmethod.html#sendMouseEvent">sendMouseEvent</a>() function which sends the given mouse event.</p>
<p>Finally, the QWSInputMethod class provides the <a href="qwsinputmethod.html#sendQuery">sendQuery</a>() function for sending input method queries. This function encapsulates the event with a <a href="qwsevent.html">QWSEvent</a> instance of the <a href="qwsevent.html#Type-enum">IMQuery</a> type.</p>
</div>
<p><b>See also </b><a href="qwsserver.html">QWSServer</a> and <a href="qt-embedded-architecture.html">Qt for Embedded Linux Architecture</a>.</p>
<!-- @@@QWSInputMethod -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$UpdateType$$$Update$$$FocusIn$$$FocusOut$$$Reset$$$Destroyed -->
<h3 class="fn"><a name="UpdateType-enum"></a>enum QWSInputMethod::<span class="name">UpdateType</span></h3>
<p>This enum describes the various types of update events recognized by the input method.</p>
<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>QWSInputMethod::Update</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The input widget is updated in some way; use <a href="qwsinputmethod.html#sendQuery">sendQuery</a>() with <a href="qt.html#InputMethodQuery-enum">Qt::ImMicroFocus</a> as an argument for more information.</td></tr>
<tr><td class="topAlign"><tt>QWSInputMethod::FocusIn</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">A new input widget receives focus.</td></tr>
<tr><td class="topAlign"><tt>QWSInputMethod::FocusOut</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The input widget loses focus.</td></tr>
<tr><td class="topAlign"><tt>QWSInputMethod::Reset</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The input method should be reset.</td></tr>
<tr><td class="topAlign"><tt>QWSInputMethod::Destroyed</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The input widget is destroyed.</td></tr>
</table>
<p><b>See also </b><a href="qwsinputmethod.html#updateHandler">updateHandler</a>().</p>
<!-- @@@UpdateType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QWSInputMethod[overload1]$$$QWSInputMethod -->
<h3 class="fn"><a name="QWSInputMethod"></a>QWSInputMethod::<span class="name">QWSInputMethod</span> ()</h3>
<p>Constructs a new input method.</p>
<p>Use the <a href="qwsserver.html#setCurrentInputMethod">QWSServer::setCurrentInputMethod</a>() function to install it.</p>
<!-- @@@QWSInputMethod -->
<!-- $$$~QWSInputMethod[overload1]$$$~QWSInputMethod -->
<h3 class="fn"><a name="dtor.QWSInputMethod"></a>QWSInputMethod::<span class="name">~QWSInputMethod</span> ()<tt> [virtual]</tt></h3>
<p>Destroys this input method, uninstalling it if it is installed.</p>
<!-- @@@~QWSInputMethod -->
<!-- $$$filter[overload1]$$$filterintintintboolbool -->
<h3 class="fn"><a name="filter"></a><span class="type">bool</span> QWSInputMethod::<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> [virtual]</tt></h3>
<p>Filters the key input identified by the given <i>unicode</i>, <i>keycode</i>, <i>modifiers</i>, <i>isPress</i> and <i>autoRepeat</i> parameters.</p>
<p>Note that the default implementation does nothing; reimplement this function to handle input from both physical and virtual devices.</p>
<p>The <i>keycode</i> is a <a href="qt.html#Key-enum">Qt::Key</a> value, and the <i>modifiers</i> is an OR combination of <a href="qt.html#KeyboardModifier-enum">Qt::KeyboardModifiers</a>. The <i>isPress</i> parameter is telling whether the input is a key press or key release, and the <i>autoRepeat</i> parameter determines whether the input is autorepeated ( i.e., in which case the <a href="qwskeyboardhandler.html#beginAutoRepeat">QWSKeyboardHandler::beginAutoRepeat</a>() function has been called).</p>
<p>To block the event from further processing, return true when reimplementing this function; the default implementation returns false.</p>
<p><b>See also </b><a href="qwsinputmethod.html#setInputResolution">setInputResolution</a>() and <a href="qwsinputmethod.html#inputResolutionShift">inputResolutionShift</a>().</p>
<!-- @@@filter -->
<!-- $$$filter$$$filterconstQPoint&intint -->
<h3 class="fn"><a name="filter-2"></a><span class="type">bool</span> QWSInputMethod::<span class="name">filter</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> & <i>position</i>, <span class="type">int</span> <i>state</i>, <span class="type">int</span> <i>wheel</i> )<tt> [virtual]</tt></h3>
<p>This is an overloaded function.</p>
<p>Filters the mouse input identified by the given <i>position</i>, <i>state</i>, and <i>wheel</i> parameters.</p>
<!-- @@@filter -->
<!-- $$$inputResolutionShift[overload1]$$$inputResolutionShift -->
<h3 class="fn"><a name="inputResolutionShift"></a><span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> QWSInputMethod::<span class="name">inputResolutionShift</span> () const<tt> [protected]</tt></h3>
<p>Returns the number of bits shifted to go from pointer resolution to screen resolution when filtering mouse input.</p>
<p><b>See also </b><a href="qwsinputmethod.html#setInputResolution">setInputResolution</a>() and <a href="qwsinputmethod.html#filter">filter</a>().</p>
<!-- @@@inputResolutionShift -->
<!-- $$$mouseHandler[overload1]$$$mouseHandlerintint -->
<h3 class="fn"><a name="mouseHandler"></a><span class="type">void</span> QWSInputMethod::<span class="name">mouseHandler</span> ( <span class="type">int</span> <i>offset</i>, <span class="type">int</span> <i>state</i> )<tt> [virtual]</tt></h3>
<p>Handles mouse events within the preedit text.</p>
<p>Note that the default implementation resets the input method on all mouse presses; reimplement this function to alter this behavior.</p>
<p>The <i>offset</i> parameter specifies the position of the mouse event within the string, and <i>state</i> specifies the type of the mouse event as described by the <a href="qwsserver.html#IMMouse-enum">QWSServer::IMMouse</a> enum. If <i>state</i> is less than 0, the mouse event is inside the associated widget, but outside the preedit text. When clicking in a different widget, the <i>state</i> is <a href="qwsserver.html#IMMouse-enum">QWSServer::MouseOutside</a>.</p>
<p><b>See also </b><a href="qwsinputmethod.html#sendPreeditString">sendPreeditString</a>() and <a href="qwsinputmethod.html#reset">reset</a>().</p>
<!-- @@@mouseHandler -->
<!-- $$$queryResponse[overload1]$$$queryResponseintconstQVariant& -->
<h3 class="fn"><a name="queryResponse"></a><span class="type">void</span> QWSInputMethod::<span class="name">queryResponse</span> ( <span class="type">int</span> <i>property</i>, const <span class="type"><a href="qvariant.html">QVariant</a></span> & <i>result</i> )<tt> [virtual]</tt></h3>
<p>Receive replies to an input method query.</p>
<p>Note that the default implementation does nothing; reimplement this function to receive such replies.</p>
<p>Internally, an input method query is passed encapsulated by an <a href="qwsevent.html#Type-enum">IMQuery</a> event generated by the <a href="qwsinputmethod.html#sendQuery">sendQuery</a>() function. The queried property and the result is passed in the <i>property</i> and <i>result</i> parameters.</p>
<p><b>See also </b><a href="qwsinputmethod.html#sendQuery">sendQuery</a>() and <a href="qwsserver.html#sendIMQuery">QWSServer::sendIMQuery</a>().</p>
<!-- @@@queryResponse -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn"><a name="reset"></a><span class="type">void</span> QWSInputMethod::<span class="name">reset</span> ()<tt> [virtual]</tt></h3>
<p>Resets the state of the input method.</p>
<p>If the input method is in compose mode, i.e., the input method is actively composing a preedit string, the default implementation calls <a href="qwsinputmethod.html#sendEvent">sendEvent</a>() with empty preedit and commit strings; otherwise it does nothing. Reimplement this function to alter this behavior.</p>
<p><b>See also </b><a href="qwsinputmethod.html#sendEvent">sendEvent</a>().</p>
<!-- @@@reset -->
<!-- $$$sendCommitString[overload1]$$$sendCommitStringconstQString&intint -->
<h3 class="fn"><a name="sendCommitString"></a><span class="type">void</span> QWSInputMethod::<span class="name">sendCommitString</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>commitString</i>, <span class="type">int</span> <i>replaceFromPosition</i> = 0, <span class="type">int</span> <i>replaceLength</i> = 0 )<tt> [protected]</tt></h3>
<p>Sends an event encapsulating the given <i>commitString</i>, to the focus widget.</p>
<p>Note that this will cause the input method to leave compose mode, i.e., the input method will no longer be actively composing the preedit string.</p>
<p>If the specified <i>replaceLength</i> is greater than 0, the commit string will replace the given number of characters of the receiving widget's previous text, starting at the given <i>replaceFromPosition</i> relative to the start of the current preedit string.</p>
<p>Internally, the event is represented by a <a href="qwsevent.html">QWSEvent</a> object of the <a href="qwsevent.html#Type-enum">IMEvent</a> type.</p>
<p><b>See also </b><a href="qwsinputmethod.html#sendEvent">sendEvent</a>() and <a href="qwsinputmethod.html#sendPreeditString">sendPreeditString</a>().</p>
<!-- @@@sendCommitString -->
<!-- $$$sendEvent[overload1]$$$sendEventconstQInputMethodEvent* -->
<h3 class="fn"><a name="sendEvent"></a><span class="type">void</span> QWSInputMethod::<span class="name">sendEvent</span> ( const <span class="type"><a href="qinputmethodevent.html">QInputMethodEvent</a></span> * <i>event</i> )<tt> [protected]</tt></h3>
<p>Sends the given <i>event</i> to the focus widget.</p>
<p>The <tt>QInputMethodEvent</tt> class is derived from <a href="qwsevent.html">QWSEvent</a>, i.e., the given <i>event</i> is a <a href="qwsevent.html">QWSEvent</a> object of the <a href="qwsevent.html#Type-enum">IMEvent</a> type.</p>
<p><b>See also </b><a href="qwsinputmethod.html#sendPreeditString">sendPreeditString</a>(), <a href="qwsinputmethod.html#sendCommitString">sendCommitString</a>(), and <a href="qwsinputmethod.html#reset">reset</a>().</p>
<!-- @@@sendEvent -->
<!-- $$$sendMouseEvent[overload1]$$$sendMouseEventconstQPoint&intint -->
<h3 class="fn"><a name="sendMouseEvent"></a><span class="type">void</span> QWSInputMethod::<span class="name">sendMouseEvent</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> & <i>position</i>, <span class="type">int</span> <i>state</i>, <span class="type">int</span> <i>wheel</i> )<tt> [protected]</tt></h3>
<p>Sends a mouse event specified by the given <i>position</i>, <i>state</i> and <i>wheel</i> parameters.</p>
<p>The given <i>position</i> will be transformed if the screen coordinates do not match the pointer device coordinates.</p>
<p>Note that the event will be not be tested by the active input method, but calling the QWSServer::sendMouseEvent() function will make the current input method filter the event.</p>
<p><b>See also </b><a href="qwsinputmethod.html#mouseHandler">mouseHandler</a>() and <a href="qwsinputmethod.html#sendEvent">sendEvent</a>().</p>
<!-- @@@sendMouseEvent -->
<!-- $$$sendPreeditString[overload1]$$$sendPreeditStringconstQString&intint -->
<h3 class="fn"><a name="sendPreeditString"></a><span class="type">void</span> QWSInputMethod::<span class="name">sendPreeditString</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>preeditString</i>, <span class="type">int</span> <i>cursorPosition</i>, <span class="type">int</span> <i>selectionLength</i> = 0 )<tt> [protected]</tt></h3>
<p>Sends an event encapsulating the given <i>preeditString</i>, to the focus widget.</p>
<p>The specified <i>selectionLength</i> is the number of characters to be marked as selected (starting at the given <i>cursorPosition</i>). If <i>selectionLength</i> is negative, the text <i>before</i> <i>cursorPosition</i> is marked.</p>
<p>The preedit string is marked with <a href="qinputcontext.html#StandardFormat-enum">QInputContext::PreeditFormat</a>, and the selected part is marked with <a href="qinputcontext.html#StandardFormat-enum">QInputContext::SelectionFormat</a>.</p>
<p>Sending an input method event with a non-empty preedit string will cause the input method to enter compose mode. Sending an input method event with an empty preedit string will cause the input method to leave compose mode, i.e., the input method will no longer be actively composing the preedit string.</p>
<p>Internally, the event is represented by a <a href="qwsevent.html">QWSEvent</a> object of the <a href="qwsevent.html#Type-enum">IMEvent</a> type.</p>
<p><b>See also </b><a href="qwsinputmethod.html#sendEvent">sendEvent</a>() and <a href="qwsinputmethod.html#sendCommitString">sendCommitString</a>().</p>
<!-- @@@sendPreeditString -->
<!-- $$$sendQuery[overload1]$$$sendQueryint -->
<h3 class="fn"><a name="sendQuery"></a><span class="type">void</span> QWSInputMethod::<span class="name">sendQuery</span> ( <span class="type">int</span> <i>property</i> )<tt> [protected]</tt></h3>
<p>Sends an input method query (internally encapsulated by a <a href="qwsevent.html">QWSEvent</a> of the <a href="qwsevent.html#Type-enum">IMQuery</a> type) for the specified <i>property</i>.</p>
<p>To receive responses to input method queries, the virtual <a href="qwsinputmethod.html#queryResponse">queryResponse</a>() function must be reimplemented.</p>
<p><b>See also </b><a href="qwsinputmethod.html#queryResponse">queryResponse</a>() and <a href="qwsserver.html#sendIMQuery">QWSServer::sendIMQuery</a>().</p>
<!-- @@@sendQuery -->
<!-- $$$setInputResolution[overload1]$$$setInputResolutionbool -->
<h3 class="fn"><a name="setInputResolution"></a><span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> QWSInputMethod::<span class="name">setInputResolution</span> ( <span class="type">bool</span> <i>isHigh</i> )<tt> [protected]</tt></h3>
<p>Sets and returns the number of bits shifted to go from pointer resolution to screen resolution when filtering mouse input.</p>
<p>If <i>isHigh</i> is true and the device has a pointer device resolution twice or more of the screen resolution, the positions passed to the <a href="qwsinputmethod.html#filter">filter</a>() function will be presented at the higher resolution; otherwise the resolution will be equal to that of the screen resolution.</p>
<p><b>See also </b><a href="qwsinputmethod.html#inputResolutionShift">inputResolutionShift</a>() and <a href="qwsinputmethod.html#filter">filter</a>().</p>
<!-- @@@setInputResolution -->
<!-- $$$updateHandler[overload1]$$$updateHandlerint -->
<h3 class="fn"><a name="updateHandler"></a><span class="type">void</span> QWSInputMethod::<span class="name">updateHandler</span> ( <span class="type">int</span> <i>type</i> )<tt> [virtual]</tt></h3>
<p>Handles update events including resets and focus changes. The update events are specified by the given <i>type</i> which is one of the <a href="qwsinputmethod.html#UpdateType-enum">UpdateType</a> enum values.</p>
<p>Note that reimplementations of this function must call the base implementation for all cases that it does not handle itself.</p>
<p><b>See also </b><a href="qwsinputmethod.html#UpdateType-enum">UpdateType</a>.</p>
<!-- @@@updateHandler -->
</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>
|