Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QPlatformInputContext Class Reference

The QPlatformInputContext class abstracts the input method dependent data and composing state. More...

#include <qplatforminputcontext.h>

+ Inheritance diagram for QPlatformInputContext:
+ Collaboration diagram for QPlatformInputContext:

Public Types

enum  Capability { HiddenTextCapability = 0x1 }
 

Public Member Functions

 QPlatformInputContext ()
 
 ~QPlatformInputContext ()
 
virtual bool isValid () const
 Returns input context validity.
 
virtual bool hasCapability (Capability capability) const
 Returns whether the implementation supports capability.
 
virtual void reset ()
 Method to be called when input method needs to be reset.
 
virtual void commit ()
 
virtual void update (Qt::InputMethodQueries)
 Notification on editor updates.
 
virtual void invokeAction (QInputMethod::Action, int cursorPosition)
 Called when the word currently being composed in the input item is tapped by the user.
 
virtual bool filterEvent (const QEvent *event)
 This function can be reimplemented to filter input events.
 
virtual QRectF keyboardRect () const
 This function can be reimplemented to return virtual keyboard rectangle in currently active window coordinates.
 
void emitKeyboardRectChanged ()
 Active QPlatformInputContext is responsible for providing keyboardRectangle property to QInputMethod.
 
virtual bool isAnimating () const
 This function can be reimplemented to return true whenever input method is animating shown or hidden.
 
void emitAnimatingChanged ()
 Active QPlatformInputContext is responsible for providing animating property to QInputMethod.
 
virtual void showInputPanel ()
 Request to show input panel.
 
virtual void hideInputPanel ()
 Request to hide input panel.
 
virtual bool isInputPanelVisible () const
 Returns input panel visibility status.
 
void emitInputPanelVisibleChanged ()
 Active QPlatformInputContext is responsible for providing visible property to QInputMethod.
 
virtual QLocale locale () const
 
void emitLocaleChanged ()
 
virtual Qt::LayoutDirection inputDirection () const
 
void emitInputDirectionChanged (Qt::LayoutDirection newDirection)
 
virtual void setFocusObject (QObject *object)
 This virtual method gets called to notify updated focus to object.
 
bool inputMethodAccepted () const
 Returns true if current focus object supports input method events.
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
void killTimer (Qt::TimerId id)
 
template<typename T >
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 

Static Public Member Functions

static void setSelectionOnFocusObject (const QPointF &anchorPos, const QPointF &cursorPos)
 QPlatformInputContext::setSelectionOnFocusObject.
 
static QVariant queryFocusObject (Qt::InputMethodQuery query, QPointF position)
 QPlatformInputContext::queryFocusObject.
 
static QRectF inputItemRectangle ()
 QPlatformInputContext::inputItemRectangle.
 
static QRectF inputItemClipRectangle ()
 QPlatformInputContext::inputItemClipRectangle.
 
static QRectF cursorRectangle ()
 QPlatformInputContext::cursorRectangle.
 
static QRectF anchorRectangle ()
 QPlatformInputContext::anchorRectangle.
 
static QRectF keyboardRectangle ()
 QPlatformInputContext::keyboardRectangle.
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 

Friends

class QGuiApplication
 
class QGuiApplicationPrivate
 
class QInputMethod
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Detailed Description

The QPlatformInputContext class abstracts the input method dependent data and composing state.

Since
5.0

\preliminary

An input method is responsible for inputting complex text that cannot be inputted via simple keymap. It converts a sequence of input events (typically key events) into a text string through the input method specific converting process. The class of the processes are widely ranging from simple finite state machine to complex text translator that pools a whole paragraph of a text with text editing capability to perform grammar and semantic analysis.

To abstract such different input method specific intermediate information, Qt offers the QPlatformInputContext as base class. The concept is well known as 'input context' in the input method domain. An input context is created for a text widget in response to a demand. It is ensured that an input context is prepared for an input method before input to a text widget.

QPlatformInputContext provides an interface the actual input methods can derive from by reimplementing methods.

See also
QInputMethod

Definition at line 23 of file qplatforminputcontext.h.

Member Enumeration Documentation

◆ Capability

Enumerator
HiddenTextCapability 

Definition at line 29 of file qplatforminputcontext.h.

Constructor & Destructor Documentation

◆ QPlatformInputContext()

QPlatformInputContext::QPlatformInputContext ( )

Definition at line 47 of file qplatforminputcontext.cpp.

References inputDirection(), QMetaObject::invokeMethod(), and Qt::QueuedConnection.

+ Here is the call graph for this function:

◆ ~QPlatformInputContext()

QPlatformInputContext::~QPlatformInputContext ( )

Definition at line 60 of file qplatforminputcontext.cpp.

Member Function Documentation

◆ anchorRectangle()

