QWSInputMethod Class Reference |
Constant | Value | Description |
---|---|---|
QWSInputMethod::Update | 0 | The input widget is updated in some way; use sendQuery() with Qt::ImMicroFocus as an argument for more information. |
QWSInputMethod::FocusIn | 1 | A new input widget receives focus. |
QWSInputMethod::FocusOut | 2 | The input widget loses focus. |
QWSInputMethod::Reset | 3 | The input method should be reset. |
QWSInputMethod::Destroyed | 4 | The input widget is destroyed. |
See also updateHandler().
Constructs a new input method.
Destructs this input method, uninstalling it if it is installed.
This virtual function allows subclasses of QWSInputMethod to handle key input from physical or virtual keyboards.
To block the event from further processing, return true when reimplementing this function; the default implementation returns false.
The key input is identified by its unicode, keycode (a Qt::Key value), modifiers (an OR combination of Qt::KeyboardModifiers), isPress telling whether the input is a key press or key release, and autoRepeat determining if the input is auto repeated.
See also QWSKeyboardHandler and Character Input.
This is an overloaded member function, provided for convenience.
This virtual function allows subclasses of QWSInputMethod to handle mouse input from physical or virtual pointer devices.
To block the event from further processing, return true when reimplementing this function; the default implementation returns false. The mouse event is specified by the given position, state and wheel parameters.
See also setInputResolution(), QWSMouseHandler, and Pointer Handling.
Returns the number of bits shifted to go from pointer resolution to screen resolution when filtering mouse events using the filter() function.
See also setInputResolution().
This virtual function allows subclasses of QWSInputMethod to handle mouse events within the preedit text.
The offset parameter specifies the position of the mouse event within the string, and state the type of the mouse event as described by the QWSServer::IMMouse enum. If state is less than 0, the mouse event is inside the associated widget, but outside the preedit text. When clicking in a different widget, the state is QWSServer::MouseOutside.
The default implementation resets the input method on all mouse presses.
See also sendPreeditString() and reset().
This virtual function allows subclasses of QWSInputMethod to receive replies to an input method query.
Internally, an input method query is passed encapsulated by an IMQuery event generated by the sendQuery() function. The queried property and the result is passed in the property and result parameters.
See also sendQuery() and QWSServer::sendIMQuery().
This virtual function allows subclasses of QWSInputMethod to reset the state of the input method.
The default implementation calls sendEvent() with empty preedit and commit strings, if the input method is in compose mode, i.e. the input method is actively composing a preedit string.
See also sendEvent().
Sends a QInputMethodEvent object encapsulating the given commitString, to the focus widget. This is a convenience function for the sendEvent() function.
If the specified replaceLength 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 replaceFromPosition relative to the start of the current preedit string.
This will cause the input method to leave compose mode, i.e. the input method will no longer be actively composing the preedit string.
See also sendEvent() and sendPreeditString().
Sends a QInputMethodEvent object to the focus widget. a
See also sendPreeditString(), sendCommitString(), and reset().
Sends a mouse event specified by the given position, state and wheel parameters.
The given position will be transformed if the screen coordinates do not match the pointer device coordinates.
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.
See also mouseHandler() and sendEvent().
Sends a QInputMethodEvent object encapsulating the given preeditString, to the focus widget. This is a convenience function for the sendEvent() function.
The specified selectionLength is the number of characters to be marked as selected (starting at the given cursorPosition). If selectionLength is negative, the text before cursorPosition is marked.
The preedit string is marked with QInputContext::PreeditFormat, and the selected part is marked with QInputContext::SelectionFormat.
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. the input method will no longer be actively composing the preedit string.
See also sendEvent() and sendCommitString().
Sends an input method query (internally encapsulated by a QWSEvent of the IMQuery type) for the specified property.
To receive responses to input method queries, reimplement the virtual queryResponse() function.
See also queryResponse() and QWSServer::sendIMQuery().
Sets and returns the number of bits shifted to go from pointer resolution to screen resolution when filtering mouse events using the filter() function.
If isHigh is true and the device has a pointer device resolution twice or more of the screen resolution, the positions passed to the filter() function will be presented at the higher resolution; otherwise the resolution will be equal to that of the screen resolution.
See also filter() and inputResolutionShift().
Handles update events including resets and focus changes.
The update events are specified by the given type which is one of the UpdateType enum values. Note that reimplementations of this function must call the base implementation for all cases that it does not handle itself.
See also UpdateType.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.1 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com