QWSInputMethod(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

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 isPress is TRUE this is a key press; otherwise it is a key release πŸ‘†
  • If autoRepeat is TRUE this 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::IMStart
  • QWSServer::IMCompose
  • QWSServer::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 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