summaryrefslogtreecommitdiffstats
path: root/experimental/Camera/CapturePreview.qml
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/Camera/CapturePreview.qml')
-rw-r--r--experimental/Camera/CapturePreview.qml45
1 files changed, 0 insertions, 45 deletions
diff --git a/experimental/Camera/CapturePreview.qml b/experimental/Camera/CapturePreview.qml
deleted file mode 100644
index 611fa53..0000000
--- a/experimental/Camera/CapturePreview.qml
+++ /dev/null
@@ -1,45 +0,0 @@
-import QtQuick 2.0
-
-Rectangle {
- id: root
- anchors.fill: parent
- color: "black"
- opacity: 0
- enabled: opacity !== 0
-
- property string previewSrc: ""
-
- onOpacityChanged: {
- if (opacity === 1 && previewSrc !== "") {
- previewImage.source = previewSrc;
- previewSrc = "";
- }
- }
-
- Behavior on opacity { NumberAnimation { duration: 100 } }
-
- function show() {
- previewImage.source = "";
- opacity = 1;
- }
-
- function setPreview(preview) {
- if (root.opacity === 1)
- previewImage.source = preview;
- else
- root.previewSrc = preview;
- }
-
- Image {
- id: previewImage
- anchors.fill: parent
- fillMode: Image.PreserveAspectFit
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- root.opacity = 0;
- }
- }
-}