- id: mouse
- x: cam ? cam.renderArea.x : 0
- y: cam ? cam.renderArea.y : 0
- width: cam ? cam.renderArea.width : 0
- height: cam ? cam.renderArea.height : 0
- drag.minimumX: 0
- drag.minimumY: 0
- drag.maximumX: width - reticle.width
- drag.maximumY: height - reticle.height
-
- property int cafStatus: AutoFocus.None
- property int status: AutoFocus.None
- property Camera cam
- property bool touchMode
-
- property variant touchPoint: Qt.point(mouse.width / 2, mouse.height / 2)
-
- // A 100x100 central "rectangle"
- property variant centerRect: Qt.rect((mouse.width / 2 - 50), (mouse.height / 2) - 50, 100, 100);
-
- // ROI:
- property variant primaryRoiRect: Qt.rect(0, 0, 0, 0);
- property variant roiRects
- property variant allRoiRects
- property bool roiMode: allRoiRects != null && allRoiRects.length > 0 && !touchMode && !pressed
-
- onPressed: calculateTouchPoint(mouse.x, mouse.y);
- onReleased: calculateTouchPoint(mouse.x, mouse.y);
- onPositionChanged: calculateTouchPoint(mouse.x, mouse.y);
-
- function resetReticle() {
- calculateTouchPoint(centerRect.x, centerRect.y)
+ id: mouse
+ x: renderArea.x
+ y: renderArea.y
+ width: renderArea.width
+ height: renderArea.height
+ drag.minimumX: 0
+ drag.minimumY: 0
+ drag.maximumX: width - reticle.width
+ drag.maximumY: height - reticle.height
+
+ property variant videoResolution
+ property variant renderArea
+
+ property bool locked: false
+
+ property int cafStatus: AutoFocus.None
+ property int status: AutoFocus.None
+ property Camera cam
+ property bool touchMode
+
+ property variant touchPoint: Qt.point(mouse.width / 2, mouse.height / 2)
+
+ // A 100x100 central "rectangle"
+ property variant centerRect: Qt.rect((mouse.width / 2 - 50), (mouse.height / 2) - 50, 100, 100)
+
+ // ROI:
+ property variant primaryRoiRect: Qt.rect(0, 0, 0, 0)
+ property variant roiRects
+ property variant allRoiRects
+ property bool roiMode: allRoiRects != null && allRoiRects.length > 0 && !touchMode && !pressed
+
+ enabled: !cam.quirks.hasQuirk(Quirks.NoTouchFocus)
+
+ property variant __initialPos
+ onPressed: {
+ if (mouse.x >= reticle.x &&
+ mouse.y >= reticle.y &&
+ mouse.x <= reticle.x + reticle.width &&
+ mouse.y <= reticle.y + reticle.height) {
+ locked = true