import CameraPlus 1.0
// TODO: flash not ready (battery low or flash not ready message)
-// TODO: front camera night mode
CameraPage {
id: root
property bool deviceChangeInProgress: false
+ property bool inCaptureMode: mainView.currentIndex == 1
CameraTheme {
id: cameraTheme
}
onImageAspectRatioChanged: {
- imageSettings.setImageResolution()
+ if (!root.deviceChangeInProgress) {
+ imageSettings.setImageResolution()
+ }
}
onImageResolutionChanged: {
- imageSettings.setImageResolution()
+ if (!root.deviceChangeInProgress) {
+ imageSettings.setImageResolution()
+ }
}
onVideoResolutionChanged: {
- videoSettings.setVideoResolution()
+ if (!root.deviceChangeInProgress) {
+ videoSettings.setVideoResolution()
+ }
+ }
+
+ onVideoAspectRatioChanged: {
+ if (!root.deviceChangeInProgress) {
+ videoSettings.setVideoResolution()
+ }
}
}
return false
}
+ if (mode == Camera.ImageMode) {
+ imageSettings.setImageResolution()
+ }
+ else if (mode == Camera.VideoMode) {
+ videoSettings.setVideoResolution()
+ }
+
return true
}
imagePath: platformSettings.imagePath
videoPath: platformSettings.videoPath
temporaryVideoPath: platformSettings.temporaryVideoPath
+ settings: settings
}
MountProtector {
showError(qsTr("Failed to set required resolution"))
}
}
-
- onReadyChanged: {
- if (ready) {
- imageSettings.setImageResolution()
- }
- }
}
VideoSettings {
showError(qsTr("Failed to set required resolution"))
}
}
-
- onReadyChanged: {
- if (ready) {
- videoSettings.setVideoResolution()
- }
- }
}
ModeController {
DeviceKeys {
id: keys
- active: Qt.application.active && pipelineManager.scaleAcquired
+ active: Qt.application.active && pipelineManager.scaleAcquired && root.inCaptureMode && !mainView.moving
repeat: !settings.zoomAsShutter
}
+ CameraProximitySensor {
+ id: proximitySensor
+ active: Qt.application.active && viewfinder.camera.running && settings.proximityAsShutter && root.inCaptureMode && !mainView.moving
+ }
+
Standby {
policyLost: pipelineManager.state == "policyLost"
show: !Qt.application.active || pipelineManager.showStandBy ||
- (mainView.currentIndex == 1 && !viewfinder.camera.running)
+ (inCaptureMode && !viewfinder.camera.running)
}
}