Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 1420

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/kernel/qevent.cpp:1514 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QIMEvent Class</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QIMEvent Class Reference</h1>

<p>The QIMEvent class provides parameters for input method events.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qevent-h.html">qevent.h</a>&gt;</tt>
<p>Inherits <a href="qevent.html">QEvent</a>.
<p><a href="qimevent-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QIMEvent"><b>QIMEvent</b></a> ( Type&nbsp;type, const&nbsp;QString&nbsp;&amp;&nbsp;text, int&nbsp;cursorPosition )</div></li>
<li><div class=fn>const QString &amp; <a href="#text"><b>text</b></a> () const</div></li>
<li><div class=fn>int <a href="#cursorPos"><b>cursorPos</b></a> () const</div></li>
<li><div class=fn>bool <a href="#isAccepted"><b>isAccepted</b></a> () const</div></li>
<li><div class=fn>void <a href="#accept"><b>accept</b></a> ()</div></li>
<li><div class=fn>void <a href="#ignore"><b>ignore</b></a> ()</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>



The QIMEvent class provides parameters for input method events.
<p> Input method events are send to widgets, when an input method is
used to enter text into a widget. Input methods are widely used to
enter text in Asian languages.
<p> The events are of interest to widgets that accept keyboard input
and want to be able to correctly handle Asian languages. Text input
in Asian languages is usually a three step process.  When the user
presses the first key on a keyboard an input context is
created. This input context will contain a string with the typed
characters. With every new key pressed, the input method will try to
create a matching string for the text typed so far.
<p> While the input context is active, the user can move the cursor only
inside the string belonging to this input context. At some point,
when the user presses the Spacebar, they get to the second stage,
where they can choose from a number of strings that match the text
they have typed so far. The user can press Enter to confirm their
choice or Escape to cancel the input; in either case the input
context will be closed. Note that the particular key presses used
for a given input context may differ from those we've mentioned
here, i.e. they may not be Spacebar, Enter and Escape.
<p> These three stages are represented by three different types of
events. The IMStartEvent, IMComposeEvent and IMEndEvent. When a new
input context is created, an IMStartEvent will be sent to the
widget and delivered to the <a href="qwidget.html#imStartEvent">QWidget::imStartEvent</a>() function. The
widget can then update internal data structures to reflect this.
<p> After this, an IMComposeEvent will be send to the widget with every
key the user presses. It will contain the current composition string
the widget has to show and the current cursor position within the
composition string. This string is temporary and can change with
every key the user types, so the widget will need to store the state
before the composition started (the state it had when it received
the IMStartEvent). IMComposeEvents will be delivered to the
<a href="qwidget.html#imComposeEvent">QWidget::imComposeEvent</a>() function.
<p> Usually, widgets try to mark the part of the text that is part of
the current composition in a way that is visible to the user. Mostly
this is achieved by using e.g. dotted underline.
<p> After the user has selected the final string, and IMEndEvent will be
sent to the widget. The event contains the final string the user
selected. This string has to be accepted as the final text the user
entered, and the intermediate composition string should be cleared.
These events are delivered to <a href="qwidget.html#imEndEvent">QWidget::imEndEvent</a>().
<p> If the user clicks another widget, taking the focus out of the
widget where the compose is taking place the IMEndEvent will be
sent and the string it holds will be the result of the composition
up to that point (which could be an empty string).
<p>See also <a href="events.html">Event Classes</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QIMEvent"></a>QIMEvent::QIMEvent ( <a href="qevent.html#Type-enum">Type</a>&nbsp;type, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text, int&nbsp;cursorPosition )
</h3>

<p> Constructs a new QIMEvent with accept flag set to FALSE. <em>type</em> can
be one of QEvent::IMStartEvent, QEvent::IMComposeEvents and
QEvent::IMEndEvent. <em>text</em> contains the current compostion string
and <em>cursorPosition</em> the current position of the cursor inside <em>text</em>.

<h3 class=fn>void <a name="accept"></a>QIMEvent::accept ()
</h3>

Sets the accept flag of the input method event object.
<p> Setting the accept parameter indicates that the receiver of the event processed
the input method event.
<p> The accept flag is not set by default.
<p> <p>See also <a href="#ignore">ignore</a>().

<h3 class=fn>int <a name="cursorPos"></a>QIMEvent::cursorPos () const
</h3>

<p> Returns the current cursor position inside the composition string.
Will return 0 for IMStartEvent and IMEndEvent.

<h3 class=fn>void <a name="ignore"></a>QIMEvent::ignore ()
</h3>

Clears the accept flag parameter of the input method event object.
<p> Clearing the accept parameter indicates that the event receiver does
not want the input method event.
<p> The accept flag is cleared by default.
<p> <p>See also <a href="#accept">accept</a>().

<h3 class=fn>bool <a name="isAccepted"></a>QIMEvent::isAccepted () const
</h3>

Returns TRUE if the receiver of the event processed the event;
otherwise returns FALSE.

<h3 class=fn>const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp; <a name="text"></a>QIMEvent::text () const
</h3>

<p> Returns the composition text. This is a null string for an
IMStartEvent, and contains the final accepted string in the
IMEndEvent.

<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>