QWSInputMethod(3qt)
QWSInputMethod π (the 3qt one, bestie)
okay so like. this is QWSInputMethod(3qt) β the international input methods situation for Qt/Embedded. and yes i know, "input method" sounds boring but it's literally the thing that makes keyboards go brrr in other languages so sit down, hydrate, and let's go β¨
πΈ NAME πΈ
QWSInputMethod β International input methods for Qt/Embedded π¦
β¨ SYNOPSIS β¨
#include <qwindowsystem_qws.h>
π Public Members
QWSInputMethod ()
virtual ~QWSInputMethod ()
virtual bool filter ( int unicode, int keycode, int modifiers, bool
isPress, bool autoRepeat ) = 0
virtual void reset ()
virtual void setMicroFocus ( int x, int y )
virtual void setFont ( const QFont & )
π Protected Members
void sendIMEvent ( QWSServer::IMState state, const QString & txt, int
cpos, int selLen = 0 )
π DESCRIPTION π
The QWSInputMethod class provides international input methods for Qt/Embedded. it's giving "keyboard but make it multilingual" π
Subclass this class to implement your own input method. that's the whole assignment bestie, go off π
An input method consists of two things, and i need you to remember both:
- a keyboard filter π₯
- optionally a graphical interface π¨
The keyboard filter intercepts key events from physical or virtual keyboards by implementing the filter() function. like a bouncer at the club door but for keystrokes π
Use sendIMEvent() to send composition events. Composition starts with the input method sending an IMStart event, followed by a number of IMCompose events and ending with an IMEnd event β or when the virtual reset() function is called. so it's a whole little arc, a beginning, a middle, and an end, very three-act structure of it π¬
The functions setMicroFocus() and setFont() can be reimplemented to receive more information about the state of the focus widget. nosy? yes. useful? also yes π«Ά
Use QWSServer::setCurrentInputMethod() to install an input method. that's the "make it official" button β¨
See also Qt/Embedded.
π§ MEMBER FUNCTION DOCUMENTATION π§
QWSInputMethod::QWSInputMethod ()
Constructs a new input method. brand new, fresh out the box, main character energy β
QWSInputMethod::~QWSInputMethod () [virtual]
Destructs the input method β uninstalling it if it is currently installed. it knows how to clean up after itself, unlike some people π
bool QWSInputMethod::filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) [pure virtual]
β οΈ This function must be implemented in subclasses β it's pure virtual, so there is literally no default, bestie. you have to write it.
It handles key input from physical or virtual keyboards. Returning TRUE will block the event from further processing. so TRUE = "i got this, everybody else back off" π
Here's the tea on the args:
- The Unicode value is given in
unicodeπ - The key code is in
keycodeβ¨οΈ - Keyboard modifiers are OR-ed together in
modifiersπ - If
isPressisTRUEthis is a key press; otherwise it is a key release π - If
autoRepeatisTRUEthis is an auto-repeated key press π
All normal key events should be blocked while in compose mode (i.e., between IMStart and IMEnd). no interruptions while the composition is cooking, periodt π³
void QWSInputMethod::reset () [virtual]
Implemented in subclasses to reset the state of the input method. factory reset but emotionally π§Ό
void QWSInputMethod::sendIMEvent ( QWSServer::IMState state, const QString & txt, int cpos, int selLen = 0 ) [protected]
Causes a QIMEvent to be sent to the focus widget. π¬
state may be one of:
QWSServer::IMStartQWSServer::IMComposeQWSServer::IMEnd
txt is the text being composed (or the finished text if state is IMEnd). βοΈ
cpos is the current cursor position. π
If state is IMCompose, selLen is the number of characters in the composition string (starting at cpos) that should be marked as selected by the input widget receiving the event. highlighting the chosen ones, iconic π
void QWSInputMethod::setFont ( const QFont & ) [virtual]
Implemented in subclasses to handle font changes in the focus widget. ποΈ
β οΈ This functionality is provided for future expansion; it is not used in this version of Qt/Embedded. so likeβ¦ it's a placeholder. it's the empty seat at the table. don't come for it πͺ
void QWSInputMethod::setMicroFocus ( int x, int y ) [virtual]
Implemented in subclasses to handle microFocusHint changes in the focus widget. x and y are the global coordinates of the text cursor. π
π SEE ALSO π
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.
π« AUTHOR π«
Generated automatically from the source code. (so technically the author is a script. we love a bot with range π€)
π BUGS π
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. π«Ά
The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. (ngl that last part is a little shady but okay, we move π)
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qwsinputmethod.3qt) and the Qt version (3.3.8).
and that's the whole page bestie, tysm for reading π₯Ή this was brought to you by Trolltech AS, dated 2 February 2007, documenting Qt version 3.3.8 β and remember, if you're reading QWSInputMethod(3qt), you're officially in your input-method era. slay, go compose something beautiful πβ¨ππ¦πΈπ
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms