5#ifndef ANDROIDINPUTCONTEXT_H
6#define ANDROIDINPUTCONTEXT_H
8#include <qpa/qplatforminputcontext.h>
21 CAP_MODE_CHARACTERS = 0x00001000,
22 CAP_MODE_SENTENCES = 0x00004000,
23 CAP_MODE_WORDS = 0x00002000
49 partialEndOffset = partialStartOffset = selectionEnd = selectionStart = startOffset = -1;
65 bool isValid()
const override {
return true; }
67 void reset()
override;
69 void update(Qt::InputMethodQueries queries)
override;
118 bool focusObjectIsComposing()
const;
119 void focusObjectStartComposing();
120 bool focusObjectStopComposing();
123 ExtractedText m_extractedText;
125 int m_composingTextStart;
126 int m_composingCursor;
128 HandleModes m_handleMode;
129 int m_batchEditNestingLevel;
131 QTimer m_hideCursorHandleTimer;
jboolean beginBatchEdit()
jboolean setSelection(jint start, jint end)
void touchDown(int x, int y)
void safeCall(const std::function< void()> &func, Qt::ConnectionType conType=Qt::BlockingQueuedConnection)
void longPress(int x, int y)
jboolean finishComposingText()
bool isValid() const override
Returns input context validity.
jint getCursorCapsMode(jint reqModes)
QString getSelectedText(jint flags)
bool isAnimating() const override
This function can be reimplemented to return true whenever input method is animating shown or hidden.
void hideSelectionHandles()
QString getTextAfterCursor(jint length, jint flags)
QRectF keyboardRect() const override
This function can be reimplemented to return virtual keyboard rectangle in currently active window co...
void reset() override
Method to be called when input method needs to be reset.
jboolean setComposingText(const QString &text, jint newCursorPosition)
void hideInputPanel() override
Request to hide input panel.
void setFocusObject(QObject *object) override
This virtual method gets called to notify updated focus to object.
jboolean commitText(const QString &text, jint newCursorPosition)
jboolean setComposingRegion(jint start, jint end)
static QAndroidInputContext * androidInputContext()
void updateSelectionHandles()
void update(Qt::InputMethodQueries queries) override
Notification on editor updates.
QString getTextBeforeCursor(jint length, jint flags)
void sendShortcut(const QKeySequence &)
void invokeAction(QInputMethod::Action action, int cursorPosition) override
Called when the word currently being composed in the input item is tapped by the user.
void updateCursorPosition()
jboolean deleteSurroundingText(jint leftLength, jint rightLength)
void handleLocationChanged(int handleId, int x, int y)
void showInputPanel() override
Request to show input panel.
const ExtractedText & getExtractedText(jint hintMaxChars, jint hintMaxLines, jint flags)
bool isInputPanelVisible() const override
Returns input panel visibility status.
The QKeySequence class encapsulates a key sequence as used by shortcuts.
The QPlatformInputContext class abstracts the input method dependent data and composing state.
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
void clear()
Clears the contents of the string and makes it null.
Combined button and popup list for selecting options.
@ BlockingQueuedConnection
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLint GLint GLint GLint GLint x
[0]
GLenum GLuint GLenum GLsizei length