Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2085

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<class name="QInputMethodEvent" doc="/**
&lt;p&gt;The &lt;a href=&quot;QInputMethodEvent.html#QInputMethodEvent()&quot;&gt;&lt;tt&gt;QInputMethodEvent&lt;/tt&gt;&lt;/a&gt; class provides parameters for input method events.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Note that when creating custom text editing widgets, the Qt::WA_InputMethodEnabled window attribute must be set explicitly (using the QWidget::setAttribute() function) in order to receive input method events.&lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;&lt;b&gt;Starting to Compose&lt;/b&gt;&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Composing&lt;/b&gt;&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Completing&lt;/b&gt;&lt;p&gt;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.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;QInputMethodEvent.html#QInputMethodEvent()&quot;&gt;&lt;tt&gt;QInputMethodEvent&lt;/tt&gt;&lt;/a&gt; models these three stages, and transfers the information needed to correctly render the intermediate result. A &lt;a href=&quot;QInputMethodEvent.html#QInputMethodEvent()&quot;&gt;&lt;tt&gt;QInputMethodEvent&lt;/tt&gt;&lt;/a&gt; has two main parameters: &lt;a href=&quot;QInputMethodEvent.html#preeditString()&quot;&gt;&lt;tt&gt;preeditString&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QInputMethodEvent.html#commitString()&quot;&gt;&lt;tt&gt;commitString&lt;/tt&gt;&lt;/a&gt;. The &lt;a href=&quot;QInputMethodEvent.html#preeditString()&quot;&gt;&lt;tt&gt;preeditString&lt;/tt&gt;&lt;/a&gt; parameter gives the currently active preedit string. The &lt;a href=&quot;QInputMethodEvent.html#commitString()&quot;&gt;&lt;tt&gt;commitString&lt;/tt&gt;&lt;/a&gt; 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.&lt;/p&gt;
&lt;p&gt;If the &lt;a href=&quot;QInputMethodEvent.html#commitString()&quot;&gt;&lt;tt&gt;commitString&lt;/tt&gt;&lt;/a&gt; should replace parts of the of the text in the editor, &lt;a href=&quot;QInputMethodEvent.html#replacementLength()&quot;&gt;&lt;tt&gt;replacementLength&lt;/tt&gt;&lt;/a&gt; will contain the number of characters to be replaced. &lt;a href=&quot;QInputMethodEvent.html#replacementStart()&quot;&gt;&lt;tt&gt;replacementStart&lt;/tt&gt;&lt;/a&gt; contains the position at which characters are to be replaced relative from the start of the preedit string.&lt;/p&gt;
&lt;p&gt;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 &lt;a href=&quot;QInputMethodEvent.html#AttributeType-enum&quot;&gt;&lt;tt&gt;AttributeType&lt;/tt&gt;&lt;/a&gt; enum describes the different attributes that can be set.&lt;/p&gt;
&lt;p&gt;A class implementing QWidget::inputMethodEvent() should at least understand and honor the &lt;a href=&quot;QInputMethodEvent.html#AttributeType-enum&quot;&gt;&lt;tt&gt;TextFormat&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QInputMethodEvent.html#AttributeType-enum&quot;&gt;Cursor&lt;/tt&gt;&lt;/a&gt; attributes.&lt;/p&gt;
&lt;p&gt;Since input methods need to be able to query certain properties from the widget, the widget must also implement QWidget::inputMethodQuery().&lt;/p&gt;
&lt;p&gt;When receiving an input method event, the text widget has to performs the following steps:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;If the widget has selected text, the selected text should get removed.&lt;/li&gt;
&lt;li&gt;Remove the text starting at &lt;a href=&quot;QInputMethodEvent.html#replacementStart()&quot;&gt;&lt;tt&gt;replacementStart&lt;/tt&gt;&lt;/a&gt; with length &lt;a href=&quot;QInputMethodEvent.html#replacementLength()&quot;&gt;&lt;tt&gt;replacementLength&lt;/tt&gt;&lt;/a&gt; and replace it by the &lt;a href=&quot;QInputMethodEvent.html#commitString()&quot;&gt;&lt;tt&gt;commitString&lt;/tt&gt;&lt;/a&gt;. If &lt;a href=&quot;QInputMethodEvent.html#replacementLength()&quot;&gt;&lt;tt&gt;replacementLength&lt;/tt&gt;&lt;/a&gt; is 0, &lt;a href=&quot;QInputMethodEvent.html#replacementStart()&quot;&gt;&lt;tt&gt;replacementStart&lt;/tt&gt;&lt;/a&gt; gives the insertion position for the &lt;a href=&quot;QInputMethodEvent.html#commitString()&quot;&gt;&lt;tt&gt;commitString&lt;/tt&gt;&lt;/a&gt;.&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;If the widget implements undo/redo, this operation gets added to the undo stack.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;If there is no current preedit string, insert the &lt;a href=&quot;QInputMethodEvent.html#preeditString()&quot;&gt;&lt;tt&gt;preeditString&lt;/tt&gt;&lt;/a&gt; at the current cursor position; otherwise replace the previous &lt;a href=&quot;QInputMethodEvent.html#preeditString()&quot;&gt;&lt;tt&gt;preeditString&lt;/tt&gt;&lt;/a&gt; with the one received from this event.&lt;p&gt;If the widget implements undo/redo, the &lt;a href=&quot;QInputMethodEvent.html#preeditString()&quot;&gt;&lt;tt&gt;preeditString&lt;/tt&gt;&lt;/a&gt; should not influence the undo/redo stack in any way.&lt;/p&gt;
&lt;p&gt;The widget should examine the list of attributes to apply to the preedit string. It has to understand at least the &lt;a href=&quot;QInputMethodEvent.html#AttributeType-enum&quot;&gt;&lt;tt&gt;TextFormat&lt;/tt&gt;&lt;/a&gt; and Cursor attributes and render them as specified.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

@see &lt;a href=&quot;QInputContext.html&quot;&gt;&lt;tt&gt;QInputContext&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QInputMethodEvent(java.lang.String preeditText, java.util.List&lt;com.trolltech.qt.gui.QInputMethodEvent_Attribute&gt; attributes)" doc="/**
&lt;p&gt;Construcs an event of type QEvent::InputMethod. The preedit text is set to &lt;tt&gt;preeditText&lt;/tt&gt;, the attributes to &lt;tt&gt;attributes&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;QInputMethodEvent.html#commitString()&quot;&gt;&lt;tt&gt;commitString&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QInputMethodEvent.html#replacementStart()&quot;&gt;&lt;tt&gt;replacementStart&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QInputMethodEvent.html#replacementLength()&quot;&gt;&lt;tt&gt;replacementLength&lt;/tt&gt;&lt;/a&gt; values can be set using &lt;a href=&quot;QInputMethodEvent.html#setCommitString(java.lang.String, int, int)&quot;&gt;&lt;tt&gt;setCommitString&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QInputMethodEvent.html#preeditString()&quot;&gt;&lt;tt&gt;preeditString&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QInputMethodEvent.html#attributes()&quot;&gt;&lt;tt&gt;attributes&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QInputMethodEvent(com.trolltech.qt.gui.QInputMethodEvent other)" doc="/**
&lt;p&gt;Constructs a copy of &lt;tt&gt;other&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public QInputMethodEvent()" doc="/**
&lt;p&gt;Constructs an event of type QEvent::InputMethod. The &lt;a href=&quot;QInputMethodEvent.html#attributes()&quot;&gt;&lt;tt&gt;attributes&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QInputMethodEvent.html#preeditString()&quot;&gt;&lt;tt&gt;preeditString&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QInputMethodEvent.html#commitString()&quot;&gt;&lt;tt&gt;commitString&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QInputMethodEvent.html#replacementStart()&quot;&gt;&lt;tt&gt;replacementStart&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QInputMethodEvent.html#replacementLength()&quot;&gt;&lt;tt&gt;replacementLength&lt;/tt&gt;&lt;/a&gt; are initialized to default values.&lt;/p&gt;

@see &lt;a href=&quot;QInputMethodEvent.html#setCommitString(java.lang.String, int, int)&quot;&gt;&lt;tt&gt;setCommitString&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.util.List&lt;com.trolltech.qt.gui.QInputMethodEvent_Attribute&gt; attributes()" doc="/**
&lt;p&gt;Returns the list of attributes passed to the &lt;a href=&quot;QInputMethodEvent.html#QInputMethodEvent()&quot;&gt;&lt;tt&gt;QInputMethodEvent&lt;/tt&gt;&lt;/a&gt; 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).&lt;/p&gt;

@see &lt;a href=&quot;QInputMethodEvent.html#preeditString()&quot;&gt;&lt;tt&gt;preeditString&lt;/tt&gt;&lt;/a&gt;
@see Attribute&lt;/tt&gt; */"/>
    <method name="public final java.lang.String commitString()" doc="/**