QRectF QPlatformInputContext::anchorRectangle ( )
static

QPlatformInputContext::anchorRectangle.

Returns the anchor rectangle for the currently active window and input methiod in native window coordinates.

Definition at line 337 of file qplatforminputcontext.cpp.

References anchorRectangle(), QGuiApplication::focusWindow(), QGuiApplication::inputMethod(), and QHighDpi::toNativePixels().

Referenced by anchorRectangle(), QAndroidInputContext::handleLocationChanged(), and QAndroidInputContext::updateSelectionHandles().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ commit()

void QPlatformInputContext::commit ( )
virtual

Reimplemented in QIBusPlatformInputContext, QAndroidInputContext, QCocoaInputContext, QIOSInputContext, QQnxInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 91 of file qplatforminputcontext.cpp.

Referenced by QInputMethod::commit().

+ Here is the caller graph for this function:

◆ cursorRectangle()

QRectF QPlatformInputContext::cursorRectangle ( )
static

QPlatformInputContext::cursorRectangle.

Returns the cursor rectangle for the currently active window and input methiod in native window coordinates.

Definition at line 325 of file qplatforminputcontext.cpp.

References cursorRectangle(), QGuiApplication::focusWindow(), QGuiApplication::inputMethod(), and QHighDpi::toNativePixels().

Referenced by cursorRectangle(), QAndroidInputContext::handleLocationChanged(), QAndroidInputContext::touchDown(), and QAndroidInputContext::updateSelectionHandles().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ emitAnimatingChanged()

void QPlatformInputContext::emitAnimatingChanged ( )

Active QPlatformInputContext is responsible for providing animating property to QInputMethod.

In addition of providing the value in isAnimation function, it also needs to call this emit function whenever the property changes.

Definition at line 161 of file qplatforminputcontext.cpp.

References emit, and QGuiApplication::inputMethod().

+ Here is the call graph for this function:

◆ emitInputDirectionChanged()

void QPlatformInputContext::emitInputDirectionChanged ( Qt::LayoutDirection newDirection)

Definition at line 216 of file qplatforminputcontext.cpp.

References emit, and QGuiApplication::inputMethod().

Referenced by emitLocaleChanged(), and PlatformInputContext::setInputDirection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ emitInputPanelVisibleChanged()

void QPlatformInputContext::emitInputPanelVisibleChanged ( )

Active QPlatformInputContext is responsible for providing visible property to QInputMethod.

In addition of providing the value in isInputPanelVisible function, it also needs to call this emit function whenever the property changes.

Definition at line 193 of file qplatforminputcontext.cpp.

References emit, and QGuiApplication::inputMethod().

Referenced by QtAndroidInput::keyboardVisibilityChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ emitKeyboardRectChanged()

void QPlatformInputContext::emitKeyboardRectChanged ( )

Active QPlatformInputContext is responsible for providing keyboardRectangle property to QInputMethod.

In addition of providing the value in keyboardRect function, it also needs to call this emit function whenever the property changes.

Definition at line 142 of file qplatforminputcontext.cpp.

References emit, and QGuiApplication::inputMethod().

Referenced by QtAndroidInput::keyboardGeometryChanged(), and QtAndroidInput::keyboardVisibilityChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ emitLocaleChanged()

void QPlatformInputContext::emitLocaleChanged ( )

Definition at line 203 of file qplatforminputcontext.cpp.

References emit, emitInputDirectionChanged(), inputDirection(), and QGuiApplication::inputMethod().

Referenced by QIBusPlatformInputContext::globalEngineChanged(), QWindowsInputContext::handleInputLanguageChanged(), PlatformInputContext::setInputDirection(), and QCocoaInputContext::updateLocale().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ filterEvent()

bool QPlatformInputContext::filterEvent ( const QEvent * event)
virtual

This function can be reimplemented to filter input events.

Return true if the event has been consumed. Otherwise, the unfiltered event will be forwarded to widgets as ordinary way. Although the input events have accept() and ignore() methods, leave it untouched.

Reimplemented in QComposeInputContext, QIBusPlatformInputContext, QQnxInputContext, and QQnxInputContext.

Definition at line 122 of file qplatforminputcontext.cpp.

References Q_UNUSED.

◆ hasCapability()

bool QPlatformInputContext::hasCapability ( Capability capability) const
virtual

Returns whether the implementation supports capability.

Since
5.4

Reimplemented in QIBusPlatformInputContext, and QWindowsInputContext.

Definition at line 77 of file qplatforminputcontext.cpp.

References Q_UNUSED.

Referenced by platformSupportsHiddenText().

+ Here is the caller graph for this function:

◆ hideInputPanel()

void QPlatformInputContext::hideInputPanel ( )
virtual

Request to hide input panel.

