Changes to night mode handling:
[harmattan/cameraplus] / qml / VideoPage.qml
1 // -*- qml -*-
2 import QtQuick 1.1
3 import com.nokia.meego 1.1
4 import QtCamera 1.0
5
6 CameraPage {
7         id: page
8
9         controlsVisible: recording.visible
10
11         orientationLock: PageOrientation.LockLandscape
12
13         Button {
14                 id: recording
15                 anchors.right: parent.right
16                 anchors.rightMargin: 20
17                 anchors.verticalCenter: parent.verticalCenter
18                 iconSource: "image://theme/icon-m-camera-video-record"
19                 width: 75
20                 height: 75
21                 opacity: 0.5
22                 onClicked: {
23                         if (!videoMode.recording) {
24                 // TODO:
25                                 videoMode.startRecording("/home/developer/foo.mp4");
26                         }
27                         else {
28                                 videoMode.stopRecording();
29                         }
30                 }
31
32                 visible: (videoMode.recording || videoMode.canCapture) && !cameraMode.animationRunning && !previewAnimationRunning
33         }
34
35         VideoMode {
36                 id: videoMode
37                 camera: cam
38                 onPreviewAvailable: page.setPreview(preview);
39         }
40
41         VideoTorchButton {
42                 id: torch
43                 visible: controlsVisible
44                 anchors.top: parent.top
45                 anchors.left: parent.left
46                 anchors.topMargin: 20
47                 anchors.leftMargin: 20
48                 opacity: 0.5
49         }
50
51         VideoSceneButton {
52                 id: scene
53                 visible: controlsVisible && !videoMode.recording
54                 anchors.top: torch.bottom
55                 anchors.left: parent.left
56                 anchors.topMargin: 10
57                 anchors.leftMargin: 20
58         }
59
60         EvCompButton {
61                 id: evComp
62                 visible: controlsVisible
63                 anchors.top: scene.bottom
64                 anchors.left: parent.left
65                 anchors.topMargin: 10
66                 anchors.leftMargin: 20
67         }
68 }