Warning, /plasma-mobile/plasma-camera/src/contents/ui/main.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2018 Jonah BrĂ¼chert <jbb@kaidan.im>
0002 // SPDX-FileCopyrightText: 2013 Digia Plc and/or its subsidiary(-ies)
0003 // SPDX-License-Identifier: BSD-3-Clause
0004
0005 import QtQuick 2.7
0006 import org.kde.kirigami 2.2 as Kirigami
0007 import QtMultimedia 5.8
0008
0009 import org.kde.plasmacamera 1.0
0010
0011 Kirigami.ApplicationWindow {
0012 id: root
0013 minimumWidth: 350
0014 Component {
0015 id: cameraPage
0016
0017 CameraPage {
0018 camera: mainCamera
0019 }
0020 }
0021
0022 Camera {
0023 id: mainCamera
0024 captureMode: Camera.CaptureStillImage
0025 deviceId: CameraSettings.cameraDeviceId
0026 imageProcessing.whiteBalanceMode: CameraSettings.whiteBalanceMode
0027
0028 property int selfTimerDuration: 0 // in seconds
0029 property bool selfTimerRunning: false
0030
0031 imageCapture {
0032 id: imageCapture
0033 resolution: CameraSettings.resolution
0034 }
0035
0036 videoRecorder {
0037 id: videoRecorder
0038 resolution: CameraSettings.resolution
0039 // frameRate: 30 // a fixed frame rate is not set for now as it does not always get enforced anyway and can cause errors
0040 }
0041
0042 onError: {
0043 showPassiveNotification(i18n("An error occurred: \"%1\". Please consider restarting the application if it stopped working.", errorString))
0044 }
0045 }
0046
0047 title: i18n("Camera")
0048 globalDrawer: GlobalDrawer {
0049 camera: mainCamera
0050 }
0051
0052 pageStack.initialPage: cameraPage
0053 pageStack.globalToolBar.style: applicationWindow().headerStyle
0054 }