Reimplemented in QAndroidInputContext, QIOSInputContext, QQnxInputContext, QQnxInputContext, QWasmInputContext, QWindowsInputContext, PlatformInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 176 of file qplatforminputcontext.cpp.

Referenced by QInputMethod::hide().

+ Here is the caller graph for this function:

◆ inputDirection()

Qt::LayoutDirection QPlatformInputContext::inputDirection ( ) const
virtual

Reimplemented in PlatformInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 211 of file qplatforminputcontext.cpp.

References locale().

Referenced by QPlatformInputContext(), emitLocaleChanged(), QInputMethod::inputDirection(), and QtWaylandClient::QWaylandInputContext::inputDirection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inputItemClipRectangle()

QRectF QPlatformInputContext::inputItemClipRectangle ( )
static

QPlatformInputContext::inputItemClipRectangle.

Returns the input item clip rectangle for the currently active window and input methiod in native window coordinates.

Definition at line 313 of file qplatforminputcontext.cpp.

References QGuiApplication::focusWindow(), inputItemClipRectangle(), QGuiApplication::inputMethod(), and QHighDpi::toNativePixels().

Referenced by inputItemClipRectangle(), and QAndroidInputContext::touchDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inputItemRectangle()

QRectF QPlatformInputContext::inputItemRectangle ( )
static

QPlatformInputContext::inputItemRectangle.

Returns the input item rectangle for the currently active window and input methiod in native window coordinates.

Definition at line 300 of file qplatforminputcontext.cpp.

References QGuiApplication::focusWindow(), QInputMethod::inputItemRectangle(), QInputMethod::inputItemTransform(), QGuiApplication::inputMethod(), QTransform::mapRect(), and QHighDpi::toNativePixels().

Referenced by screenInputItemRectangle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inputMethodAccepted()

◆ invokeAction()

void QPlatformInputContext::invokeAction ( QInputMethod::Action action,
int cursorPosition )
virtual

Called when the word currently being composed in the input item is tapped by the user.

Input methods often use this information to offer more word suggestions to the user.

Reimplemented in QIBusPlatformInputContext, QAndroidInputContext, PlatformInputContext, QWindowsInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 107 of file qplatforminputcontext.cpp.

References QInputMethod::Click, Q_UNUSED, and reset().

Referenced by QInputMethod::invokeAction(), and QWindowsInputContext::invokeAction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAnimating()

bool QPlatformInputContext::isAnimating ( ) const
virtual

This function can be reimplemented to return true whenever input method is animating shown or hidden.

Default implementation returns false.

Reimplemented in QAndroidInputContext, and QIOSInputContext.

Definition at line 151 of file qplatforminputcontext.cpp.

Referenced by QInputMethod::isAnimating().

+ Here is the caller graph for this function:

◆ isInputPanelVisible()

bool QPlatformInputContext::isInputPanelVisible ( ) const
virtual

Returns input panel visibility status.

Default implementation returns false.

Reimplemented in QAndroidInputContext, QIOSInputContext, QQnxInputContext, QQnxInputContext, QWindowsInputContext, PlatformInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 183 of file qplatforminputcontext.cpp.

Referenced by QtWaylandClient::QWaylandInputContext::isInputPanelVisible(), and QInputMethod::isVisible().

+ Here is the caller graph for this function:

◆ isValid()

bool QPlatformInputContext::isValid ( ) const
virtual

Returns input context validity.

Deriving implementations should return true.

Reimplemented in QComposeInputContext, QIBusPlatformInputContext, QAndroidInputContext, QCocoaInputContext, QIOSInputContext, QQnxInputContext, QQnxInputContext, QWasmInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 67 of file qplatforminputcontext.cpp.

Referenced by QPlatformInputContextFactory::create(), and QtWaylandClient::QWaylandIntegration::reconfigureInputContext().

+ Here is the caller graph for this function:

◆ keyboardRect()

QRectF QPlatformInputContext::keyboardRect ( ) const
virtual

This function can be reimplemented to return virtual keyboard rectangle in currently active window coordinates.

Default implementation returns invalid rectangle.

Reimplemented in QAndroidInputContext, QIOSInputContext, QQnxInputContext, QQnxInputContext, QWindowsInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 132 of file qplatforminputcontext.cpp.

Referenced by QtWaylandClient::QWaylandInputContext::keyboardRect(), and QInputMethod::keyboardRectangle().

+ Here is the caller graph for this function:

◆ keyboardRectangle()

QRectF QPlatformInputContext::keyboardRectangle ( )
static

QPlatformInputContext::keyboardRectangle.

Returns the keyboard rectangle for the currently active window and input methiod in native window coordinates.

Definition at line 349 of file qplatforminputcontext.cpp.

References QGuiApplication::focusWindow(), QGuiApplication::inputMethod(), keyboardRectangle(), and QHighDpi::toNativePixels().

Referenced by keyboardRectangle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ locale()

QLocale QPlatformInputContext::locale ( ) const
virtual

Reimplemented in QIBusPlatformInputContext, QCocoaInputContext, QIOSInputContext, QQnxInputContext, QQnxInputContext, QWindowsInputContext, PlatformInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 198 of file qplatforminputcontext.cpp.

References QLocale::system().

Referenced by QComposeInputContext::ensureInitialized(), inputDirection(), QInputMethod::locale(), QIBusPlatformInputContext::locale(), and QtWaylandClient::QWaylandInputContext::locale().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ queryFocusObject()

QVariant QPlatformInputContext::queryFocusObject ( Qt::InputMethodQuery query,
QPointF nativePosition )
static

QPlatformInputContext::queryFocusObject.

Queries the current foucus object with a window position in native pixels.

Definition at line 286 of file qplatforminputcontext.cpp.

References QGuiApplication::focusWindow(), QHighDpi::fromNativePixels(), QInputMethod::inputItemTransform(), QGuiApplication::inputMethod(), QTransform::inverted(), position(), and QInputMethod::queryFocusObject().

Referenced by QAndroidInputContext::touchDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset()

void QPlatformInputContext::reset ( )
virtual

Method to be called when input method needs to be reset.

Called by QInputMethod::reset(). No further QInputMethodEvents should be sent as response.

Reimplemented in QComposeInputContext, QIBusPlatformInputContext, QAndroidInputContext, QCocoaInputContext, QIOSInputContext, QQnxInputContext, QQnxInputContext, QWindowsInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 87 of file qplatforminputcontext.cpp.

Referenced by invokeAction(), QInputMethod::reset(), and QtWaylandClient::QWaylandInputContext::reset().

+ Here is the caller graph for this function:

◆ setFocusObject()

void QPlatformInputContext::setFocusObject ( QObject * object)
virtual

This virtual method gets called to notify updated focus to object.

Warning
Input methods must not call this function directly.

Reimplemented in QComposeInputContext, QIBusPlatformInputContext, QAndroidInputContext, QCocoaInputContext, QIOSInputContext, QQnxInputContext, QQnxInputContext, QWindowsInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 229 of file qplatforminputcontext.cpp.

References Q_UNUSED.

Referenced by QGuiApplicationPrivate::_q_updateFocusObject().

+ Here is the caller graph for this function:

◆ setSelectionOnFocusObject()

void QPlatformInputContext::setSelectionOnFocusObject ( const QPointF & nativeAnchorPos,
const QPointF & nativeCursorPos )
static

QPlatformInputContext::setSelectionOnFocusObject.

Parameters
anchorPosBeginning of selection in currently active window native coordinates
cursorPosEnd of selection in currently active window native coordinates

Definition at line 254 of file qplatforminputcontext.cpp.

References cursor, focus, QHighDpi::fromNativePixels(), Qt::ImCursorPosition, QInputMethod::inputItemTransform(), QGuiApplication::inputMethod(), QTransform::inverted(), qApp, QInputMethod::queryFocusObject(), QInputMethodEvent::Selection, QCoreApplication::sendEvent(), and window().

Referenced by QAndroidInputContext::longPress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showInputPanel()

void QPlatformInputContext::showInputPanel ( )
virtual

Request to show input panel.

Reimplemented in QAndroidInputContext, QIOSInputContext, QQnxInputContext, QQnxInputContext, QWasmInputContext, QWindowsInputContext, PlatformInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 169 of file qplatforminputcontext.cpp.

Referenced by QInputMethod::show().

+ Here is the caller graph for this function:

◆ update()

void QPlatformInputContext::update ( Qt::InputMethodQueries )
virtual

Notification on editor updates.

Called by QInputMethod::update().

Reimplemented in QAndroidInputContext, QComposeInputContext, QIBusPlatformInputContext, QIOSInputContext, QQnxInputContext, QWasmInputContext, QWindowsInputContext, PlatformInputContext, QtWaylandClient::QWaylandInputContext, and QtWaylandClient::QWaylandInputMethodContext.

Definition at line 98 of file qplatforminputcontext.cpp.

Referenced by QInputMethod::update(), QComposeInputContext::update(), and QWasmInputContext::update().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QGuiApplication

friend class QGuiApplication
friend

Definition at line 72 of file qplatforminputcontext.h.

◆ QGuiApplicationPrivate

friend class QGuiApplicationPrivate
friend

Definition at line 73 of file qplatforminputcontext.h.

◆ QInputMethod

friend class QInputMethod
friend

Definition at line 74 of file qplatforminputcontext.h.


The documentation for this class was generated from the following files: