Commit 4cb697bf authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

add progress bar for video + fixes

parent 6eb7c4f3
......@@ -365,7 +365,7 @@ DistributedController {
property var jobs: { }
onJobQueued: {
console.debug("a job is queued");
myjobModel.append({"id": jobid,"nodes" : NaN, "cores" : NaN, "state": "Queued"})
myjobModel.append({"id": jobid,"nodes" : "", "cores" : "", "state": "Queued"})
}
onJobStarted: {
console.debug("a job is started");
......
......@@ -76,7 +76,8 @@ OpacityTransitionPresentation
}
Slide {
title: "Contexte"
title: "Contexte"
textFormat: Text.RichText
content: [
"ADT DTK (depuis 2012) ",
" architecture modulaire, plugins",
......@@ -87,7 +88,7 @@ OpacityTransitionPresentation
" dtkComposer",
" dtkPlot",
" dtkLinearAlgebraSparse",
" <b>dtkDistributed</b>",
" <i><b>dtkDistributed</b></i>",
]
}
......@@ -259,25 +260,36 @@ OpacityTransitionPresentation
title: "Controlleur intégré dans numComposer"
Rectangle {
width: height * 1.61
id: videorect
width: height * 1.59
height: parent.height
anchors.centerIn: parent
border.color : "black"
/* border.color : "black" */
color: "transparent"
Video {
id: video
height: parent.height
width: parent.width
height: parent.height-8
anchors.centerIn: parent
source: "sampling-aero-nef.mp4"
anchors.top: parent.top
anchors.left: parent.left
source: "http://num3sis.inria.fr/blog/wp-content/uploads/sampling-aero-nef.mp4"
/* source: "file:///tmp/sampling-aero-nef.mp4" */
autoPlay: false
Keys.onSpacePressed: video.playbackState == MediaPlayer.PlayingState ? video.pause() : video.play()
Keys.onSpacePressed: {
video.playbackState == MediaPlayer.PlayingState ? video.pause() : video.play()
event.accepted = true;
}
Keys.onDownPressed: video.seek(video.position - 5000)
Keys.onUpPressed: video.seek(video.position + 5000)
}
}
ProgressBar {
width: parent.width
anchors.bottom: parent.bottom
height: 8
value: video.position/ video.duration
}
}
}
......
......@@ -13,7 +13,7 @@ Text {
property color textColor: parent.textColor != undefined ? parent.textColor : "black"
property string fontFamily: parent.fontFamily != undefined ? parent.fontFamily : "Helvetica"
text: elapsedTime();
text: "00:00";
function numToString(num, length) {
var r = "" + num;
while (r.length < length) {
......@@ -25,10 +25,10 @@ Text {
return numToString(Math.floor(val / 60),2) + ":" + numToString(Math.floor(val % 60),2);
}
function elapsedTime() {
var elapsed = times * interval /1000
var elapsed = clock.times * interval /1000
if (elapsed > duration * 0.7 && textColor != "red") { textColor = "orange" }
if (elapsed > duration && textColor != "red") { textColor = "red" }
times++
clock.times++
return printElapsed(elapsed);
}
......@@ -47,7 +47,7 @@ Text {
running: false
onTriggered: clock.text = clock.elapsedTime();
}
Keys.onPressed: {timer.start()}
Keys.onPressed: {if (!timer.running) { timer.start() }}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment