CopperSpice API  1.9.2
QPlatformInputContext Class Reference

Represents the input method dependent data and composing state. More...

Inheritance diagram for QPlatformInputContext:
QObject

Public Methods

 QPlatformInputContext ()
 
virtual ~QPlatformInputContext ()
 
virtual void commit ()
 
void emitAnimatingChanged ()
 
void emitInputDirectionChanged (Qt::LayoutDirection newDirection)
 
void emitInputPanelVisibleChanged ()
 
void emitKeyboardRectChanged ()
 
void emitLocaleChanged ()
 
virtual bool filterEvent (const QEvent *event)
 
virtual bool hasCapability (Capability capability) const
 
virtual void hideInputPanel ()
 
virtual Qt::LayoutDirection inputDirection () const
 
bool inputMethodAccepted () const
 
virtual void invokeAction (QInputMethod::Action action, int cursorPosition)
 
virtual bool isAnimating () const
 
virtual bool isInputPanelVisible () const
 
virtual bool isValid () const
 
virtual QRectF keyboardRect () const
 
virtual QLocale locale () const
 
virtual void reset ()
 
virtual void setFocusObject (QObject *object)
 
virtual void showInputPanel ()
 
virtual void update (Qt::InputMethodQueries)
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &childName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Friends

class QApplication
 
class QInputMethod
 

Additional Inherited Members

- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 
- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, std::nullptr_t, const QObject *receiver, std::nullptr_t)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

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, the QPlatformInputContext is base a 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

Constructor & Destructor Documentation

QPlatformInputContext::QPlatformInputContext ( )

Additional documentation pending.

QPlatformInputContext::~QPlatformInputContext ( )
virtual

Additional documentation pending.

Method Documentation

void QPlatformInputContext::commit ( )
virtual

Additional documentation pending.

void QPlatformInputContext::emitAnimatingChanged ( )

This method emits the animatingChanged signal. This method must be called any time the animating property changes.

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

Additional documentation pending.

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.

void QPlatformInputContext::emitKeyboardRectChanged ( )

This method emits the keyboardRectangleChanged signal. This method must be called any time the keyboardRectangle property changes.

void QPlatformInputContext::emitLocaleChanged ( )

Additional documentation pending.

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.

bool QPlatformInputContext::hasCapability ( Capability  capability) const
virtual

Returns whether the implementation supports capability.

void QPlatformInputContext::hideInputPanel ( )
virtual

Request to hide input panel.

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

Additional documentation pending.

bool QPlatformInputContext::inputMethodAccepted ( ) const

Returns true if current focus object supports input method events.

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

Called when the word currently being composed in input item is tapped by the user. Input methods often use this information to offer more word suggestions to the user.

bool QPlatformInputContext::isAnimating ( ) const
virtual

This method can be reimplemented to return true whenever input method is animating shown or hidden. Default implementation returns false.

bool QPlatformInputContext::isInputPanelVisible ( ) const
virtual

Returns input panel visibility status. Default implementation returns false.

bool QPlatformInputContext::isValid ( ) const
virtual

Returns input context validity. Deriving implementations should return true.

QRectF QPlatformInputContext::keyboardRect ( ) const
virtual

This method can be reimplemented to return virtual keyboard rectangle in currently active window coordinates. Default implementation returns invalid rectangle.

QLocale QPlatformInputContext::locale ( ) const
virtual

Additional documentation pending.

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.

void QPlatformInputContext::setFocusObject ( QObject object)
virtual

This method gets called to notify updated focus to object.

Warning
Input methods must not call this method directly.
void QPlatformInputContext::showInputPanel ( )
virtual

Request to show input panel.

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

Notification on editor updates. Called by QInputMethod::update().