diff options
author | Keränen Pasi <pasi.keranen@digia.com> | 2013-11-18 12:33:13 +0200 |
---|---|---|
committer | Pasi Keränen <pasi.keranen@digia.com> | 2013-11-19 09:34:14 +0200 |
commit | 96995bda0da7ecf99d2ac4a4e417545c3506bf02 (patch) | |
tree | 7fd0bcf92bf9abe612fe637be5aabcf29f0eaa56 /tests | |
parent | 3ef798f18244e468fd558f36e161aeaf15a44564 (diff) |
InputHandler QML test code and fixes to rendering trigger.
Task-number: QTRD-2562
Change-Id: Iadb6ba61adc296bc18f255a4c7c2727f09dc9904
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qmlcamera/qml/qmlcamera/main.qml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/qmlcamera/qml/qmlcamera/main.qml b/tests/qmlcamera/qml/qmlcamera/main.qml index 1f87d5eb..705f284d 100644 --- a/tests/qmlcamera/qml/qmlcamera/main.qml +++ b/tests/qmlcamera/qml/qmlcamera/main.qml @@ -71,6 +71,30 @@ Item { scene.activeCamera.zoomLevel: zoomSlider.value inputHandler: null } + + MouseArea { + id: inputArea + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + property bool selectionOn: false + + onPressed: { + if (mouse.button == Qt.LeftButton) + selectionOn = true; + testChart.scene.selectionQueryPosition = Qt.point(mouse.x, mouse.y); + } + + onReleased: { + if (mouse.button == Qt.LeftButton) + selectionOn = false; + } + + onPositionChanged: { + if (selectionOn) { + testChart.scene.selectionQueryPosition = Qt.point(mouse.x, mouse.y); + } + } + } } ControlSurface { |