summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetextinput_p.h
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-02-24 03:17:13 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2011-02-24 03:47:46 (GMT)
commit60f84b596476f88a39d0eb2c56dc9468805442aa (patch)
tree06b4e1e5ffd660a70f41cd03c3e753b7f2f311e7 /src/declarative/graphicsitems/qdeclarativetextinput_p.h
parenta8a02cf8099f1269bc23495b60841031fbd36b0a (diff)
downloadQt-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.h6
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);