making the pdf system aware of number of pages without podofo
This commit is contained in:
parent
c989d143b7
commit
53bdda17bf
1 changed files with 13 additions and 1 deletions
|
@ -2,6 +2,7 @@ import QtQuick 2.13
|
|||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Layouts 1.2
|
||||
import Qt.labs.platform 1.1 as Labs
|
||||
import QtQuick.Pdf 5.15
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
import "./" as Presenter
|
||||
import org.presenter 1.0
|
||||
|
@ -1348,7 +1349,13 @@ Item {
|
|||
}
|
||||
|
||||
function addPres(url) {
|
||||
pressqlmodel.newPresentation(url);
|
||||
print(pdf.status);
|
||||
pdf.source = url;
|
||||
while (pdf.status != 2) {
|
||||
print(pdf.status);
|
||||
print("PAGECOUNT: " + pdf.pageCount);
|
||||
}
|
||||
pressqlmodel.newPresentation(url, pdf.pageCount);
|
||||
selectedLibrary = "presentations";
|
||||
presentationLibraryList.currentIndex = pressqlmodel.rowCount();
|
||||
print(pressqlmodel.getPresentation(presentationLibraryList.currentIndex));
|
||||
|
@ -1357,6 +1364,7 @@ Item {
|
|||
if (!editMode)
|
||||
editMode = true;
|
||||
editSwitch("presentation", presentation);
|
||||
pdf.source = "";
|
||||
}
|
||||
|
||||
function isDragFile(item) {
|
||||
|
@ -1421,6 +1429,10 @@ Item {
|
|||
border.color: overlay ? Kirigami.Theme.hoverColor : "#00000000"
|
||||
}
|
||||
|
||||
PdfDocument {
|
||||
id: pdf
|
||||
}
|
||||
|
||||
MpvObject {
|
||||
id: thumbnailer
|
||||
useHwdec: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue