tweaks to allow better html presentations
This commit is contained in:
parent
50a8b618ad
commit
e80f0216ae
3 changed files with 14 additions and 11 deletions
|
@ -338,12 +338,17 @@ Item {
|
||||||
function addPres(url) {
|
function addPres(url) {
|
||||||
console.log(pdf.status);
|
console.log(pdf.status);
|
||||||
let pageCount = 1;
|
let pageCount = 1;
|
||||||
|
|
||||||
|
if (url.endsWith(".pdf")) {
|
||||||
pdf.source = url;
|
pdf.source = url;
|
||||||
while (pdf.status != 2) {
|
while (pdf.status != 2) {
|
||||||
console.log(pdf.status);
|
console.log(pdf.status);
|
||||||
console.log("PAGECOUNT: " + pdf.pageCount);
|
console.log("PAGECOUNT: " + pdf.pageCount);
|
||||||
pageCount = pdf.pageCount;
|
pageCount = pdf.pageCount;
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
pageCount = 1;
|
||||||
|
|
||||||
presProxyModel.presentationModel.newItem(url, pageCount);
|
presProxyModel.presentationModel.newItem(url, pageCount);
|
||||||
selectedLibrary = "presentation";
|
selectedLibrary = "presentation";
|
||||||
presentationLibrary.libraryList.currentIndex = presProxyModel.presentationModel.count() - 1;
|
presentationLibrary.libraryList.currentIndex = presProxyModel.presentationModel.count() - 1;
|
||||||
|
@ -377,9 +382,6 @@ Item {
|
||||||
}
|
}
|
||||||
if (presexts.includes(extension))
|
if (presexts.includes(extension))
|
||||||
{
|
{
|
||||||
if (file.endsWith(".html")) {
|
|
||||||
web.url = file;
|
|
||||||
} else
|
|
||||||
addPres(file);
|
addPres(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,7 @@ Item {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
url: isHtml ? presentation.filePath : ""
|
url: isHtml ? presentation.filePath : ""
|
||||||
visible: isHtml
|
visible: isHtml
|
||||||
|
settings.playbackRequiresUserGesture: false
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true;
|
Layout.fillWidth: true;
|
||||||
|
|
|
@ -20,7 +20,7 @@ pub fn count_slides_and_fragments(html_file_path: &str) -> i32 {
|
||||||
|
|
||||||
let total = num_slides + num_fragments;
|
let total = num_slides + num_fragments;
|
||||||
println!(
|
println!(
|
||||||
"SLIDE_NUMBERS: {:?}, {:?}, {:?}",
|
"SLIDE_NUMBERS: slides: {:?}, fragments: {:?}, total: {:?}",
|
||||||
num_slides, num_fragments, total
|
num_slides, num_fragments, total
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue