diff options
Diffstat (limited to 'tests/auto/quick/qquickitem2/data/mapCoordinates.qml')
-rw-r--r-- | tests/auto/quick/qquickitem2/data/mapCoordinates.qml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitem2/data/mapCoordinates.qml b/tests/auto/quick/qquickitem2/data/mapCoordinates.qml index 596dedab90..3e34633338 100644 --- a/tests/auto/quick/qquickitem2/data/mapCoordinates.qml +++ b/tests/auto/quick/qquickitem2/data/mapCoordinates.qml @@ -49,11 +49,21 @@ Item { return Qt.point(pos.x, pos.y) } + function mapAToBPoint(x, y) { + var pos = itemA.mapToItem(itemB, Qt.point(x, y)) + return Qt.point(pos.x, pos.y) + } + function mapAFromB(x, y) { var pos = itemA.mapFromItem(itemB, x, y) return Qt.point(pos.x, pos.y) } + function mapAFromBPoint(x, y) { + var pos = itemA.mapFromItem(itemB, Qt.point(x, y)) + return Qt.point(pos.x, pos.y) + } + function mapAToNull(x, y) { var pos = itemA.mapToItem(null, x, y) return Qt.point(pos.x, pos.y) @@ -69,11 +79,21 @@ Item { return Qt.point(pos.x, pos.y) } + function mapAToGlobalPoint(x, y) { + var pos = itemA.mapToGlobal(Qt.point(x, y)) + return Qt.point(pos.x, pos.y) + } + function mapAFromGlobal(x, y) { var pos = itemA.mapFromGlobal(x, y) return Qt.point(pos.x, pos.y) } + function mapAFromGlobalPoint(x, y) { + var pos = itemA.mapFromGlobal(Qt.point(x, y)) + return Qt.point(pos.x, pos.y) + } + function mapOrphanToGlobal(x, y) { var obj = itemComponent.createObject(null); var pos = obj.mapToGlobal(x, y) |