summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/declarative-camera/PhotoCaptureControls.qml
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2014-02-10 19:33:51 +0100
committerYoann Lopes <yoann.lopes@digia.com>2014-07-17 18:58:00 +0200
commit888759e334e81117843afb6d0f8991db8aec5ca8 (patch)
treed0b6eb0b094557d5c25bf865998915f0839d596d /examples/multimedia/declarative-camera/PhotoCaptureControls.qml
parentcddbe8736d995b4bfdfbbf1abfc3d6aeae3eb214 (diff)
New camera selection API in QML.
Also added a new QtMultimedia global object which makes it possible to retrieve the list of available cameras. It can be extended with new utility functions in the future. Includes documentation, example and auto tests. Task-number: QTBUG-23770 Change-Id: Ifea076329c3582ea99246ee1131853344a7b773f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'examples/multimedia/declarative-camera/PhotoCaptureControls.qml')
-rw-r--r--examples/multimedia/declarative-camera/PhotoCaptureControls.qml12
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/multimedia/declarative-camera/PhotoCaptureControls.qml b/examples/multimedia/declarative-camera/PhotoCaptureControls.qml
index 2cd39b8cb..170114e3f 100644
--- a/examples/multimedia/declarative-camera/PhotoCaptureControls.qml
+++ b/examples/multimedia/declarative-camera/PhotoCaptureControls.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the examples of the Qt Toolkit.
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtMultimedia 5.0
+import QtMultimedia 5.4
FocusScope {
property Camera camera
@@ -53,7 +53,7 @@ FocusScope {
Rectangle {
id: buttonPaneShadow
- width: buttonsColumn.width + 16
+ width: bottomColumn.width + 16
height: parent.height
anchors.top: parent.top
anchors.right: parent.right
@@ -130,12 +130,16 @@ FocusScope {
id: bottomColumn
spacing: 8
+ CameraListButton {
+ model: QtMultimedia.availableCameras
+ onValueChanged: captureControls.camera.deviceId = value
+ }
+
CameraButton {
text: "Switch to Video"
onClicked: captureControls.videoModeSelected()
}
-
CameraButton {
id: quitButton
text: "Quit"