using getItem directly since QVariantMaps work now in 0.6 of cxxqt
This commit is contained in:
parent
80f4b47fd0
commit
60b89a84d7
3 changed files with 7 additions and 4 deletions
|
@ -351,9 +351,12 @@ Item {
|
||||||
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;
|
||||||
|
let presId = presentationLibrary.libraryList.currentIndex + 1;
|
||||||
|
let pres = presProxyModel.presentationModel.getItem(presId);
|
||||||
|
console.log(pres.id);
|
||||||
if (!editMode)
|
if (!editMode)
|
||||||
editMode = true;
|
editMode = true;
|
||||||
editSwitch(presentationLibrary.libraryList.currentIndex, "presentation");
|
editSwitch(presId, "presentation");
|
||||||
pdf.source = "";
|
pdf.source = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function changePresentation(index) {
|
function changePresentation(index) {
|
||||||
let pres = presProxyModel.getPresentation(index);
|
let pres = presProxyModel.presentationModel.getItem(index);
|
||||||
root.presentation = pres;
|
root.presentation = pres;
|
||||||
console.log(pres.filePath.toString());
|
console.log(pres.filePath.toString());
|
||||||
updatePageCount(presentationPreview.frameCount);
|
updatePageCount(presentationPreview.frameCount);
|
||||||
|
|
|
@ -609,7 +609,7 @@ Item {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case 'presentation': {
|
case 'presentation': {
|
||||||
const pres = presProxyModel.getPresentation(itemIndex);
|
const pres = presProxyModel.presentationModel.getItem(itemIndex);
|
||||||
console.log("adding: " + pres.title +
|
console.log("adding: " + pres.title +
|
||||||
" of type " + type +
|
" of type " + type +
|
||||||
" with " + pres.pageCount + " slides");
|
" with " + pres.pageCount + " slides");
|
||||||
|
@ -663,7 +663,7 @@ Item {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case 'presentation': {
|
case 'presentation': {
|
||||||
const pres = presProxyModel.getPresentation(itemIndex);
|
const pres = presProxyModel.presentationModel.getItem(itemIndex);
|
||||||
console.log("adding: " + pres.title +
|
console.log("adding: " + pres.title +
|
||||||
" of type " + type +
|
" of type " + type +
|
||||||
" with " + pres.pageCount + " slides");
|
" with " + pres.pageCount + " slides");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue