- target: settings
-
- onImageAspectRatioChanged: {
- imageSettings.setImageResolution();
- }
-
- onImageResolutionChanged: {
- imageSettings.setImageResolution();
- }
-
- onVideoResolutionChanged: {
- videoSettings.setVideoResolution();
- }
- }
-
- Camera {
- id: cam
- anchors.fill: parent
-
- GridLines {
- x: cam.renderArea.x
- y: cam.renderArea.y
- width: cam.renderArea.width
- height: cam.renderArea.height
- visible: settings.gridEnabled
- }
-
- FocusReticle {
- id: focusReticle
- cam: cam
- visible: pageStack.currentPage && pageStack.currentPage.controlsVisible && pageStack.currentPage.focusReticleVisible && cam && cam.autoFocus.canFocus(cam.scene.value);
- cafStatus: cam ? cam.autoFocus.cafStatus : -1
- status: cam ? cam.autoFocus.status : -1
- }
-
-/*
- onDeviceIdChanged: {
- // TODO: is this needed ?
- if (platformWindow.active) {
- cam.start();
- }
- }
-*/
- onError: {
- if (pipelineManager.error) {
- // Ignore any subsequent errors.
- // Killing pulseaudio while recording will lead to an
- // infinite supply of errors which will break the UI
- // if we show a banner for each.
- return;
- }
-
- pipelineManager.error = true;
- pageStack.currentPage.cameraError();
- console.log("Camera error (" + code + "): " + message + " " + debug);
- showError(qsTr("Camera error. Please restart the application."));
-
- // We cannot stop camera here. Seems there is a race condition somewhere
- // which leads to a freeze if we do so.
- }
-
- onRunningChanged: {
- if (!cam.running) {
- mountProtector.unlock();
- }
- }