projects
/
harmattan
/
cameraplus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make capture buttons always visible even if we use zoom keys for capturing
[harmattan/cameraplus]
/
qml
/
VideoPlayerPage.qml
diff --git
a/qml/VideoPlayerPage.qml
b/qml/VideoPlayerPage.qml
index
c87e507
..
7f4d981
100644
(file)
--- a/
qml/VideoPlayerPage.qml
+++ b/
qml/VideoPlayerPage.qml
@@
-20,8
+20,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-import QtQuick 1.1
-import com.nokia.meego 1.1
+import QtQuick 2.0
import CameraPlus 1.0
import QtCamera 1.0
import QtCameraExtras 1.0
import CameraPlus 1.0
import QtCamera 1.0
import QtCameraExtras 1.0
@@
-36,6
+35,10
@@
Item {
return video.play()
}
return video.play()
}
+ function stop() {
+ return video.stop()
+ }
+
MouseArea {
anchors.top: parent.top
anchors.bottom: toolBar.top
MouseArea {
anchors.top: parent.top
anchors.bottom: toolBar.top
@@
-55,12
+58,12
@@
Item {
VideoPlayer {
id: video
anchors.fill: parent
VideoPlayer {
id: video
anchors.fill: parent
- cameraConfig: cam.cameraConfig
+ cameraConfig: cam
era
.cameraConfig
onError: showError(qsTr("Error playing video. Please try again or restart the application"))
function toggle() {
onError: showError(qsTr("Error playing video. Please try again or restart the application"))
function toggle() {
- if (
!video.p
aused) {
+ if (
state != VideoPlayer.StateP
aused) {
video.pause()
} else {
page.play()
video.pause()
} else {
page.play()
@@
-100,20
+103,19
@@
Item {
PropertyAnimation { duration: 200; }
}
PropertyAnimation { duration: 200; }
}
- items: [
- ToolIcon {
- icon
Id: "icon-m-toolbar-mediacontrol-stop-white"
+ tools: CameraToolBarTools {
+
Camera
ToolIcon {
+ icon
Source: cameraTheme.videoStopIconId
onClicked: video.stop()
onClicked: video.stop()
- },
- Slider {
+ }
+
+ CameraSlider {
id: slider
height: toolBar.height
anchors.verticalCenter: parent.verticalCenter
id: slider
height: toolBar.height
anchors.verticalCenter: parent.verticalCenter
- platformStyle: SliderStyle {
- handleBackground: ""
- handleBackgroundPressed: ""
- }
+ handleBackground: ""
+ handleBackgroundPressed: ""
minimumValue: 0
maximumValue: video.duration
minimumValue: 0
maximumValue: video.duration
@@
-127,16
+129,16
@@
Item {
hideTimer.restart()
}
hideTimer.restart()
}
- },
- ToolIcon {
+ }
+
+ CameraToolIcon {
id: control
id: control
- iconId: !video.paused ? "icon-m-toolbar-mediacontrol-pause-white"
- : "icon-m-toolbar-mediacontrol-play-white"
+ iconSource: video.state != VideoPlayer.StatePaused ? cameraTheme.videoPauseIconId : cameraTheme.videoPlayIconId
onClicked: {
video.toggle()
hideTimer.restart()
}
}
onClicked: {
video.toggle()
hideTimer.restart()
}
}
- ]
+ }
}
}
}
}