Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5573

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" />
<!-- qinputcontext.cpp -->
  <title>Qt 4.8: QInputContext 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>QInputContext</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="#details">Detailed Description</a></li>
<li class="level2"><a href="#groups-of-functions">Groups of Functions</a></li>
<li class="level2"><a href="#licensing-information">Licensing Information</a></li>
</ul>
</div>
<h1 class="title">QInputContext Class Reference</h1>
<!-- $$$QInputContext-brief -->
<p>The QInputContext class abstracts the input method dependent data and composing state. <a href="#details">More...</a></p>
<!-- @@@QInputContext -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QInputContext&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="qinputcontext-members.html">List of all members, including inherited 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="qinputcontext.html#StandardFormat-enum">StandardFormat</a></b> { PreeditFormat, SelectionFormat }</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="qinputcontext.html#QInputContext">QInputContext</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#dtor.QInputContext">~QInputContext</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QList&lt;QAction *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#actions">actions</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#filterEvent">filterEvent</a></b> ( const QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#focusWidget">focusWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QFont </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#font">font</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#identifierName">identifierName</a></b> () = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#isComposing">isComposing</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#language">language</a></b> () = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#mouseHandler">mouseHandler</a></b> ( int <i>x</i>, QMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#reset">reset</a></b> () = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#sendEvent">sendEvent</a></b> ( const QInputMethodEvent &amp; <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#setFocusWidget">setFocusWidget</a></b> ( QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextFormat </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#standardFormat">standardFormat</a></b> ( StandardFormat <i>s</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#symbianFilterEvent">symbianFilterEvent</a></b> ( QWidget * <i>keywidget</i>, const QSymbianEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#update">update</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#widgetDestroyed">widgetDestroyed</a></b> ( QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qinputcontext.html#x11FilterEvent">x11FilterEvent</a></b> ( QWidget * <i>keywidget</i>, XEvent * <i>event</i> )</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-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>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QInputContext-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QInputContext class abstracts the input method dependent data and composing state.</p>
<p>An input method is responsible for inputting complex text that cannot be inputted via simple keymap. It converts a sequence of input events (typically key events) into a text string through the input method specific converting process. The class of the processes are widely ranging from simple finite state machine to complex text translator that pools a whole paragraph of a text with text editing capability to perform grammar and semantic analysis.</p>
<p>To abstract such different input method specific intermediate information, Qt offers the QInputContext as base class. The concept is well known as 'input context' in the input method domain. An input context is created for a text widget in response to a demand. It is ensured that an input context is prepared for an input method before input to a text widget.</p>
<p>Multiple input contexts that belong to a single input method may concurrently coexist. Suppose multi-window text editor. Each text widget of window A and B holds different QInputContext instance which contains different state information such as partially composed text.</p>
<a name="groups-of-functions"></a>
<h3>Groups of Functions</h3>
<table class="generic">
<thead><tr class="qt-style"><th >Context</th><th >Functions</th></tr></thead>
<tr valign="top" class="odd"><td >Receiving information</td><td ><a href="qinputcontext.html#x11FilterEvent">x11FilterEvent</a>(), <a href="qinputcontext.html#filterEvent">filterEvent</a>(), <a href="qinputcontext.html#mouseHandler">mouseHandler</a>()</td></tr>
<tr valign="top" class="even"><td >Sending back composed text</td><td ><a href="qinputcontext.html#sendEvent">sendEvent</a>()</td></tr>
<tr valign="top" class="odd"><td >State change notification</td><td ><a href="qinputcontext.html#setFocusWidget">setFocusWidget</a>(), <a href="qinputcontext.html#reset">reset</a>()</td></tr>
<tr valign="top" class="even"><td >Context information</td><td ><a href="qinputcontext.html#identifierName">identifierName</a>(), <a href="qinputcontext.html#language">language</a>(), <a href="qinputcontext.html#font">font</a>(), <a href="qinputcontext.html#isComposing">isComposing</a>()</td></tr>
</table>
<a name="licensing-information"></a>
<h3>Licensing Information</h3>
<div class="LegaleseLeft"><p>Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved.</p>
<p>This file is written to contribute to Nokia Corporation and/or its subsidiary(-ies) under their own license. You may use this file under your Qt license. Following description is copied from their original file headers. Contact immodule-qt@freedesktop.org if any conditions of this licensing are not clear to you.</p>
</div></div>
<p><b>See also </b><a href="qinputcontextplugin.html">QInputContextPlugin</a>, <a href="qinputcontextfactory.html">QInputContextFactory</a>, and <a href="qapplication.html#setInputContext">QApplication::setInputContext</a>().</p>
<!-- @@@QInputContext -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$StandardFormat$$$PreeditFormat$$$SelectionFormat -->
<h3 class="fn"><a name="StandardFormat-enum"></a>enum QInputContext::<span class="name">StandardFormat</span></h3>
<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>QInputContext::PreeditFormat</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The preedit text.</td></tr>
<tr><td class="topAlign"><tt>QInputContext::SelectionFormat</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The selection text.</td></tr>
</table>
<p><b>See also </b><a href="qinputcontext.html#standardFormat">standardFormat</a>().</p>
<!-- @@@StandardFormat -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QInputContext[overload1]$$$QInputContextQObject* -->
<h3 class="fn"><a name="QInputContext"></a>QInputContext::<span class="name">QInputContext</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs an input context with the given <i>parent</i>.</p>
<!-- @@@QInputContext -->
<!-- $$$~QInputContext[overload1]$$$~QInputContext -->
<h3 class="fn"><a name="dtor.QInputContext"></a>QInputContext::<span class="name">~QInputContext</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the input context.</p>
<!-- @@@~QInputContext -->
<!-- $$$actions[overload1]$$$actions -->
<h3 class="fn"><a name="actions"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qaction.html">QAction</a></span> *&gt; QInputContext::<span class="name">actions</span> ()<tt> [virtual]</tt></h3>
<p>This is a preliminary interface for Qt 4.</p>
<!-- @@@actions -->
<!-- $$$filterEvent[overload1]$$$filterEventconstQEvent* -->
<h3 class="fn"><a name="filterEvent"></a><span class="type">bool</span> QInputContext::<span class="name">filterEvent</span> ( const <span class="type"><a href="qevent.html">QEvent</a></span> * <i>event</i> )<tt> [virtual]</tt></h3>
<p>This function can be reimplemented in a subclass to filter input events.</p>
<p>Return true if the <i>event</i> has been consumed. Otherwise, the unfiltered <i>event</i> will be forwarded to widgets as ordinary way. Although the input events have accept() and ignore() methods, leave it untouched.</p>
<p><i>event</i> is currently restricted to events of these types:</p>
<ul>
<li>CloseSoftwareInputPanel</li>
<li>KeyPress</li>
<li>KeyRelease</li>
<li>MouseButtonDblClick</li>
<li>MouseButtonPress</li>
<li>MouseButtonRelease</li>
<li>MouseMove</li>
<li>RequestSoftwareInputPanel</li>
</ul>
<p>But some input method related events such as <a href="qwheelevent.html">QWheelEvent</a> or <a href="qtabletevent.html">QTabletEvent</a> may be added in future.</p>
<p>The filtering opportunity is always given to the input context as soon as possible. It has to be taken place before any other key event consumers such as eventfilters and accelerators because some input methods require quite various key combination and sequences. It often conflicts with accelerators and so on, so we must give the input context the filtering opportunity first to ensure all input methods work properly regardless of application design.</p>
<p>Ordinary input methods require discrete key events to work properly, so Qt's key compression is always disabled for any input contexts.</p>
<p><b>See also </b><a href="qkeyevent.html">QKeyEvent</a> and <a href="qinputcontext.html#x11FilterEvent">x11FilterEvent</a>().</p>
<!-- @@@filterEvent -->
<!-- $$$focusWidget[overload1]$$$focusWidget -->
<h3 class="fn"><a name="focusWidget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QInputContext::<span class="name">focusWidget</span> () const</h3>
<p>Returns the widget that has an input focus for this input context.</p>
<p>The return value may differ from holderWidget() if the input context is shared between several text widgets.</p>
<p><b>Warning:</b> To ensure platform independence and support flexible configuration of widgets, ordinary input methods should not call this function directly.</p>
<p><b>See also </b><a href="qinputcontext.html#setFocusWidget">setFocusWidget</a>().</p>
<!-- @@@focusWidget -->
<!-- $$$font[overload1]$$$font -->
<h3 class="fn"><a name="font"></a><span class="type"><a href="qfont.html">QFont</a></span> QInputContext::<span class="name">font</span> () const<tt> [virtual]</tt></h3>
<p>Returns the font of the current input widget</p>
<!-- @@@font -->
<!-- $$$identifierName[overload1]$$$identifierName -->
<h3 class="fn"><a name="identifierName"></a><span class="type"><a href="qstring.html">QString</a></span> QInputContext::<span class="name">identifierName</span> ()<tt> [pure virtual]</tt></h3>
<p>This function must be implemented in any subclasses to return the identifier name of the input method.</p>
<p>Return value is the name to identify and specify input methods for the input method switching mechanism and so on. The name has to be consistent with <a href="qinputcontextplugin.html#keys">QInputContextPlugin::keys</a>(). The name has to consist of ASCII characters only.</p>
<p>There are two different names with different responsibility in the input method domain. This function returns one of them. Another name is called 'display name' that stands for the name for endusers appeared in a menu and so on.</p>
<p><b>See also </b><a href="qinputcontextplugin.html#keys">QInputContextPlugin::keys</a>() and <a href="qinputcontextplugin.html#displayName">QInputContextPlugin::displayName</a>().</p>
<!-- @@@identifierName -->
<!-- $$$isComposing[overload1]$$$isComposing -->
<h3 class="fn"><a name="isComposing"></a><span class="type">bool</span> QInputContext::<span class="name">isComposing</span> () const<tt> [pure virtual]</tt></h3>
<p>This function indicates whether InputMethodStart event had been sent to the current focus widget. It is ensured that an input context can send InputMethodCompose or InputMethodEnd event safely if this function returned true.</p>
<p>The state is automatically being tracked through <a href="qinputcontext.html#sendEvent">sendEvent</a>().</p>
<p><b>See also </b><a href="qinputcontext.html#sendEvent">sendEvent</a>().</p>
<!-- @@@isComposing -->
<!-- $$$language[overload1]$$$language -->
<h3 class="fn"><a name="language"></a><span class="type"><a href="qstring.html">QString</a></span> QInputContext::<span class="name">language</span> ()<tt> [pure virtual]</tt></h3>
<p>This function must be implemented in any subclasses to return a language code (e.g&#x2e; &quot;zh_CN&quot;, &quot;zh_TW&quot;, &quot;zh_HK&quot;, &quot;ja&quot;, &quot;ko&quot;, ..&#x2e;) of the input context. If the input context can handle multiple languages, return the currently used one. The name has to be consistent with QInputContextPlugin::language().</p>
<p>This information will be used by language tagging feature in <a href="qinputmethodevent.html">QInputMethodEvent</a>. It is required to distinguish unified han characters correctly. It enables proper font and character code handling. Suppose CJK-awared multilingual web browser (that automatically modifies fonts in CJK-mixed text) and XML editor (that automatically inserts lang attr).</p>
<!-- @@@language -->
<!-- $$$mouseHandler[overload1]$$$mouseHandlerintQMouseEvent* -->
<h3 class="fn"><a name="mouseHandler"></a><span class="type">void</span> QInputContext::<span class="name">mouseHandler</span> ( <span class="type">int</span> <i>x</i>, <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>event</i> )<tt> [virtual]</tt></h3>
<p>This function can be reimplemented in a subclass to handle mouse press, release, double-click, and move events within the preedit text. You can use the function to implement mouse-oriented user interface such as text selection or popup menu for candidate selection.</p>
<p>The <i>x</i> parameter is the offset within the string that was sent with the InputMethodCompose event. The alteration boundary of <i>x</i> is ensured as character boundary of preedit string accurately.</p>
<p>The <i>event</i> parameter is the event that was sent to the editor widget. The event type is <a href="qevent.html#Type-enum">QEvent::MouseButtonPress</a>, <a href="qevent.html#Type-enum">QEvent::MouseButtonRelease</a>, <a href="qevent.html#Type-enum">QEvent::MouseButtonDblClick</a> or <a href="qevent.html#Type-enum">QEvent::MouseMove</a>. The event's button and state indicate the kind of operation that was performed.</p>
<!-- @@@mouseHandler -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn"><a name="reset"></a><span class="type">void</span> QInputContext::<span class="name">reset</span> ()<tt> [pure virtual]</tt></h3>
<p>This function can be reimplemented in a subclass to reset the state of the input method.</p>
<p>This function is called by several widgets to reset input state. For example, a text widget call this function before inserting a text to make widget ready to accept a text.</p>
<p>Default implementation is sufficient for simple input method. You can override this function to reset external input method engines in complex input method. In the case, call QInputContext::reset() to ensure proper termination of inputting.</p>
<p>In a reimplementation of reset(), you must not send any <a href="qinputmethodevent.html">QInputMethodEvent</a> containing preedit text. You can only commit string and attributes; otherwise, you risk breaking input state consistency.</p>
<!-- @@@reset -->
<!-- $$$sendEvent[overload1]$$$sendEventconstQInputMethodEvent& -->
<h3 class="fn"><a name="sendEvent"></a><span class="type">void</span> QInputContext::<span class="name">sendEvent</span> ( const <span class="type"><a href="qinputmethodevent.html">QInputMethodEvent</a></span> &amp; <i>event</i> )</h3>
<p>Sends an input method event specified by <i>event</i> to the current focus widget. Implementations of <a href="qinputcontext.html">QInputContext</a> should call this method to send the generated input method events and not <a href="qcoreapplication.html#sendEvent">QApplication::sendEvent</a>(), as the events might have to get dispatched to a different application on some platforms.</p>
<p>Some complex input methods route the handling to several child contexts (e.g&#x2e; to enable language switching). To account for this, <a href="qinputcontext.html">QInputContext</a> will check if the parent object is a <a href="qinputcontext.html">QInputContext</a>. If yes, it will call the parents sendEvent() implementation instead of sending the event directly.</p>
<p><b>See also </b><a href="qinputmethodevent.html">QInputMethodEvent</a>.</p>
<!-- @@@sendEvent -->
<!-- $$$setFocusWidget[overload1]$$$setFocusWidgetQWidget* -->
<h3 class="fn"><a name="setFocusWidget"></a><span class="type">void</span> QInputContext::<span class="name">setFocusWidget</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )<tt> [virtual]</tt></h3>
<p>Sets the <i>widget</i> that has an input focus for this input context.</p>
<p><b>Warning:</b> Ordinary input methods must not call this function directly.</p>
<p><b>See also </b><a href="qinputcontext.html#focusWidget">focusWidget</a>().</p>
<!-- @@@setFocusWidget -->
<!-- $$$standardFormat[overload1]$$$standardFormatStandardFormat -->
<h3 class="fn"><a name="standardFormat"></a><span class="type"><a href="qtextformat.html">QTextFormat</a></span> QInputContext::<span class="name">standardFormat</span> ( <span class="type"><a href="qinputcontext.html#StandardFormat-enum">StandardFormat</a></span> <i>s</i> ) const</h3>
<p>Returns a <a href="qtextformat.html">QTextFormat</a> object that specifies the format for component <i>s</i>.</p>
<!-- @@@standardFormat -->
<!-- $$$symbianFilterEvent[overload1]$$$symbianFilterEventQWidget*constQSymbianEvent* -->
<h3 class="fn"><a name="symbianFilterEvent"></a><span class="type">bool</span> QInputContext::<span class="name">symbianFilterEvent</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>keywidget</i>, const <span class="type"><a href="qsymbianevent.html">QSymbianEvent</a></span> * <i>event</i> )<tt> [virtual]</tt></h3>
<p>This function may be overridden only if input method is depending on Symbian and you need raw Symbian events. Otherwise, this function must not.</p>
<p>This function is designed to filter raw key events on Symbian, but other input methods may use this to implement some special features.</p>
<p>Return true if the <i>event</i> has been consumed. Otherwise, the unfiltered <i>event</i> will be translated into <a href="qevent.html">QEvent</a> and forwarded to <a href="qinputcontext.html#filterEvent">filterEvent</a>(). Filtering at both symbianFilterEvent() and <a href="qinputcontext.html#filterEvent">filterEvent</a>() in single input method is allowed.</p>
<p><i>keywidget</i> is a client widget into which a text is inputted. <i>event</i> is inputted <a href="qsymbianevent.html">QSymbianEvent</a>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qinputcontext.html#filterEvent">filterEvent</a>().</p>
<!-- @@@symbianFilterEvent -->
<!-- $$$update[overload1]$$$update -->
<h3 class="fn"><a name="update"></a><span class="type">void</span> QInputContext::<span class="name">update</span> ()<tt> [virtual]</tt></h3>
<p>This virtual function is called when a state in the focus widget has changed. <a href="qinputcontext.html">QInputContext</a> can then use <a href="qwidget.html#inputMethodQuery">QWidget::inputMethodQuery</a>() to query the new state of the widget.</p>
<!-- @@@update -->
<!-- $$$widgetDestroyed[overload1]$$$widgetDestroyedQWidget* -->
<h3 class="fn"><a name="widgetDestroyed"></a><span class="type">void</span> QInputContext::<span class="name">widgetDestroyed</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )<tt> [virtual]</tt></h3>
<p>This virtual function is called when the specified <i>widget</i> is destroyed. The <i>widget</i> is a widget on which this input context is installed.</p>
<!-- @@@widgetDestroyed -->
<!-- $$$x11FilterEvent[overload1]$$$x11FilterEventQWidget*XEvent* -->
<h3 class="fn"><a name="x11FilterEvent"></a><span class="type">bool</span> QInputContext::<span class="name">x11FilterEvent</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>keywidget</i>, <span class="type">XEvent</span> * <i>event</i> )<tt> [virtual]</tt></h3>
<p>This function may be overridden only if input method is depending on X11 and you need raw XEvent. Otherwise, this function must not.</p>
<p>This function is designed to filter raw key events for XIM, but other input methods may use this to implement some special features such as distinguishing Shift_L and Shift_R.</p>
<p>Return true if the <i>event</i> has been consumed. Otherwise, the unfiltered <i>event</i> will be translated into <a href="qevent.html">QEvent</a> and forwarded to <a href="qinputcontext.html#filterEvent">filterEvent</a>(). Filtering at both x11FilterEvent() and <a href="qinputcontext.html#filterEvent">filterEvent</a>() in single input method is allowed.</p>
<p><i>keywidget</i> is a client widget into which a text is inputted. <i>event</i> is inputted XEvent.</p>
<p><b>See also </b><a href="qinputcontext.html#filterEvent">filterEvent</a>().</p>
<!-- @@@x11FilterEvent -->
</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>