import QtCamera 1.0
import CameraPlus 1.0
-// TODO: reset reticle and roi when we stop camera or change mode
-
Viewfinder {
id: viewfinder
- property bool pressed: focusReticle.locked || (loader.item ? loader.item.pressed : false)
+ property bool pressed: focusReticle.locked || preview.animationRunning
+ || (loader.item ? loader.item.pressed : false)
property int policyMode: loader.item ? loader.item.policyMode : CameraResources.None
camera: cam
visible: settings.gridEnabled
}
+ PhoneProfile {
+ id: phoneProfile
+ }
+
Camera {
id: cam
sounds: Sounds {
id: sounds
- mute: !settings.soundEnabled
+ mute: !settings.soundEnabled || phoneProfile.isSilent
volume: volumeControl.fullVolume ? Sounds.VolumeHigh : Sounds.VolumeLow
imageCaptureStart: platformSettings.imageCaptureStartedSound
imageCaptureEnd: platformSettings.imageCaptureEndedSound
autoFocusAcquired: platformSettings.autoFocusAcquiredSound
}
+ onFocusChanged: focus.value = Focus.ContinuousNormal
onRoiChanged: roi.normalize = false
onRunningChanged: {
if (!cam.running) {
- mountProtector.unlock()
+ mountProtector.unlockAll()
}
}
}
}
+ PreviewImage {
+ id: preview
+ }
+
FocusReticle {
id: focusReticle
cam: cam
status: cam ? cam.autoFocus.status : -1
}
- PreviewImage {
- id: preview
- }
-
Loader {
id: loader
property string src: cam.mode == Camera.VideoMode ? "VideoOverlay.qml" : "ImageOverlay.qml"
Binding {
target: cam.flash
property: "value"
- when: cam.mode == Camera.ImageMode
+ when: cam.mode == Camera.ImageMode && !root.deviceChangeInProgress
value: settings.imageFlashMode
}
Binding {
target: settings
property: "imageFlashMode"
- when: cam.mode == Camera.ImageMode
+ when: cam.mode == Camera.ImageMode && !root.deviceChangeInProgress
value: cam.flash.value
}
Binding {
target: cam.scene
property: "value"
- when: cam.mode == Camera.VideoMode
+ when: cam.mode == Camera.VideoMode && !root.deviceChangeInProgress
value: settings.videoSceneMode
}
Binding {
target: cam.scene
property: "value"
- when: cam.mode == Camera.ImageMode
+ when: cam.mode == Camera.ImageMode && !root.deviceChangeInProgress
value: settings.imageSceneMode
}
Binding {
target: cam.evComp
property: "value"
- when: cam.mode == Camera.ImageMode
+ when: cam.mode == Camera.ImageMode && !root.deviceChangeInProgress
value: settings.imageEvComp
}
Binding {
target: cam.evComp
property: "value"
- when: cam.mode == Camera.VideoMode
+ when: cam.mode == Camera.VideoMode && !root.deviceChangeInProgress
value: settings.videoEvComp
}
Binding {
target: settings
property: "imageEvComp"
- when: cam.mode == Camera.ImageMode
+ when: cam.mode == Camera.ImageMode && !root.deviceChangeInProgress
value: cam.evComp.value
}
Binding {
target: settings
property: "videoEvComp"
- when: cam.mode == Camera.VideoMode
+ when: cam.mode == Camera.VideoMode && !root.deviceChangeInProgress
value: cam.evComp.value
}
Binding {
target: cam.whiteBalance
property: "value"
- when: cam.mode == Camera.ImageMode
+ when: cam.mode == Camera.ImageMode && !root.deviceChangeInProgress
value: settings.imageWhiteBalance
}
Binding {
target: cam.whiteBalance
property: "value"
- when: cam.mode == Camera.VideoMode
+ when: cam.mode == Camera.VideoMode && !root.deviceChangeInProgress
value: settings.videoWhiteBalance
}
Binding {
target: cam.colorTone
property: "value"
- when: cam.mode == Camera.ImageMode
+ when: cam.mode == Camera.ImageMode && !root.deviceChangeInProgress
value: settings.imageColorFilter
}
Binding {
target: cam.colorTone
property: "value"
- when: cam.mode == Camera.VideoMode
+ when: cam.mode == Camera.VideoMode && !root.deviceChangeInProgress
value: settings.videoColorFilter
}
Binding {
target: cam.iso
property: "value"
- when: cam.mode == Camera.ImageMode
+ when: cam.mode == Camera.ImageMode && !root.deviceChangeInProgress
value: settings.imageIso
}
Binding {
target: settings
property: "imageIso"
- when: cam.mode == Camera.ImageMode
+ when: cam.mode == Camera.ImageMode && !root.deviceChangeInProgress
value: cam.iso.value
}
return false
}
+
+ function cameraDeviceChanged() {
+ if (loader.item) {
+ loader.item.cameraDeviceChanged()
+ }
+ }
}