diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-02-24 03:17:13 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-02-24 03:47:46 (GMT) |
commit | 60f84b596476f88a39d0eb2c56dc9468805442aa (patch) | |
tree | 06b4e1e5ffd660a70f41cd03c3e753b7f2f311e7 /src/declarative/graphicsitems/qdeclarativetextinput_p.h | |
parent | a8a02cf8099f1269bc23495b60841031fbd36b0a (diff) | |
download | Qt-60f84b596476f88a39d0eb2c56dc9468805442aa.zip Qt-60f84b596476f88a39d0eb2c56dc9468805442aa.tar.gz Qt-60f84b596476f88a39d0eb2c56dc9468805442aa.tar.bz2 |
Add a 'CursorPosition' parameter to TextInput.positionAt().
Specifies whether positionAt should resolve to the nearest position
between characters or the position of the nearest character.
Change-Id: I9eb2db2f8dd2accb2d9844ff204fba0337e71876
Task-number: QTBUG-16070
Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextinput_p.h')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextinput_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index e1e66a9..c29be26 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -120,8 +120,14 @@ public: SelectWords }; + enum CursorPosition { + CursorBetweenCharacters, + CursorOnCharacter + }; + //Auxilliary functions needed to control the TextInput from QML Q_INVOKABLE int positionAt(int x) const; + Q_INVOKABLE Q_REVISION(1) int positionAt(int x, CursorPosition position); Q_INVOKABLE QRectF positionToRectangle(int pos) const; Q_INVOKABLE void moveCursorSelection(int pos); Q_INVOKABLE Q_REVISION(1) void moveCursorSelection(int pos, SelectionMode mode); |