diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-05-09 12:07:55 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-05-23 13:41:01 +0200 |
commit | e430f1336881850a73a54a291e0276160d568212 (patch) | |
tree | f90342efb8df19f92aef075d251fbb2787da20dd /src/declarative/items/qsgtextinput_p_p.h | |
parent | 7aed0fc2d0176d82f9ebd10857d3d6fe7b24b026 (diff) |
Make QSGTextNode back-end for QML's TextInput
To get the benefit of different glyph node backends, the
TextInput item has now been moved over on SceneGraph's
TextNode instead of QPainter, and selections and
decorations are painted using QSGSimpleRects.
Diffstat (limited to 'src/declarative/items/qsgtextinput_p_p.h')
-rw-r--r-- | src/declarative/items/qsgtextinput_p_p.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/declarative/items/qsgtextinput_p_p.h b/src/declarative/items/qsgtextinput_p_p.h index 6561d28a31..6f69be5d69 100644 --- a/src/declarative/items/qsgtextinput_p_p.h +++ b/src/declarative/items/qsgtextinput_p_p.h @@ -65,7 +65,9 @@ QT_BEGIN_NAMESPACE -class Q_AUTOTEST_EXPORT QSGTextInputPrivate : public QSGImplicitSizePaintedItemPrivate +class QSGTextNode; + +class Q_AUTOTEST_EXPORT QSGTextInputPrivate : public QSGImplicitSizeItemPrivate { Q_DECLARE_PUBLIC(QSGTextInput) public: @@ -76,7 +78,7 @@ public: hscroll(0), oldScroll(0), oldValidity(false), focused(false), focusOnPress(true), showInputPanelOnFocus(true), clickCausedFocus(false), cursorVisible(false), autoScroll(true), selectByMouse(false), canPaste(false), hAlignImplicit(true), - selectPressed(false) + selectPressed(false), textNode(0) { #ifdef Q_OS_SYMBIAN if (QSysInfo::symbianVersion() == QSysInfo::SV_SF_1 || QSysInfo::symbianVersion() == QSysInfo::SV_SF_3) { @@ -106,6 +108,8 @@ public: int calculateTextWidth(); bool sendMouseEventToInputContext(QGraphicsSceneMouseEvent *event, QEvent::Type eventType); void updateInputMethodHints(); + void hideCursor(); + void showCursor(); QLineControl* control; @@ -122,6 +126,7 @@ public: QPointer<QDeclarativeComponent> cursorComponent; QPointer<QSGItem> cursorItem; QPointF pressPos; + QSGTextNode *textNode; int lastSelectionStart; int lastSelectionEnd; |