adding presentations with multiple slides
This commit is contained in:
parent
cadd031ac6
commit
d868571d72
3 changed files with 22 additions and 10 deletions
|
@ -1119,6 +1119,7 @@ Item {
|
|||
dragItemText = "";
|
||||
dragItemBackgroundType = "image";
|
||||
dragItemBackground = filePath;
|
||||
dragItemSlideNumber = pageCount;
|
||||
} else {
|
||||
presListItem.Drag.drop()
|
||||
dragHighlightLine.visible = false;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -516,15 +516,15 @@ Item {
|
|||
totalServiceItems++;
|
||||
return;
|
||||
}
|
||||
/* if (type === "presentation") { */
|
||||
/* print("adding: " + name + " of type " + type + " with " + newtext.length + " slides"); */
|
||||
/* serviceItemModel.insertItem(index, name, */
|
||||
/* type, background, */
|
||||
/* backgroundType, "", */
|
||||
/* "", "", 0, pageCount); */
|
||||
/* totalServiceItems++; */
|
||||
/* return; */
|
||||
/* } */
|
||||
if (type === "presentation") {
|
||||
print("adding: " + name + " of type " + type + " with " + dragItemSlideNumber + " slides");
|
||||
serviceItemModel.insertItem(index, name,
|
||||
type, background,
|
||||
backgroundType, "",
|
||||
"", "", 0, dragItemSlideNumber);
|
||||
totalServiceItems++;
|
||||
return;
|
||||
}
|
||||
print("adding: " + name + " of type " + type);
|
||||
serviceItemModel.insertItem(index, name,
|
||||
type, background,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue