revealJS presentations work sorta
I still have lots of bugs, but the groundwork is there. At least a proof of concept.
This commit is contained in:
parent
7d79c38c2a
commit
e30066b101
6 changed files with 71 additions and 4 deletions
|
@ -208,10 +208,27 @@ Controls.Page {
|
|||
function changeSlide(index) {
|
||||
console.log("index grabbed: " + index);
|
||||
const item = SlideModel.getItemRust(index, SlideMod);
|
||||
const isMoveDown = currentSlide < index;
|
||||
currentSlide = index;
|
||||
currentServiceItem = item.serviceItemId;
|
||||
console.log("index grabbed: " + index);
|
||||
console.log(item);
|
||||
console.log("html?: " + item.html);
|
||||
console.log("type: " + item.type);
|
||||
console.log("text: " + item.text);
|
||||
console.log("slide_index: " + item.slideIndex);
|
||||
console.log("slide_count: " + item.imageCount);
|
||||
if (item.html) {
|
||||
let index = item.slideIndex;
|
||||
let count = item.imageCount;
|
||||
if (index > 0 && index < count - 1) {
|
||||
console.log("I should advance revealy");
|
||||
if (isMoveDown)
|
||||
presentation.revealNext()
|
||||
else
|
||||
presentation.revealPrev()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
/* presentation.stopVideo(); */
|
||||
/* pWindow.stopVideo(); */
|
||||
|
|
|
@ -413,4 +413,11 @@ FocusScope {
|
|||
function playAudio() {
|
||||
}
|
||||
|
||||
function revealNext() {
|
||||
previewSlide.revealNext();
|
||||
}
|
||||
|
||||
function revealPrev() {
|
||||
previewSlide.revealPrev();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,17 +30,38 @@ Item {
|
|||
|
||||
Controls.TextField {
|
||||
id: presentationTitleField
|
||||
Layout.preferredWidth: 300
|
||||
implicitWidth: 300
|
||||
placeholderText: "Title..."
|
||||
text: presentation.title
|
||||
padding: 10
|
||||
onEditingFinished: updateTitle(text);
|
||||
background: Presenter.TextBackground {
|
||||
control: fontBox
|
||||
}
|
||||
}
|
||||
|
||||
Controls.ComboBox {
|
||||
model: ["PRESENTATIONS", "Center", "Right", "Justify"]
|
||||
implicitWidth: 100
|
||||
hoverEnabled: true
|
||||
background: Presenter.TextBackground {
|
||||
control: fontBox
|
||||
}
|
||||
indicator: Kirigami.Icon {
|
||||
anchors {right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
rightMargin: 2}
|
||||
source: "arrow-down"
|
||||
rotation: fontBox.down ? 180 : 0
|
||||
color: fontBox.pressed ? Kirigami.Theme.focusColor : Kirigami.Theme.textColor
|
||||
|
||||
Behavior on rotation {
|
||||
NumberAnimation {
|
||||
easing.type: Easing.OutCubic
|
||||
duration: 300
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Controls.ToolSeparator {}
|
||||
Item { Layout.fillWidth: true }
|
||||
|
|
|
@ -107,4 +107,12 @@ Item {
|
|||
function loopVideo() {
|
||||
presentationSlide.loopVideo();
|
||||
}
|
||||
|
||||
function revealNext() {
|
||||
presentationSlide.revealNext();
|
||||
}
|
||||
|
||||
function revealPrev() {
|
||||
presentationSlide.revealPrev();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,6 +177,7 @@ Item {
|
|||
anchors.fill: parent
|
||||
url: webSource
|
||||
visible: htmlVisible
|
||||
zoomFactor: preview ? 0.25 : 1.0
|
||||
onLoadingChanged: {
|
||||
if (loadRequest.status == 2)
|
||||
showPassiveNotification("yahoo?");
|
||||
|
@ -247,10 +248,10 @@ Item {
|
|||
}
|
||||
|
||||
function revealNext() {
|
||||
web.runJavascript("Reveal.next()")
|
||||
web.runJavaScript("Reveal.next()")
|
||||
}
|
||||
|
||||
function revealPrev() {
|
||||
web.runJavascript("Reveal.prev()")
|
||||
web.runJavaScript("Reveal.prev()")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue