~maliit-team/maliit-plugin-jp/trunk

« back to all changes in this revision

Viewing changes to skeleton/mallit/inputmethod.h

  • Committer: liang
  • Date: 2011-07-20 17:19:53 UTC
  • Revision ID: git-v1:c3d107a6b280a8d2c071bb1df794c7b0a4d4c703
package done

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef INPUTMETHOD_H
2
 
#define INPUTMETHOD_H
3
 
 
4
 
#include <mabstractinputmethod.h>
5
 
 
6
 
#include <QRect>
7
 
 
8
 
namespace inputmethod {
9
 
 
10
 
class InputMethodPrivate ;
11
 
 
12
 
class InputMethod : public MAbstractInputMethod {
13
 
    Q_OBJECT
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 )
17
 
 
18
 
signals :
19
 
    void screenWidthChanged( int width ) ;
20
 
    void screenHeightChanged( int height ) ;
21
 
    void cursorRectChanged( QRect& cursorRect ) ;
22
 
    //void keyEvent() ;
23
 
 
24
 
public :
25
 
    explicit InputMethod( MAbstractInputMethodHost *host, QWidget *mainWindow ) ;
26
 
    virtual ~InputMethod() ;
27
 
 
28
 
    virtual void show() ;
29
 
    virtual void hide() ;
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) ;
49
 
 
50
 
    int screenWidth() ;
51
 
    int screenHeight() ;
52
 
    QRect& cursorRect() ;
53
 
    Q_INVOKABLE void setScreenRegion( const QRect &area ) ;
54
 
    Q_INVOKABLE void setInputMethodArea( const QRect &area ) ;
55
 
    Q_INVOKABLE void sendCommit( const QString& text ) ;
56
 
 
57
 
private :
58
 
    Q_DISABLE_COPY( InputMethod ) ;
59
 
    Q_DECLARE_PRIVATE( InputMethod ) ;
60
 
    InputMethodPrivate* const d_ptr ;
61
 
} ;
62
 
 
63
 
}
64
 
#endif