+ function calculateRotation(orientation) {
+ switch (orientation) {
+ case CameraOrientation.InvertedLandscape:
+ case CameraOrientation.Landscape:
+ return 0
+ case CameraOrientation.InvertedPortrait:
+ case CameraOrientation.Portrait:
+ return -90
+ default:
+ return 0
+ }
+ }
+
+ MouseArea {
+ id: mouse
+ anchors.fill: parent
+ enabled: true
+ onClicked: postCaptureItem.clicked()
+ }
+
+ Column {
+ anchors.centerIn: parent
+ width: parent.width
+
+ CameraLabel {
+ id: errorLabel
+ width: parent.width
+ visible: image.error
+ text: qsTr("Failed to load preview")
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: 32
+ }
+
+ CameraToolIcon {
+ id: playIcon
+ anchors.horizontalCenter: parent.horizontalCenter
+ iconId: cameraTheme.videoPlayIconId
+ visible: isVideo
+ onClicked: startPlayback()
+ }