aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitem2/data/mapCoordinatesRect.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickitem2/data/mapCoordinatesRect.qml')
-rw-r--r--tests/auto/quick/qquickitem2/data/mapCoordinatesRect.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitem2/data/mapCoordinatesRect.qml b/tests/auto/quick/qquickitem2/data/mapCoordinatesRect.qml
index 2b856a27fc..c66d1e89b6 100644
--- a/tests/auto/quick/qquickitem2/data/mapCoordinatesRect.qml
+++ b/tests/auto/quick/qquickitem2/data/mapCoordinatesRect.qml
@@ -45,11 +45,21 @@ Item {
return Qt.rect(pos.x, pos.y, pos.width, pos.height)
}
+ function mapAToBRect(x, y, w, h) {
+ var pos = itemA.mapToItem(itemB, Qt.rect(x, y, w, h))
+ return Qt.rect(pos.x, pos.y, pos.width, pos.height)
+ }
+
function mapAFromB(x, y, w, h) {
var pos = itemA.mapFromItem(itemB, x, y, w, h)
return Qt.rect(pos.x, pos.y, pos.width, pos.height)
}
+ function mapAFromBRect(x, y, w, h) {
+ var pos = itemA.mapFromItem(itemB, Qt.rect(x, y, w, h))
+ return Qt.rect(pos.x, pos.y, pos.width, pos.height)
+ }
+
function mapAToNull(x, y, w, h) {
var pos = itemA.mapToItem(null, x, y, w, h)
return Qt.rect(pos.x, pos.y, pos.width, pos.height)