4
#include <mabstractinputmethod.h>
8
namespace inputmethod {
10
class InputMethodPrivate ;
12
class InputMethod : public MAbstractInputMethod {
14
Q_PROPERTY( int screenWidth READ screenWidth NOTIFY screenWidthChanged )
15
Q_PROPERTY( int screenHeight READ screenHeight NOTIFY screenHeightChanged )
16
Q_PROPERTY( QRect cursorRect READ cursorRect NOTIFY cursorRectChanged )
19
void screenWidthChanged( int width ) ;
20
void screenHeightChanged( int height ) ;
21
void cursorRectChanged( QRect& cursorRect ) ;
25
explicit InputMethod( MAbstractInputMethodHost *host, QWidget *mainWindow ) ;
26
virtual ~InputMethod() ;
30
virtual void setPreedit( const QString &preeditString, int cursorPos ) ;
31
virtual void update() ;
32
virtual void reset() ;
33
virtual void handleMouseClickOnPreedit( const QPoint &pos, const QRect &preeditRect ) ;
34
virtual void handleFocusChange( bool focusIn ) ;
35
virtual void handleVisualizationPriorityChange( bool priority ) ;
36
virtual void handleAppOrientationAboutToChange( int angle ) ;
37
virtual void handleAppOrientationChanged( int angle) ;
38
virtual void setToolbar( QSharedPointer<const MToolbarData> toolbar ) ;
39
virtual void processKeyEvent( QEvent::Type keyType, Qt::Key keyCode, Qt::KeyboardModifiers modifiers, const QString& text, bool autoRepeat, int count, quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time) ;
40
virtual void setState( const QSet<MInputMethod::HandlerState> &state ) ;
41
virtual void handleClientChange() ;
42
virtual void switchContext( MInputMethod::SwitchDirection direction, bool enableAnimation ) ;
43
virtual QList<MInputMethodSubView> subViews( MInputMethod::HandlerState state = MInputMethod::OnScreen ) const ;
44
virtual void setActiveSubView( const QString &subViewId, MInputMethod::HandlerState state = MInputMethod::OnScreen ) ;
45
virtual QString activeSubView( MInputMethod::HandlerState state = MInputMethod::OnScreen ) const ;
46
virtual void showLanguageNotification() ;
47
virtual void setKeyOverrides( const QMap<QString, QSharedPointer<MKeyOverride> > &overrides ) ;
48
virtual bool imExtensionEvent( MImExtensionEvent *event) ;
53
Q_INVOKABLE void setScreenRegion( const QRect &area ) ;
54
Q_INVOKABLE void setInputMethodArea( const QRect &area ) ;
55
Q_INVOKABLE void sendCommit( const QString& text ) ;
58
Q_DISABLE_COPY( InputMethod ) ;
59
Q_DECLARE_PRIVATE( InputMethod ) ;
60
InputMethodPrivate* const d_ptr ;