Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 5586

qt-doc-4.8.5-10.fc18.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" />
<!-- qevent.cpp -->
  <title>Qt 4.8: QInputMethodEvent 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>QInputMethodEvent</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>
</ul>
</div>
<h1 class="title">QInputMethodEvent Class Reference</h1>
<!-- $$$QInputMethodEvent-brief -->
<p>The QInputMethodEvent class provides parameters for input method events. <a href="#details">More...</a></p>
<!-- @@@QInputMethodEvent -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QInputMethodEvent&gt;</span></pre><p><b>Inherits: </b><a href="qevent.html">QEvent</a>.</p>
<ul>
<li><a href="qinputmethodevent-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"> class </td><td class="memItemRight bottomAlign"><b><a href="qinputmethodevent-attribute.html">Attribute</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qinputmethodevent.html#AttributeType-enum">AttributeType</a></b> { TextFormat, Cursor, Language, Ruby, Selection }</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="qinputmethodevent.html#QInputMethodEvent">QInputMethodEvent</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qinputmethodevent.html#QInputMethodEvent-2">QInputMethodEvent</a></b> ( const QString &amp; <i>preeditText</i>, const QList&lt;Attribute&gt; &amp; <i>attributes</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qinputmethodevent.html#QInputMethodEvent-3">QInputMethodEvent</a></b> ( const QInputMethodEvent &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QList&lt;Attribute&gt; &amp; </td><td class="memItemRight bottomAlign"><b><a href="qinputmethodevent.html#attributes">attributes</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QString &amp; </td><td class="memItemRight bottomAlign"><b><a href="qinputmethodevent.html#commitString">commitString</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QString &amp; </td><td class="memItemRight bottomAlign"><b><a href="qinputmethodevent.html#preeditString">preeditString</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qinputmethodevent.html#replacementLength">replacementLength</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qinputmethodevent.html#replacementStart">replacementStart</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qinputmethodevent.html#setCommitString">setCommitString</a></b> ( const QString &amp; <i>commitString</i>, int <i>replaceFrom</i> = 0, int <i>replaceLength</i> = 0 )</td></tr>
</table>
<ul>
<li class="fn">6 public functions inherited from <a href="qevent.html#public-functions">QEvent</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qevent.html#properties">QEvent</a></li>
<li class="fn">1 static public member inherited from <a href="qevent.html#static-public-members">QEvent</a></li>
</ul>
<a name="details"></a>
<!-- $$$QInputMethodEvent-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QInputMethodEvent class provides parameters for input method events.</p>
<p>Input method events are sent to widgets when an input method is used to enter text into a widget. Input methods are widely used to enter text for languages with non-Latin alphabets.</p>
<p>Note that when creating custom text editing widgets, the <a href="qt.html#WidgetAttribute-enum">Qt::WA_InputMethodEnabled</a> window attribute must be set explicitly (using the <a href="qwidget.html#setAttribute">QWidget::setAttribute</a>() function) in order to receive input method events.</p>
<p>The events are of interest to authors of keyboard entry widgets who want to be able to correctly handle languages with complex character input. Text input in such languages is usually a three step process:</p>
<ol class="1">
<li><b>Starting to Compose</b><p>When the user presses the first key on a keyboard, an input context is created. This input context will contain a string of the typed characters.</p>
</li>
<li><b>Composing</b><p>With every new key pressed, the input method will try to create a matching string for the text typed so far called preedit string. While the input context is active, the user can only move the cursor inside the string belonging to this input context.</p>
</li>
<li><b>Completing</b><p>At some point, the user will activate a user interface component (perhaps using a particular key) where they can choose from a number of strings matching the text they have typed so far. The user can either confirm their choice cancel the input; in either case the input context will be closed.</p>
</li>
</ol>
<p>QInputMethodEvent models these three stages, and transfers the information needed to correctly render the intermediate result. A QInputMethodEvent has two main parameters: <a href="qinputmethodevent.html#preeditString">preeditString</a>() and <a href="qinputmethodevent.html#commitString">commitString</a>(). The <a href="qinputmethodevent.html#preeditString">preeditString</a>() parameter gives the currently active preedit string. The <a href="qinputmethodevent.html#commitString">commitString</a>() parameter gives a text that should get added to (or replace parts of) the text of the editor widget. It usually is a result of the input operations and has to be inserted to the widgets text directly before the preedit string.</p>
<p>If the <a href="qinputmethodevent.html#commitString">commitString</a>() should replace parts of the of the text in the editor, <a href="qinputmethodevent.html#replacementLength">replacementLength</a>() will contain the number of characters to be replaced. <a href="qinputmethodevent.html#replacementStart">replacementStart</a>() contains the position at which characters are to be replaced relative from the start of the preedit string.</p>
<p>A number of attributes control the visual appearance of the preedit string (the visual appearance of text outside the preedit string is controlled by the widget only). The <a href="qinputmethodevent.html#AttributeType-enum">AttributeType</a> enum describes the different attributes that can be set.</p>
<p>A class implementing <a href="qwidget.html#inputMethodEvent">QWidget::inputMethodEvent</a>() or <a href="qgraphicsitem.html#inputMethodEvent">QGraphicsItem::inputMethodEvent</a>() should at least understand and honor the <a href="qinputmethodevent.html#AttributeType-enum">TextFormat</a> and <a href="qinputmethodevent.html#AttributeType-enum">Cursor</a> attributes.</p>
<p>Since input methods need to be able to query certain properties from the widget or graphics item, subclasses must also implement <a href="qwidget.html#inputMethodQuery">QWidget::inputMethodQuery</a>() and <a href="qgraphicsitem.html#inputMethodQuery">QGraphicsItem::inputMethodQuery</a>(), respectively.</p>
<p>When receiving an input method event, the text widget has to performs the following steps:</p>
<ol class="1">
<li>If the widget has selected text, the selected text should get removed.</li>
<li>Remove the text starting at <a href="qinputmethodevent.html#replacementStart">replacementStart</a>() with length <a href="qinputmethodevent.html#replacementLength">replacementLength</a>() and replace it by the <a href="qinputmethodevent.html#commitString">commitString</a>(). If <a href="qinputmethodevent.html#replacementLength">replacementLength</a>() is 0, <a href="qinputmethodevent.html#replacementStart">replacementStart</a>() gives the insertion position for the <a href="qinputmethodevent.html#commitString">commitString</a>().<p>When doing replacement the area of the preedit string is ignored, thus a replacement starting at -1 with a length of 2 will remove the last character before the preedit string and the first character afterwards, and insert the commit string directly before the preedit string.</p>
<p>If the widget implements undo/redo, this operation gets added to the undo stack.</p>
</li>
<li>If there is no current preedit string, insert the <a href="qinputmethodevent.html#preeditString">preeditString</a>() at the current cursor position; otherwise replace the previous preeditString with the one received from this event.<p>If the widget implements undo/redo, the <a href="qinputmethodevent.html#preeditString">preeditString</a>() should not influence the undo/redo stack in any way.</p>
<p>The widget should examine the list of attributes to apply to the preedit string. It has to understand at least the <a href="qinputmethodevent.html#AttributeType-enum">TextFormat</a> and Cursor attributes and render them as specified.</p>
</li>
</ol>
</div>
<p><b>See also </b><a href="qinputcontext.html">QInputContext</a>.</p>
<!-- @@@QInputMethodEvent -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$AttributeType$$$TextFormat$$$Cursor$$$Language$$$Ruby$$$Selection -->
<h3 class="fn"><a name="AttributeType-enum"></a>enum QInputMethodEvent::<span class="name">AttributeType</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>QInputMethodEvent::TextFormat</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">A <a href="qtextcharformat.html">QTextCharFormat</a> for the part of the preedit string specified by start and length. value contains a <a href="qvariant.html">QVariant</a> of type <a href="qtextformat.html">QTextFormat</a> specifying rendering of this part of the preedit string. There should be at most one format for every part of the preedit string. If several are specified for any character in the string the behaviour is undefined. A conforming implementation has to at least honor the backgroundColor, textColor and fontUnderline properties of the format.</td></tr>
<tr><td class="topAlign"><tt>QInputMethodEvent::Cursor</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">If set, a cursor should be shown inside the preedit string at position start. The length variable determines whether the cursor is visible or not. If the length is 0 the cursor is invisible. If value is a <a href="qvariant.html">QVariant</a> of type <a href="qcolor.html">QColor</a> this color will be used for rendering the cursor, otherwise the color of the surrounding text will be used. There should be at most one Cursor attribute per event. If several are specified the behaviour is undefined.</td></tr>
<tr><td class="topAlign"><tt>QInputMethodEvent::Language</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The variant contains a <a href="qlocale.html">QLocale</a> object specifying the language of a certain part of the preedit string. There should be at most one language set for every part of the preedit string. If several are specified for any character in the string the behavior is undefined.</td></tr>
<tr><td class="topAlign"><tt>QInputMethodEvent::Ruby</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The ruby text for a part of the preedit string. There should be at most one ruby text set for every part of the preedit string. If several are specified for any character in the string the behaviour is undefined.</td></tr>
<tr><td class="topAlign"><tt>QInputMethodEvent::Selection</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">If set, the edit cursor should be moved to the specified position in the editor text contents. In contrast with <tt>Cursor</tt>, this attribute does not work on the preedit text, but on the surrounding text. The cursor will be moved after the commit string has been committed, and the preedit string will be located at the new edit position. The start position specifies the new position and the length variable can be used to set a selection starting from that point. The value is unused.</td></tr>
</table>
<p><b>See also </b><a href="qinputmethodevent-attribute.html">Attribute</a>.</p>
<!-- @@@AttributeType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QInputMethodEvent[overload1]$$$QInputMethodEvent -->
<h3 class="fn"><a name="QInputMethodEvent"></a>QInputMethodEvent::<span class="name">QInputMethodEvent</span> ()</h3>
<p>Constructs an event of type <a href="qevent.html#Type-enum">QEvent::InputMethod</a>. The <a href="qinputmethodevent.html#attributes">attributes</a>(), <a href="qinputmethodevent.html#preeditString">preeditString</a>(), <a href="qinputmethodevent.html#commitString">commitString</a>(), <a href="qinputmethodevent.html#replacementStart">replacementStart</a>(), and <a href="qinputmethodevent.html#replacementLength">replacementLength</a>() are initialized to default values.</p>
<p><b>See also </b><a href="qinputmethodevent.html#setCommitString">setCommitString</a>().</p>
<!-- @@@QInputMethodEvent -->
<!-- $$$QInputMethodEvent$$$QInputMethodEventconstQString&constQList<Attribute>& -->
<h3 class="fn"><a name="QInputMethodEvent-2"></a>QInputMethodEvent::<span class="name">QInputMethodEvent</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>preeditText</i>, const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qinputmethodevent-attribute.html">Attribute</a></span>&gt; &amp; <i>attributes</i> )</h3>
<p>Construcs an event of type <a href="qevent.html#Type-enum">QEvent::InputMethod</a>. The preedit text is set to <i>preeditText</i>, the attributes to <i>attributes</i>.</p>
<p>The <a href="qinputmethodevent.html#commitString">commitString</a>(), <a href="qinputmethodevent.html#replacementStart">replacementStart</a>(), and <a href="qinputmethodevent.html#replacementLength">replacementLength</a>() values can be set using <a href="qinputmethodevent.html#setCommitString">setCommitString</a>().</p>
<p><b>See also </b><a href="qinputmethodevent.html#preeditString">preeditString</a>() and <a href="qinputmethodevent.html#attributes">attributes</a>().</p>
<!-- @@@QInputMethodEvent -->
<!-- $$$QInputMethodEvent$$$QInputMethodEventconstQInputMethodEvent& -->
<h3 class="fn"><a name="QInputMethodEvent-3"></a>QInputMethodEvent::<span class="name">QInputMethodEvent</span> ( const <span class="type">QInputMethodEvent</span> &amp; <i>other</i> )</h3>
<p>Constructs a copy of <i>other</i>.</p>
<!-- @@@QInputMethodEvent -->
<!-- $$$attributes[overload1]$$$attributes -->
<h3 class="fn"><a name="attributes"></a>const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qinputmethodevent-attribute.html">Attribute</a></span>&gt; &amp; QInputMethodEvent::<span class="name">attributes</span> () const</h3>
<p>Returns the list of attributes passed to the <a href="qinputmethodevent.html">QInputMethodEvent</a> constructor. The attributes control the visual appearance of the preedit string (the visual appearance of text outside the preedit string is controlled by the widget only).</p>
<p><b>See also </b><a href="qinputmethodevent.html#preeditString">preeditString</a>() and <a href="qinputmethodevent-attribute.html">Attribute</a>.</p>
<!-- @@@attributes -->
<!-- $$$commitString[overload1]$$$commitString -->
<h3 class="fn"><a name="commitString"></a>const <span class="type"><a href="qstring.html">QString</a></span> &amp; QInputMethodEvent::<span class="name">commitString</span> () const</h3>
<p>Returns the text that should get added to (or replace parts of) the text of the editor widget. It usually is a result of the input operations and has to be inserted to the widgets text directly before the preedit string.</p>
<p><b>See also </b><a href="qinputmethodevent.html#setCommitString">setCommitString</a>(), <a href="qinputmethodevent.html#preeditString">preeditString</a>(), <a href="qinputmethodevent.html#replacementStart">replacementStart</a>(), and <a href="qinputmethodevent.html#replacementLength">replacementLength</a>().</p>
<!-- @@@commitString -->
<!-- $$$preeditString[overload1]$$$preeditString -->
<h3 class="fn"><a name="preeditString"></a>const <span class="type"><a href="qstring.html">QString</a></span> &amp; QInputMethodEvent::<span class="name">preeditString</span> () const</h3>
<p>Returns the preedit text, i.e&#x2e; the text before the user started editing it.</p>
<p><b>See also </b><a href="qinputmethodevent.html#commitString">commitString</a>() and <a href="qinputmethodevent.html#attributes">attributes</a>().</p>
<!-- @@@preeditString -->
<!-- $$$replacementLength[overload1]$$$replacementLength -->
<h3 class="fn"><a name="replacementLength"></a><span class="type">int</span> QInputMethodEvent::<span class="name">replacementLength</span> () const</h3>
<p>Returns the number of characters to be replaced in the preedit string.</p>
<p><b>See also </b><a href="qinputmethodevent.html#replacementStart">replacementStart</a>() and <a href="qinputmethodevent.html#setCommitString">setCommitString</a>().</p>
<!-- @@@replacementLength -->
<!-- $$$replacementStart[overload1]$$$replacementStart -->
<h3 class="fn"><a name="replacementStart"></a><span class="type">int</span> QInputMethodEvent::<span class="name">replacementStart</span> () const</h3>
<p>Returns the position at which characters are to be replaced relative from the start of the preedit string.</p>
<p><b>See also </b><a href="qinputmethodevent.html#replacementLength">replacementLength</a>() and <a href="qinputmethodevent.html#setCommitString">setCommitString</a>().</p>
<!-- @@@replacementStart -->
<!-- $$$setCommitString[overload1]$$$setCommitStringconstQString&intint -->
<h3 class="fn"><a name="setCommitString"></a><span class="type">void</span> QInputMethodEvent::<span class="name">setCommitString</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>commitString</i>, <span class="type">int</span> <i>replaceFrom</i> = 0, <span class="type">int</span> <i>replaceLength</i> = 0 )</h3>
<p>Sets the commit string to <i>commitString</i>.</p>
<p>The commit string is the text that should get added to (or replace parts of) the text of the editor widget. It usually is a result of the input operations and has to be inserted to the widgets text directly before the preedit string.</p>
<p>If the commit string should replace parts of the of the text in the editor, <i>replaceLength</i> specifies the number of characters to be replaced. <i>replaceFrom</i> specifies the position at which characters are to be replaced relative from the start of the preedit string.</p>
<p><b>See also </b><a href="qinputmethodevent.html#commitString">commitString</a>(), <a href="qinputmethodevent.html#replacementStart">replacementStart</a>(), and <a href="qinputmethodevent.html#replacementLength">replacementLength</a>().</p>
<!-- @@@setCommitString -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc 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>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      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>