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>
This commit is contained in:
@@ -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
|
||||
@@ -105,6 +105,11 @@ FocusScope {
|
||||
id: bottomColumn
|
||||
spacing: 8
|
||||
|
||||
CameraListButton {
|
||||
model: QtMultimedia.availableCameras
|
||||
onValueChanged: captureControls.camera.deviceId = value
|
||||
}
|
||||
|
||||
CameraButton {
|
||||
text: "Switch to Photo"
|
||||
onClicked: captureControls.photoModeSelected()
|
||||
|
||||
Reference in New Issue
Block a user