diff options
author | Nikita Krupenko <krnekit@gmail.com> | 2015-09-26 03:59:00 +0300 |
---|---|---|
committer | Nikita Krupenko <krnekit@gmail.com> | 2015-12-10 13:17:46 +0000 |
commit | 08327da795ee8c4b26441cc0de1a5c49bd5f2b39 (patch) | |
tree | 6eb2a84169fe1f06523ad66de9ad15bf747714d3 /src/quick/items/qquickitem_p.h | |
parent | 3f7b86b563eb92a813135cb35285dec1f05b51ef (diff) |
Add support for mapping between item's and global screen coordinates
Added to Item mapToGlobal() and mapFromGlobal() methods, that maps from
item's coordinate system to global screen coordinates and vise versa
and accessible from QML.
This allow to align window (which is a global object) in relation to
Qt Quick item object. For example, this may be helpful to add a popup to
a Qt Quick component.
[ChangeLog][QtQuick][QQuickItem] Added support for mapping item's
coordinates to global screen coordinates and vise versa.
Task-number: QTBUG-28668
Change-Id: I0a90838f26c53b16d7a76953577492a942674572
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/items/qquickitem_p.h')
-rw-r--r-- | src/quick/items/qquickitem_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 634aa2b658..127352aaa7 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -503,6 +503,8 @@ public: QTransform windowToItemTransform() const; QTransform itemToWindowTransform() const; void itemToParentTransform(QTransform &) const; + QTransform globalToWindowTransform() const; + QTransform windowToGlobalTransform() const; static bool focusNextPrev(QQuickItem *item, bool forward); static QQuickItem *nextTabChildItem(const QQuickItem *item, int start); |