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
QWaylandInputMethodEventBuilder Class Reference

#include <qwaylandinputmethodeventbuilder_p.h>

+ Collaboration diagram for QWaylandInputMethodEventBuilder:

Public Member Functions

 QWaylandInputMethodEventBuilder ()=default
 
 ~QWaylandInputMethodEventBuilder ()
 
void reset ()
 
void setCursorPosition (int32_t index, int32_t anchor)
 
void setDeleteSurroundingText (uint32_t beforeLength, uint32_t afterLength)
 
void addPreeditStyling (uint32_t index, uint32_t length, uint32_t style)
 
void setPreeditCursor (int32_t index)
 
QInputMethodEventbuildCommit (const QString &text)
 
QInputMethodEventbuildPreedit (const QString &text)
 

Static Public Member Functions

static int indexFromWayland (const QString &text, int length, int base=0)
 
static int indexToWayland (const QString &text, int length, int base=0)
 
static int trimmedIndexFromWayland (const QString &text, int length, int base=0)
 

Detailed Description

Definition at line 12 of file qwaylandinputmethodeventbuilder_p.h.

Constructor & Destructor Documentation

◆ QWaylandInputMethodEventBuilder()

QWaylandInputMethodEventBuilder::QWaylandInputMethodEventBuilder ( )
default

◆ ~QWaylandInputMethodEventBuilder()

QT_BEGIN_NAMESPACE QWaylandInputMethodEventBuilder::~QWaylandInputMethodEventBuilder ( )

Definition at line 22 of file qwaylandinputmethodeventbuilder.cpp.

Member Function Documentation

◆ addPreeditStyling()

void QWaylandInputMethodEventBuilder::addPreeditStyling ( uint32_t index,
uint32_t length,
uint32_t style )

Definition at line 48 of file qwaylandinputmethodeventbuilder.cpp.

References QPalette::Active, QList< T >::append(), QFont::Bold, QPalette::Highlight, QPalette::HighlightedText, palette, qApp, Qt::red, QTextCharFormat::setFontUnderline(), QTextCharFormat::SingleUnderline, QInputMethodEvent::TextFormat, and QTextCharFormat::WaveUnderline.

Referenced by QtWaylandClient::QWaylandTextInputv1::zwp_text_input_v1_preedit_styling(), and QtWaylandClient::QWaylandTextInputv2::zwp_text_input_v2_preedit_styling().

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

◆ buildCommit()

QInputMethodEvent * QWaylandInputMethodEventBuilder::buildCommit ( const QString & text)

Definition at line 95 of file qwaylandinputmethodeventbuilder.cpp.

References cursor, Qt::ImAbsolutePosition, Qt::ImAnchorPosition, Qt::ImCursorPosition, Qt::ImSurroundingText, indexFromWayland(), qAbs(), qMin(), QInputMethod::queryFocusObject(), QInputMethodEvent::Selection, QString::size(), and text.

Referenced by QtWaylandClient::QWaylandTextInputv1::zwp_text_input_v1_commit_string(), and QtWaylandClient::QWaylandTextInputv2::zwp_text_input_v2_commit_string().

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

◆ buildPreedit()

QInputMethodEvent * QWaylandInputMethodEventBuilder::buildPreedit ( const QString & text)

Definition at line 125 of file qwaylandinputmethodeventbuilder.cpp.

References QInputMethodEvent::Cursor, indexFromWayland(), QString::length(), and text.

Referenced by QtWaylandClient::QWaylandTextInputv1::zwp_text_input_v1_preedit_string(), and QtWaylandClient::QWaylandTextInputv2::zwp_text_input_v2_preedit_string().

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

◆ indexFromWayland()

int QWaylandInputMethodEventBuilder::indexFromWayland ( const QString & text,
int length,
int base = 0 )
static

Definition at line 274 of file qwaylandinputmethodeventbuilder.cpp.

References base, QString::fromUtf8(), QString::left(), QString::mid(), qMax(), text, and QString::toUtf8().

Referenced by buildCommit(), buildPreedit(), QWaylandTextInputPrivate::zwp_text_input_v2_set_surrounding_text(), QtWaylandClient::QWaylandTextInputv3::zwp_text_input_v3_delete_surrounding_text(), and QWaylandTextInputV3Private::zwp_text_input_v3_set_surrounding_text().

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

◆ indexToWayland()

int QWaylandInputMethodEventBuilder::indexToWayland ( const QString & text,
int length,
int base = 0 )
static

Definition at line 326 of file qwaylandinputmethodeventbuilder.cpp.

References base, QString::mid(), QByteArray::size(), text, and QString::toUtf8().

Referenced by QWaylandTextInputPrivate::sendInputMethodEvent(), QWaylandTextInputV3Private::sendInputMethodEvent(), QtWaylandClient::QWaylandTextInputv1::updateState(), QtWaylandClient::QWaylandTextInputv2::updateState(), and QtWaylandClient::QWaylandTextInputv3::updateState().

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

◆ reset()

void QWaylandInputMethodEventBuilder::reset ( )

Definition at line 26 of file qwaylandinputmethodeventbuilder.cpp.

References QList< T >::clear().

Referenced by QtWaylandClient::QWaylandTextInputv1::reset(), QtWaylandClient::QWaylandTextInputv2::reset(), QtWaylandClient::QWaylandTextInputv1::zwp_text_input_v1_commit_string(), QtWaylandClient::QWaylandTextInputv1::zwp_text_input_v1_preedit_string(), QtWaylandClient::QWaylandTextInputv2::zwp_text_input_v2_commit_string(), and QtWaylandClient::QWaylandTextInputv2::zwp_text_input_v2_preedit_string().

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

◆ setCursorPosition()

void QWaylandInputMethodEventBuilder::setCursorPosition ( int32_t index,
int32_t anchor )

Definition at line 36 of file qwaylandinputmethodeventbuilder.cpp.

Referenced by QtWaylandClient::QWaylandTextInputv1::zwp_text_input_v1_cursor_position(), and QtWaylandClient::QWaylandTextInputv2::zwp_text_input_v2_cursor_position().

+ Here is the caller graph for this function:

◆ setDeleteSurroundingText()

void QWaylandInputMethodEventBuilder::setDeleteSurroundingText ( uint32_t beforeLength,
uint32_t afterLength )

Definition at line 42 of file qwaylandinputmethodeventbuilder.cpp.

Referenced by QtWaylandClient::QWaylandTextInputv1::zwp_text_input_v1_delete_surrounding_text(), and QtWaylandClient::QWaylandTextInputv2::zwp_text_input_v2_delete_surrounding_text().

+ Here is the caller graph for this function:

◆ setPreeditCursor()

void QWaylandInputMethodEventBuilder::setPreeditCursor ( int32_t index)

Definition at line 90 of file qwaylandinputmethodeventbuilder.cpp.

Referenced by QtWaylandClient::QWaylandTextInputv1::zwp_text_input_v1_preedit_cursor(), and QtWaylandClient::QWaylandTextInputv2::zwp_text_input_v2_preedit_cursor().

+ Here is the caller graph for this function:

◆ trimmedIndexFromWayland()

int QWaylandInputMethodEventBuilder::trimmedIndexFromWayland ( const QString & text,
int length,
int base = 0 )
static

Definition at line 288 of file qwaylandinputmethodeventbuilder.cpp.

References base, ch, QString::fromUtf8(), i, QString::left(), QString::mid(), QByteArray::size(), text, and QString::toUtf8().

Referenced by QtWaylandClient::QWaylandTextInputv3::updateState().

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

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