&lt;p&gt;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.&lt;/p&gt;

@see &lt;a href=&quot;QInputMethodEvent.html#setCommitString(java.lang.String, int, int)&quot;&gt;&lt;tt&gt;setCommitString&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QInputMethodEvent.html#preeditString()&quot;&gt;&lt;tt&gt;preeditString&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QInputMethodEvent.html#replacementStart()&quot;&gt;&lt;tt&gt;replacementStart&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QInputMethodEvent.html#replacementLength()&quot;&gt;&lt;tt&gt;replacementLength&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String preeditString()" doc="/**
&lt;p&gt;Returns the preedit text, i.e&amp;#x2e; the text before the user started editing it.&lt;/p&gt;

@see &lt;a href=&quot;QInputMethodEvent.html#commitString()&quot;&gt;&lt;tt&gt;commitString&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QInputMethodEvent.html#attributes()&quot;&gt;&lt;tt&gt;attributes&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int replacementLength()" doc="/**
&lt;p&gt;Returns the number of characters to be replaced in the preedit string.&lt;/p&gt;

@see &lt;a href=&quot;QInputMethodEvent.html#replacementStart()&quot;&gt;&lt;tt&gt;replacementStart&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QInputMethodEvent.html#setCommitString(java.lang.String, int, int)&quot;&gt;&lt;tt&gt;setCommitString&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int replacementStart()" doc="/**
&lt;p&gt;Returns the position at which characters are to be replaced relative from the start of the preedit string.&lt;/p&gt;

@see &lt;a href=&quot;QInputMethodEvent.html#replacementLength()&quot;&gt;&lt;tt&gt;replacementLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QInputMethodEvent.html#setCommitString(java.lang.String, int, int)&quot;&gt;&lt;tt&gt;setCommitString&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setCommitString(java.lang.String commitString, int replaceFrom, int replaceLength)" doc="/**
&lt;p&gt;Sets the commit string to &lt;tt&gt;commitString&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;If the commit string should replace parts of the of the text in the editor, &lt;tt&gt;replaceLength&lt;/tt&gt; specifies the number of characters to be replaced. &lt;tt&gt;replaceFrom&lt;/tt&gt; specifies the position at which characters are to be replaced relative from the start of the preedit string.&lt;/p&gt;

@see &lt;a href=&quot;QInputMethodEvent.html#commitString()&quot;&gt;&lt;tt&gt;commitString&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QInputMethodEvent.html#replacementStart()&quot;&gt;&lt;tt&gt;replacementStart&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QInputMethodEvent.html#replacementLength()&quot;&gt;&lt;tt&gt;replacementLength&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setCommitString(java.lang.String commitString, int replaceFrom)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QInputMethodEvent.html#setCommitString(java.lang.String, int, int)&quot;&gt;&lt;tt&gt;setCommitString&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;commitString&lt;/tt&gt;, &lt;tt&gt;replaceFrom&lt;/tt&gt;, 0). */"/>
    <method name="public final void setCommitString(java.lang.String commitString)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QInputMethodEvent.html#setCommitString(java.lang.String, int, int)&quot;&gt;&lt;tt&gt;setCommitString&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;commitString&lt;/tt&gt;, 0, 0). */"/>
    <enum name="AttributeType">
        <enum-value name="TextFormat" doc="/**
&lt;p&gt;A &lt;a href=&quot;QTextCharFormat.html&quot;&gt;&lt;tt&gt;QTextCharFormat&lt;/tt&gt;&lt;/a&gt; for the part of the preedit string specified by start and length. value contains a &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; of type &lt;a href=&quot;QTextFormat.html&quot;&gt;&lt;tt&gt;QTextFormat&lt;/tt&gt;&lt;/a&gt; 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.&lt;/p&gt;
 */"/>
        <enum-value name="Cursor" doc="/**
&lt;p&gt;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 &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; of type &lt;a href=&quot;QColor.html&quot;&gt;&lt;tt&gt;QColor&lt;/tt&gt;&lt;/a&gt; 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.&lt;/p&gt;
 */"/>
        <enum-value name="Language" doc="/**
&lt;p&gt;The variant contains a &lt;a href=&quot;%2E%2E/core/QLocale.html&quot;&gt;&lt;tt&gt;QLocale&lt;/tt&gt;&lt;/a&gt; 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 behaviour is undefined.&lt;/p&gt;
 */"/>
        <enum-value name="Ruby" doc="/**
&lt;p&gt;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.&lt;/p&gt;
 */"/>
</enum>
</class>