adding presentations with multiple slides

This commit is contained in:
Chris Cochrun 2023-01-17 05:09:16 -06:00
parent cadd031ac6
commit d868571d72
3 changed files with 22 additions and 10 deletions

View file

@ -108,11 +108,15 @@ Item {
Image {
id: presentationPreview
Layout.preferredWidth: 1000
Layout.preferredWidth: root.width - Kirigami.Units.largeSpacing
Layout.preferredHeight: Layout.preferredWidth / 16 * 9
Layout.alignment: Qt.AlignCenter
fillMode: Image.PreserveAspectFit
source: presentation.filePath
Component.onCompleted: {
updatePageCount(frameCount);
showPassiveNotification(presentation.pageCount);
}
}
RowLayout {
Layout.fillWidth: true;
@ -146,6 +150,8 @@ Item {
function changePresentation(presentation) {
root.presentation = presentation;
print(presentation.filePath.toString());
updatePageCount(presentationPreview.frameCount);
console.log("page count " + presentation.pageCount);
}
function updateTitle(text) {
@ -159,4 +165,9 @@ Item {
presentationTitleField.text = text;
presentation.title = text;
}
function updatePageCount(pageCount) {
presentation.pageCount = pageCount;
pressqlmodel.updatePageCount(presentation.id, pageCount);
}
}