Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 7126

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?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/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <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 class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></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 &lt;QWSInputMethod&gt;</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 &amp; <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 &amp; <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 &amp; <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 &amp; <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 &amp; <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&#x2e;, 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&#x2e;, 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&#x2e;, 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> &amp; <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> &amp; <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&#x2e;, 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> &amp; <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&#x2e;, 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&#x2e;, 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> &amp; <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> &amp; <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&#x2e;, 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>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      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>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      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>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>