diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2013-06-24 15:47:31 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@digia.com> | 2013-09-23 12:54:29 +0300 |
commit | 35edc19994995491aaf44e9bac851e1f8cda17ce (patch) | |
tree | 986e0114b63f846619601b89e550bf28b431bdcc /experimental/Camera/CaptureControl.qml | |
parent | d571f4769863bfb8035ff9ab61a7fbd797ae0452 (diff) |
Added Mediaplayer and Camera demos.
It's currently in the experimental directory since it has been tested
only on the Nexus 7.
Change-Id: I9503ded9504841b80a88c6e2541bed0234d73cfc
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
Diffstat (limited to 'experimental/Camera/CaptureControl.qml')
-rw-r--r-- | experimental/Camera/CaptureControl.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/experimental/Camera/CaptureControl.qml b/experimental/Camera/CaptureControl.qml new file mode 100644 index 0000000..b8180f9 --- /dev/null +++ b/experimental/Camera/CaptureControl.qml @@ -0,0 +1,40 @@ +import QtQuick 2.0 +import QtMultimedia 5.0 + +Rectangle { + id: controlRoot + + signal clicked + + property bool videoMode: camera.captureMode === Camera.CaptureVideo + + width: 180 * root.contentScale + height: width + radius: width / 2 + color: mouser.pressed ? (controlRoot.videoMode ? "#77fa334f" : "#7798c66c") : "#77333333" + visible: enabled + + Rectangle { + id: center + anchors.centerIn: parent + width: parent.width * 0.45 + height: width + radius: width / 2 + opacity: mouser.pressed ? 0.7 : 1 + color: controlRoot.videoMode ? "#fa334f" : "#98c66c" + } + + Rectangle { + anchors.centerIn: parent + color: "white" + visible: camera.videoRecorder.recorderStatus === CameraRecorder.RecordingStatus + width: center.width * 0.3 + height: width + } + + MouseArea { + id: mouser + anchors.fill: parent + onClicked: controlRoot.clicked() + } +} |