summaryrefslogtreecommitdiffstats
path: root/examples/declarative-camera/CaptureControls.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative-camera/CaptureControls.qml')
-rw-r--r--examples/declarative-camera/CaptureControls.qml179
1 files changed, 99 insertions, 80 deletions
diff --git a/examples/declarative-camera/CaptureControls.qml b/examples/declarative-camera/CaptureControls.qml
index 77f69b37be..e431b73b52 100644
--- a/examples/declarative-camera/CaptureControls.qml
+++ b/examples/declarative-camera/CaptureControls.qml
@@ -49,105 +49,124 @@ FocusScope {
property alias flashMode : flashModesButton.value
property alias exposureCompensation : exposureCompensationButton.value
+ property int buttonsPanelWidth: buttonPaneShadow.width
+
signal previewSelected
id : captureControls
- Column {
- spacing : 8
- anchors.right : parent.right
- anchors.rightMargin: 8
- anchors.top : parent.top
- anchors.topMargin: 8
+ Rectangle {
+ id: buttonPaneShadow
+ width: buttonPanningPane.width + 16
+ height: parent.height
+ anchors.top: parent.top
+ anchors.right: parent.right
+ color: Qt.rgba(0.08, 0.08, 0.08, 1)
+
+ Flickable {
+ id: buttonPanningPane
+ anchors {
+ right: parent.right
+ top: parent.top
+ bottom: parent.bottom
+ margins: 8
+ }
+ width: buttonsColumn.width
- FocusButton {
- camera: captureControls.camera
- visible: false
- }
+ contentWidth: buttonsColumn.width
+ contentHeight: buttonsColumn.height
- CameraButton {
- text: "Capture"
- onClicked: camera.captureImage()
- }
+ Column {
+ id: buttonsColumn
+ spacing: 8
- CameraPropertyButton {
- id : flashModesButton
- value: Camera.FlashOff
- model: ListModel {
- ListElement {
- icon: "images/camera_flash_auto.png"
- value: Camera.FlashAuto
- text: "Auto"
- }
- ListElement {
- icon: "images/camera_flash_off.png"
- value: Camera.FlashOff
- text: "Off"
+ FocusButton {
+ camera: captureControls.camera
}
- ListElement {
- icon: "images/camera_flash_fill.png"
- value: Camera.FlashOn
- text: "On"
+
+ CameraButton {
+ text: "Capture"
+ onClicked: camera.captureImage()
}
- ListElement {
- icon: "images/camera_flash_redeye.png"
- value: Camera.FlashRedEyeReduction
- text: "Red Eye Reduction"
+
+ CameraPropertyButton {
+ id : flashModesButton
+ value: Camera.FlashOff
+ model: ListModel {
+ ListElement {
+ icon: "images/camera_flash_auto.png"
+ value: Camera.FlashAuto
+ text: "Auto"
+ }
+ ListElement {
+ icon: "images/camera_flash_off.png"
+ value: Camera.FlashOff
+ text: "Off"
+ }
+ ListElement {
+ icon: "images/camera_flash_fill.png"
+ value: Camera.FlashOn
+ text: "On"
+ }
+ ListElement {
+ icon: "images/camera_flash_redeye.png"
+ value: Camera.FlashRedEyeReduction
+ text: "Red Eye Reduction"
+ }
+ }
}
- }
- }
- CameraPropertyButton {
- id : wbModesButton
- value: Camera.WhiteBalanceAuto
- model: ListModel {
- ListElement {
- icon: "images/camera_auto_mode.png"
+ CameraPropertyButton {
+ id : wbModesButton
value: Camera.WhiteBalanceAuto
- text: "Auto"
+ model: ListModel {
+ ListElement {
+ icon: "images/camera_auto_mode.png"
+ value: Camera.WhiteBalanceAuto
+ text: "Auto"
+ }
+ ListElement {
+ icon: "images/camera_white_balance_sunny.png"
+ value: Camera.WhiteBalanceSunlight
+ text: "Sunlight"
+ }
+ ListElement {
+ icon: "images/camera_white_balance_cloudy.png"
+ value: Camera.WhiteBalanceCloudy
+ text: "Cloudy"
+ }
+ ListElement {
+ icon: "images/camera_white_balance_incandescent.png"
+ value: Camera.WhiteBalanceIncandescent
+ text: "Incandescent"
+ }
+ ListElement {
+ icon: "images/camera_white_balance_flourescent.png"
+ value: Camera.WhiteBalanceFluorescent
+ text: "Fluorescent"
+ }
+ }
}
- ListElement {
- icon: "images/camera_white_balance_sunny.png"
- value: Camera.WhiteBalanceSunlight
- text: "Sunlight"
- }
- ListElement {
- icon: "images/camera_white_balance_cloudy.png"
- value: Camera.WhiteBalanceCloudy
- text: "Cloudy"
- }
- ListElement {
- icon: "images/camera_white_balance_incandescent.png"
- value: Camera.WhiteBalanceIncandescent
- text: "Incandescent"
+
+ ExposureCompensationButton {
+ id : exposureCompensationButton
}
- ListElement {
- icon: "images/camera_white_balance_flourescent.png"
- value: Camera.WhiteBalanceFluorescent
- text: "Fluorescent"
+
+ CameraButton {
+ text: "View"
+ onClicked: captureControls.previewSelected()
+ visible: captureControls.previewAvailable
}
- }
- }
- ExposureCompensationButton {
- id : exposureCompensationButton
- }
+ CameraButton {
+ id: quitButton
+ text: "Quit"
+ onClicked: Qt.quit()
+ }
- CameraButton {
- text: "View"
- onClicked: captureControls.previewSelected()
- visible: captureControls.previewAvailable
+ }
}
}
- CameraButton {
- id: quitButton
- anchors.right : parent.right
- anchors.rightMargin: 8
- anchors.bottom : parent.bottom
- anchors.bottomMargin: 8
- text: "Quit"
- onClicked: Qt.quit()
- }
Item {
id: exposureDetails