equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
55 |
55 |
56 #ifndef QT_NO_IM |
56 #ifndef QT_NO_IM |
57 |
57 |
58 #include "qinputcontext.h" |
58 #include "qinputcontext.h" |
59 #include <qhash.h> |
59 #include <qhash.h> |
|
60 #include <qtimer.h> |
60 #include <private/qcore_symbian_p.h> |
61 #include <private/qcore_symbian_p.h> |
61 #include <private/qt_s60_p.h> |
62 #include <private/qt_s60_p.h> |
62 |
63 |
63 #include <fepbase.h> |
64 #include <fepbase.h> |
64 #include <aknedsts.h> |
65 #include <aknedsts.h> |
89 void setFocusWidget(QWidget * w); |
90 void setFocusWidget(QWidget * w); |
90 void widgetDestroyed(QWidget *w); |
91 void widgetDestroyed(QWidget *w); |
91 |
92 |
92 TCoeInputCapabilities inputCapabilities(); |
93 TCoeInputCapabilities inputCapabilities(); |
93 |
94 |
|
95 protected: |
|
96 void timerEvent(QTimerEvent *timerEvent); |
|
97 |
94 private: |
98 private: |
95 void commitCurrentString(bool triggeredBySymbian); |
99 void commitCurrentString(bool cancelFepTransaction); |
96 void updateHints(bool mustUpdateInputCapabilities); |
100 void updateHints(bool mustUpdateInputCapabilities); |
97 void applyHints(Qt::InputMethodHints hints); |
101 void applyHints(Qt::InputMethodHints hints); |
98 void applyFormat(QList<QInputMethodEvent::Attribute> *attributes); |
102 void applyFormat(QList<QInputMethodEvent::Attribute> *attributes); |
99 void queueInputCapabilitiesChanged(); |
103 void queueInputCapabilitiesChanged(); |
100 bool needsInputPanel(); |
104 bool needsInputPanel(); |
|
105 void commitTemporaryPreeditString(); |
101 |
106 |
102 private Q_SLOTS: |
107 private Q_SLOTS: |
103 void ensureInputCapabilitiesChanged(); |
108 void ensureInputCapabilitiesChanged(); |
104 |
109 |
105 // From MCoeFepAwareTextEditor |
110 // From MCoeFepAwareTextEditor |
120 void GetScreenCoordinatesForFepL(TPoint& aLeftSideOfBaseLine, TInt& aHeight, TInt& aAscent, |
125 void GetScreenCoordinatesForFepL(TPoint& aLeftSideOfBaseLine, TInt& aHeight, TInt& aAscent, |
121 TInt aDocumentPosition) const; |
126 TInt aDocumentPosition) const; |
122 private: |
127 private: |
123 void DoCommitFepInlineEditL(); |
128 void DoCommitFepInlineEditL(); |
124 MCoeFepAwareTextEditor_Extension1* Extension1(TBool& aSetToTrue); |
129 MCoeFepAwareTextEditor_Extension1* Extension1(TBool& aSetToTrue); |
125 void ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateEvent aEventType); |
130 void ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateEvent aEventType); |
126 |
131 |
127 // From MCoeFepAwareTextEditor_Extension1 |
132 // From MCoeFepAwareTextEditor_Extension1 |
128 public: |
133 public: |
129 void SetStateTransferingOwnershipL(MCoeFepAwareTextEditor_Extension1::CState* aState, TUid aTypeSafetyUid); |
134 void SetStateTransferingOwnershipL(MCoeFepAwareTextEditor_Extension1::CState* aState, TUid aTypeSafetyUid); |
130 MCoeFepAwareTextEditor_Extension1::CState* State(TUid aTypeSafetyUid); |
135 MCoeFepAwareTextEditor_Extension1::CState* State(TUid aTypeSafetyUid); |
144 bool m_pendingInputCapabilitiesChanged; |
149 bool m_pendingInputCapabilitiesChanged; |
145 int m_cursorVisibility; |
150 int m_cursorVisibility; |
146 int m_inlinePosition; |
151 int m_inlinePosition; |
147 MFepInlineTextFormatRetriever *m_formatRetriever; |
152 MFepInlineTextFormatRetriever *m_formatRetriever; |
148 MFepPointerEventHandlerDuringInlineEdit *m_pointerHandler; |
153 MFepPointerEventHandlerDuringInlineEdit *m_pointerHandler; |
149 int m_longPress; |
|
150 int m_cursorPos; |
154 int m_cursorPos; |
|
155 QBasicTimer m_tempPreeditStringTimeout; |
|
156 bool m_hasTempPreeditString; |
151 }; |
157 }; |
152 |
158 |
153 QT_END_NAMESPACE |
159 QT_END_NAMESPACE |
154 |
160 |
155 #endif // QT_NO_IM |
161 #endif // QT_NO_IM |