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 = "";
|
dragItemText = "";
|
||||||
dragItemBackgroundType = "image";
|
dragItemBackgroundType = "image";
|
||||||
dragItemBackground = filePath;
|
dragItemBackground = filePath;
|
||||||
|
dragItemSlideNumber = pageCount;
|
||||||
} else {
|
} else {
|
||||||
presListItem.Drag.drop()
|
presListItem.Drag.drop()
|
||||||
dragHighlightLine.visible = false;
|
dragHighlightLine.visible = false;
|
||||||
|
|
|
@ -108,11 +108,15 @@ Item {
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: presentationPreview
|
id: presentationPreview
|
||||||
Layout.preferredWidth: 1000
|
Layout.preferredWidth: root.width - Kirigami.Units.largeSpacing
|
||||||
Layout.preferredHeight: Layout.preferredWidth / 16 * 9
|
Layout.preferredHeight: Layout.preferredWidth / 16 * 9
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: presentation.filePath
|
source: presentation.filePath
|
||||||
|
Component.onCompleted: {
|
||||||
|
updatePageCount(frameCount);
|
||||||
|
showPassiveNotification(presentation.pageCount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true;
|
Layout.fillWidth: true;
|
||||||
|
@ -146,6 +150,8 @@ Item {
|
||||||
function changePresentation(presentation) {
|
function changePresentation(presentation) {
|
||||||
root.presentation = presentation;
|
root.presentation = presentation;
|
||||||
print(presentation.filePath.toString());
|
print(presentation.filePath.toString());
|
||||||
|
updatePageCount(presentationPreview.frameCount);
|
||||||
|
console.log("page count " + presentation.pageCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateTitle(text) {
|
function updateTitle(text) {
|
||||||
|
@ -159,4 +165,9 @@ Item {
|
||||||
presentationTitleField.text = text;
|
presentationTitleField.text = text;
|
||||||
presentation.title = text;
|
presentation.title = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updatePageCount(pageCount) {
|
||||||
|
presentation.pageCount = pageCount;
|
||||||
|
pressqlmodel.updatePageCount(presentation.id, pageCount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -516,15 +516,15 @@ Item {
|
||||||
totalServiceItems++;
|
totalServiceItems++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* if (type === "presentation") { */
|
if (type === "presentation") {
|
||||||
/* print("adding: " + name + " of type " + type + " with " + newtext.length + " slides"); */
|
print("adding: " + name + " of type " + type + " with " + dragItemSlideNumber + " slides");
|
||||||
/* serviceItemModel.insertItem(index, name, */
|
serviceItemModel.insertItem(index, name,
|
||||||
/* type, background, */
|
type, background,
|
||||||
/* backgroundType, "", */
|
backgroundType, "",
|
||||||
/* "", "", 0, pageCount); */
|
"", "", 0, dragItemSlideNumber);
|
||||||
/* totalServiceItems++; */
|
totalServiceItems++;
|
||||||
/* return; */
|
return;
|
||||||
/* } */
|
}
|
||||||
print("adding: " + name + " of type " + type);
|
print("adding: " + name + " of type " + type);
|
||||||
serviceItemModel.insertItem(index, name,
|
serviceItemModel.insertItem(index, name,
|
||||||
type, background,
|
type, background,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue