Home · API Reference · Modules
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Maliit::PreeditInjectionEvent Class Reference
Inheritance diagram for Maliit::PreeditInjectionEvent:
Inheritance graph
[legend]

Public Member Functions

 PreeditInjectionEvent (const QString &preedit)
 
 PreeditInjectionEvent (const QString &preedit, int eventCursorPosition)
 
virtual ~PreeditInjectionEvent ()
 
QString preedit () const
 
int eventCursorPosition () const
 
void setReplacement (int replacementStart, int replacementLength)
 
int replacementStart () const
 
int replacementLength () const
 

Static Public Member Functions

static QEvent::Type eventNumber ()
 

Protected Attributes

PreeditInjectionEventPrivate *const d_ptr
 

Detailed Description

Extension for preedit text inside text edits.

MPreeditInjectionEvent should be sent from text edit to input context and offer the word as preedit.

Constructor & Destructor Documentation

Maliit::PreeditInjectionEvent::PreeditInjectionEvent ( const QString &  preedit)

Default constructor.

Parameters
preeditThe word offered as preedit.
Maliit::PreeditInjectionEvent::PreeditInjectionEvent ( const QString &  preedit,
int  eventCursorPosition 
)

Constructor.

Parameters
preeditThe word offered as preedit.
eventCursorPositionThe expected cursor position inside preedit. The valid value is from 0 (at the beginning of the preedit) to the length of preedit (at the end of preedit).
Maliit::PreeditInjectionEvent::~PreeditInjectionEvent ( )
virtual

Destructor.

Member Function Documentation

int Maliit::PreeditInjectionEvent::eventCursorPosition ( ) const

Returns the expected cursor position inside preedit.

Note the eventCursorPosition is not the real cursor position, while it is the cursor position inside preedit which this event expects. The input context will decide whether and where to display cursor. The valid value is from 0 (at the beginning of the preedit) to the length of preedit (at the end of preedit). Other values indicate the cursor position unknown.

QEvent::Type Maliit::PreeditInjectionEvent::eventNumber ( )
static
QString Maliit::PreeditInjectionEvent::preedit ( ) const

Returns the offered preedit text.

int Maliit::PreeditInjectionEvent::replacementLength ( ) const

replacement length info as in QInputMethodEvent

int Maliit::PreeditInjectionEvent::replacementStart ( ) const

replacement start info as in QInputMethodEvent

void Maliit::PreeditInjectionEvent::setReplacement ( int  replacementStart,
int  replacementLength 
)

sets replacement information that should be used for QInputMethodEvent.

Member Data Documentation

PreeditInjectionEventPrivate* const Maliit::PreeditInjectionEvent::d_ptr
protected

Copyright © 2011 Nokia Corporation
Maliit