Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Unverified Commit 7ca4bd3a authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

A few more drawer fixes

only list parsing into Kirigami Actions missing now
parent 577d572b
......@@ -139,10 +139,11 @@ Kirigami.Page {
Camera {
id: camera
captureMode: Camera.CaptureStillImage
imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash
imageProcessing.whiteBalanceMode: settings.whiteBalanceMode
imageCapture {
id: imageCapture
resolution: settings.photoResolution
}
videoRecorder {
......
......@@ -59,7 +59,8 @@ Kirigami.GlobalDrawer {
text: qsTr("Video resolution")
iconName: "ratiocrop"
DelegateModel {
model: applicationWindow().cameraPage.camera.videoRecorder.supportedResolutions
model: CameraRecorder.supportedResolutions
delegate: Kirigami.Action {
text: model
onTriggered: settings.videoResolution = text;
......@@ -70,7 +71,7 @@ Kirigami.GlobalDrawer {
text: qsTr("Photo resolution")
iconName: "ratiocrop"
DelegateModel {
model: applicationWindow().cameraPage.camera.imageCapture.supportedResolutions
model: CameraCapture.supportedResolutions
delegate: Kirigami.Action {
text: model
onTriggered: settings.photoResolution = text;
......@@ -80,41 +81,30 @@ Kirigami.GlobalDrawer {
Kirigami.Action {
text: qsTr("White balance")
iconName: "whitebalance"
DelegateModel {
model: ListModel {
ListElement {
icon: "images/camera_auto_mode.png"
value: CameraImageProcessing.WhiteBalanceAuto
text: "Auto"
}
ListElement {
icon: "images/camera_white_balance_sunny.png"
value: CameraImageProcessing.WhiteBalanceSunlight
text: "Sunlight"
}
ListElement {
icon: "images/camera_white_balance_cloudy.png"
value: CameraImageProcessing.WhiteBalanceCloudy
text: "Cloudy"
}
ListElement {
icon: "images/camera_white_balance_incandescent.png"
value: CameraImageProcessing.WhiteBalanceTungsten
text: "Tungsten"
}
ListElement {
icon: "images/camera_white_balance_flourescent.png"
value: CameraImageProcessing.WhiteBalanceFluorescent
text: "Fluorescent"
}
}
delegate: Kirigami.Action {
text: model.text
iconName: model.icon
onTriggered: {
applicationWindow().cameraPage.camera.imageProcessing.whiteBalanceMode = value
}
}
Kirigami.Action {
iconName: "images/camera_auto_mode.png"
onTriggered: settings.whiteBalanceMode = CameraImageProcessing.WhiteBalanceAuto
text: "Auto"
}
Kirigami.Action {
iconName: "images/camera_white_balance_sunny.png"
onTriggered: settings.whiteBalanceMode = CameraImageProcessing.WhiteBalanceSunlight
text: "Sunlight"
}
Kirigami.Action {
iconName: "images/camera_white_balance_cloudy.png"
onTriggered: settings.whiteBalanceMode = CameraImageProcessing.WhiteBalanceCloudy
text: "Cloudy"
}
Kirigami.Action {
iconName: "images/camera_white_balance_incandescent.png"
onTriggered: settings.whiteBalanceMode = CameraImageProcessing.WhiteBalanceTungsten
text: "Tungsten"
}
Kirigami.Action {
iconName: "images/camera_white_balance_flourescent.png"
onTriggered: settings.whiteBalanceMode = CameraImageProcessing.WhiteBalanceFluorescent
text: "Fluorescent"
}
}
]
......
......@@ -40,15 +40,17 @@
import QtQuick 2.7
import org.kde.kirigami 2.2 as Kirigami
import Qt.labs.settings 1.0
import QtMultimedia 5.8
Kirigami.ApplicationWindow {
Settings {
id: settings
// Default settings
property string videoResolution: "640x480"
property string photoResolution
property string cameraDeviceId
property size videoResolution: Qt.size(640, 480)
property size photoResolution
property int cameraDeviceId
property int whiteBalanceMode: CameraImageProcessing.WhiteBalanceAuto
}
Component {id: cameraPage; CameraPage {}}
......@@ -57,6 +59,5 @@ Kirigami.ApplicationWindow {
title: qsTr("Camera")
globalDrawer: GlobalDrawer {}
Component.onCompleted: pageStack.push(cameraPage)
pageStack.initialPage: cameraPage
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment