CameraPage {
id: root
+ property bool deviceChangeInProgress: false
+
CameraTheme {
id: cameraTheme
}
Settings {
id: settings
+ onDeviceAboutToChange: {
+ root.deviceChangeInProgress = true
+ }
+
onDeviceChanged: {
viewfinder.cameraDeviceChanged()
pipelineManager.error = false
if (root.resetCamera(settings.device, settings.mode)) {
+ root.deviceChangeInProgress = false
pipelineManager.startCamera()
}
}
+
+ onImageAspectRatioChanged: {
+ imageSettings.setImageResolution()
+ }
+
+ onImageResolutionChanged: {
+ imageSettings.setImageResolution()
+ }
+
+ onVideoResolutionChanged: {
+ videoSettings.setVideoResolution()
+ }
}
PipelineManager {
return false
}
+ if (mode == Camera.ImageMode) {
+ imageSettings.setImageResolution()
+ }
+ else if (mode == Camera.VideoMode) {
+ videoSettings.setVideoResolution()
+ }
+
return true
}
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()
- }
- }
- }
-
- Connections {
- target: settings
-
- onImageAspectRatioChanged: {
- imageSettings.setImageResolution()
- }
-
- onImageResolutionChanged: {
- imageSettings.setImageResolution()
- }
-
- onVideoResolutionChanged: {
- videoSettings.setVideoResolution()
- }
}
ModeController {