diff options
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp | 33 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp | 40 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp | 10 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/Renderer.h | 4 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/mainUI.cpp | 100 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/mainUI.h | 2 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/mainUI.ui | 8 |
7 files changed, 119 insertions, 78 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp index 95a32c02..7a2251cd 100644 --- a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp @@ -48,17 +48,20 @@ PrintWidget::~PrintWidget() { void PrintWidget::fitView() { setZoomMode(FitInView); setCurrentPage(curPage); // Make sure we stay on the same page + //generatePreview(); } void PrintWidget::fitToWidth() { setZoomMode(FitToWidth); setCurrentPage(curPage); // Make sure we stay on the same page + // generatePreview(); } void PrintWidget::setZoomMode(ZoomMode mode) { zoomMode = mode; fitting = true; fit(true); + generatePreview(); } void PrintWidget::setAllPagesViewMode() { setViewMode(AllPagesView); } @@ -79,6 +82,7 @@ void PrintWidget::setViewMode(ViewMode mode) { fitting = true; fit(); } + generatePreview(); } void PrintWidget::zoomIn(double factor) { @@ -110,9 +114,11 @@ void PrintWidget::setVisible(bool visible) { void PrintWidget::setCurrentPage(int pageNumber) { int lastPage = curPage; - curPage = std::max(1, std::min(pageNumber, BACKEND->numPages())); + //We need to allow one additional page after the last page here for presentation mode. + // This allows a "blank" page at the end of a presentation before actually closing down the presentation; + curPage = std::max(1, std::min(pageNumber, BACKEND->numPages()+1)); - /* if (lastPage != curPage && lastPage > 0 && lastPage <= pages.count()) { + /*if (lastPage != curPage && lastPage > 0 && lastPage <= pages.count()) { if (zoomMode != FitInView) { QScrollBar *hsc = this->horizontalScrollBar(); QScrollBar *vsc = this->verticalScrollBar(); @@ -122,12 +128,12 @@ void PrintWidget::setCurrentPage(int pageNumber) { } else { this->centerOn(pages.at(curPage - 1)); } - } */ + }*/ - if (lastPage != curPage) + if (lastPage != curPage){ updatePreview(); - - qDebug() << "Current page set to " << pageNumber << "\n"; + } + //qDebug() << "Current page set to " << pageNumber << "\n"; } void PrintWidget::highlightText(TextData *text) { @@ -240,19 +246,24 @@ void PrintWidget::populateScene() { links.clear(); annots.clear(); // int numPages = BACKEND->numPages(); - if (!BACKEND->isDoneLoading()) { - qDebug() << "populateScene() called while backend still loading.\n"; + if (!BACKEND->isDoneLoading(curPage)) { + //qDebug() << "populateScene() called while backend still loading.\n"; return; } // nothing to show yet - - for (int i = curPage; i < curPage + 1; i++) { + int start = curPage; + int end = start; + if( viewMode == FacingPagesView){ end += 1; } + else if( viewMode == AllPagesView ) { start = 1; end = BACKEND->numPages(); } + //single-page view otherwise + //qDebug() << "Populate Scene" << start << end; + for (int i = start; i < end + 1; i++) { QImage pagePicture = BACKEND->imageHash(i); QSize paperSize = pagePicture.size(); QList<QGraphicsItem *> linkLocations; QList<QGraphicsItem *> annotLocations; if (pagePicture.isNull()) { - qDebug() << "NULL IMAGE ON PAGE " << i; + //qDebug() << "NULL IMAGE ON PAGE " << i; continue; } diff --git a/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp b/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp index bcccb0c5..002650f2 100644 --- a/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp @@ -7,6 +7,7 @@ #include <mupdf/fitz.h> #include <mupdf/pdf.h> +QMutex hashMutex; class Annot; inline QRectF convertRect(fz_rect bbox, double sf = 1.0) { @@ -180,6 +181,7 @@ Renderer::~Renderer() { bool Renderer::loadMultiThread() { return false; } void Renderer::handleLink(QWidget *obj, QString link) { + //qDebug() << "handle link"; float xp = 0.0, yp = 0.0; int pagenum = 0; @@ -206,6 +208,7 @@ void Renderer::handleLink(QWidget *obj, QString link) { // Traverse the outline tree through Preorder traversal void Renderer::traverseOutline(void *link, int level) { + //qDebug() << "traverse outline"; fz_outline *olink = (fz_outline *)link; Bookmark *bm = new Bookmark(olink->title, olink->uri, olink->page, level); @@ -220,9 +223,10 @@ void Renderer::traverseOutline(void *link, int level) { bool Renderer::loadDocument(QString path, QString password) { // first time through + //qDebug() << "Load Document:" << path; if (path != docpath) { if (DOC != 0) { - qDebug() << "New document"; + //qDebug() << "New document"; fz_drop_document(CTX, DOC); DOC = NULL; needpass = false; @@ -233,7 +237,7 @@ bool Renderer::loadDocument(QString path, QString password) { } } else if (DOC == 0) { fz_register_document_handlers(CTX); - qDebug() << "Document handlers registered"; + //qDebug() << "Document handlers registered"; } // fz_page_presentation @@ -258,7 +262,7 @@ bool Renderer::loadDocument(QString path, QString password) { // qDebug() << "Password Check cleared"; pnum = fz_count_pages(CTX, DOC); - qDebug() << "Page count: " << pnum; + //qDebug() << "Page count: " << pnum; doctitle.clear(); @@ -299,7 +303,7 @@ bool Renderer::loadDocument(QString path, QString password) { void renderer(Data *data, Renderer *obj) { int pagenum = data->getPage(); - // qDebug() << "Rendering:" << pagenum; + //qDebug() << "Rendering:" << pagenum; fz_context *ctx = data->getContext(); fz_rect bbox = data->getBoundingBox(); fz_matrix ctm = data->getMatrix(); @@ -317,18 +321,20 @@ void renderer(Data *data, Renderer *obj) { data->setImage(QImage(pixmap->samples, pixmap->w, pixmap->h, pixmap->stride, QImage::Format_RGB888)); data->setPixmap(pixmap); + hashMutex.lock(); dataHash.insert(pagenum, data); + hashMutex.unlock(); fz_close_device(ctx, dev); fz_drop_device(ctx, dev); fz_drop_context(ctx); - // qDebug() << "Finished rendering:" << pagenum; + //qDebug() << "Finished rendering:" << pagenum; emit obj->PageLoaded(pagenum); } void Renderer::renderPage(int pagenum, QSize DPI, int degrees) { - // qDebug() << "- Rendering Page:" << pagenum << degrees; + //qDebug() << "- Rendering Page:" << pagenum << degrees; Data *data; fz_matrix matrix; fz_rect bbox; @@ -339,7 +345,8 @@ void Renderer::renderPage(int pagenum, QSize DPI, int degrees) { fz_scale(&matrix, sf, sf); fz_pre_rotate(&matrix, degrees); - pdf_page *PAGE = pdf_load_page(CTX, (pdf_document *)DOC, pagenum); + //mupdf indexes pages starting at 0, not 1 + pdf_page *PAGE = pdf_load_page(CTX, (pdf_document *)DOC, pagenum-1); pdf_bound_page(CTX, PAGE, &bbox); emit OrigSize(QSizeF(bbox.x1 - bbox.x0, bbox.y1 - bbox.y0)); @@ -569,8 +576,7 @@ void Renderer::renderPage(int pagenum, QSize DPI, int degrees) { maxLen, contentType); if (type == 4 or type == 5) { QStringList optionList, exportList; - bool multi = - pdf_choice_widget_is_multiselect(CTX, (pdf_document *)DOC, widget); + bool multi = pdf_choice_widget_is_multiselect(CTX, (pdf_document *)DOC, widget); if (int listS = pdf_choice_widget_options(CTX, (pdf_document *)DOC, widget, 0, NULL)) { @@ -608,6 +614,7 @@ void Renderer::renderPage(int pagenum, QSize DPI, int degrees) { } QList<TextData *> Renderer::searchDocument(QString text, bool matchCase) { + //qDebug() << "Search Document"; fz_rect rectBuffer[1000]; QList<TextData *> results; for (int i = 0; i < pnum; i++) { @@ -639,38 +646,51 @@ QList<TextData *> Renderer::searchDocument(QString text, bool matchCase) { } QImage Renderer::imageHash(int pagenum) { + if(!dataHash.contains(pagenum)){ return QImage(); } return dataHash[pagenum]->getImage(); } +QSize Renderer::imageSize(int pagenum){ + if(!dataHash.contains(pagenum)){ return QSize(); } + return dataHash[pagenum]->getImage().size(); +} + int Renderer::hashSize() { return dataHash.size(); } void Renderer::clearHash() { - qDeleteAll(dataHash); + //qDeleteAll(dataHash); dataHash.clear(); } TextData *Renderer::linkList(int pagenum, int entry) { + if(!dataHash.contains(pagenum)){ return 0; } return dataHash[pagenum]->getLinkList()[entry]->getData(); } int Renderer::linkSize(int pagenum) { + if(!dataHash.contains(pagenum)){ return 0; } return dataHash[pagenum]->getLinkList().size(); } Annotation *Renderer::annotList(int pagenum, int entry) { + if(!dataHash.contains(pagenum)){ return 0; } return static_cast<Annotation *>(dataHash[pagenum]->getAnnotList(entry)); } int Renderer::annotSize(int pagenum) { + if(!dataHash.contains(pagenum)){ return 0; } return dataHash[pagenum]->getAnnotSize(); } Widget *Renderer::widgetList(int pagenum, int entry) { + if(!dataHash.contains(pagenum)){ return 0; } return dataHash[pagenum]->getWidgetList(entry); } int Renderer::widgetSize(int pagenum) { + if(!dataHash.contains(pagenum)){ return 0; } return dataHash[pagenum]->getWidgetSize(); } +bool Renderer::isDoneLoading(int page){ return dataHash.contains(page); } bool Renderer::supportsExtraFeatures() { return true; } diff --git a/src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp b/src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp index 6e5ff382..8f0755d4 100644 --- a/src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/Renderer-poppler.cpp @@ -154,13 +154,13 @@ void Renderer::renderPage(int pagenum, QSize DPI, int degrees) { } if (pagesStillLoading == 1) { - emit PageLoaded(); + emit PageLoaded(pagenum); } --pagesStillLoading; } -bool Renderer::isDoneLoading() { return pagesStillLoading == 0; } +bool Renderer::isDoneLoading(int page) { return imageCache.contains(page); } QList<TextData *> Renderer::searchDocument(QString text, bool matchCase) { QList<TextData *> results; @@ -177,9 +177,13 @@ QList<TextData *> Renderer::searchDocument(QString text, bool matchCase) { return results; } -QSize Renderer::imageSize(int pagenum) { return pages[pagenum].size(); } +QSize Renderer::imageSize(int pagenum) { + if(!imageCache.contains(pagenum)){ return QSize(); } + return pages[pagenum].size(); +} QImage Renderer::imageHash(int pagenum) { + if(!imageCache.contains(pagenum)){ return QImage(); } // while(pagesStillLoading > 0) { qDebug() << "pagesStillLoading!\n";} std::optional<QImage> cachedImage = imageCache.get(pagenum); diff --git a/src-qt5/desktop-utils/lumina-pdf/Renderer.h b/src-qt5/desktop-utils/lumina-pdf/Renderer.h index 5b12de03..6d4e4736 100644 --- a/src-qt5/desktop-utils/lumina-pdf/Renderer.h +++ b/src-qt5/desktop-utils/lumina-pdf/Renderer.h @@ -67,11 +67,11 @@ public: emit reloadPages(this->degrees); } - virtual bool isDoneLoading(); + virtual bool isDoneLoading(int page); virtual bool supportsExtraFeatures(); signals: - void PageLoaded(); + void PageLoaded(int); void SetProgress(int); void OrigSize(QSizeF); void reloadPages(int); diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp index 94aadbbb..1b93f3c3 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp @@ -25,6 +25,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()) { ui->setupUi(this); // this->setWindowTitle(tr("Lumina PDF Viewer")); this->setWindowIcon(LXDG::findIcon("application-pdf", "unknown")); + this->setFocusPolicy(Qt::StrongFocus); presentationLabel = 0; CurrentPage = 1; lastdir = QDir::homePath(); @@ -61,7 +62,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()) { this, SLOT(showContextMenu(const QPoint &))); QObject::connect(WIDGET, SIGNAL(currentPageChanged()), this, SLOT(updatePageNumber())); - QObject::connect(BACKEND, SIGNAL(PageLoaded()), this, SLOT(slotPageLoaded())); + QObject::connect(BACKEND, SIGNAL(PageLoaded(int)), this, SLOT(slotPageLoaded(int))); QObject::connect(BACKEND, SIGNAL(SetProgress(int)), this, SLOT(slotSetProgress(int))); QObject::connect(BACKEND, SIGNAL(reloadPages(int)), this, @@ -217,38 +218,28 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()) { ui->actionFit_Width->setIcon(LXDG::findIcon("transform-scale", "")); ui->actionFit_Page->setIcon(LXDG::findIcon("zoom-fit-best", "")); ui->actionOpen_PDF->setIcon(LXDG::findIcon("document-open", "")); - ui->actionSingle_Page->setIcon( - LXDG::findIcon("view-split-top-bottom", "format-view-agenda")); - ui->actionDual_Pages->setIcon( - LXDG::findIcon("view-split-left-right", "format-view-grid-small")); - ui->actionAll_Pages->setIcon( - LXDG::findIcon("view-grid", "format-view-grid-large")); + ui->actionSingle_Page->setIcon( LXDG::findIcon("view-split-top-bottom", "format-view-agenda")); + ui->actionDual_Pages->setIcon( LXDG::findIcon("view-split-left-right", "format-view-grid-small")); + ui->actionAll_Pages->setIcon( LXDG::findIcon("view-grid", "format-view-grid-large")); ui->actionScroll_Mode->setIcon(LXDG::findIcon("cursor-pointer", "")); ui->actionSelect_Mode->setIcon(LXDG::findIcon("cursor-text", "")); ui->actionZoom_In->setIcon(LXDG::findIcon("zoom-in", "")); ui->actionZoom_Out->setIcon(LXDG::findIcon("zoom-out", "")); ui->actionZoom_In_2->setIcon(LXDG::findIcon("zoom-in", "")); ui->actionZoom_Out_2->setIcon(LXDG::findIcon("zoom-out", "")); - ui->actionRotate_Counterclockwise->setIcon( - LXDG::findIcon("object-rotate-left", "")); - ui->actionRotate_Clockwise->setIcon( - LXDG::findIcon("object-rotate-right", "")); + ui->actionRotate_Counterclockwise->setIcon( LXDG::findIcon("object-rotate-left", "")); + ui->actionRotate_Clockwise->setIcon( LXDG::findIcon("object-rotate-right", "")); ui->actionFirst_Page->setIcon(LXDG::findIcon("go-first", "")); ui->actionPrevious_Page->setIcon(LXDG::findIcon("go-previous", "")); ui->actionNext_Page->setIcon(LXDG::findIcon("go-next", "")); ui->actionLast_Page->setIcon(LXDG::findIcon("go-last", "")); - ui->actionStart_Here->setIcon( - LXDG::findIcon("video-display", "media-playback-start-circled")); - ui->actionStart_Begin->setIcon( - LXDG::findIcon("view-presentation", "presentation-play")); - ui->actionStop_Presentation->setIcon( - LXDG::findIcon("media-playback-stop", "media-playback-stop-circled")); + ui->actionStart_Here->setIcon( LXDG::findIcon("video-display", "media-playback-start-circled")); + ui->actionStart_Begin->setIcon( LXDG::findIcon("view-presentation", "presentation-play")); + ui->actionStop_Presentation->setIcon( LXDG::findIcon("media-playback-stop", "media-playback-stop-circled")); ui->actionBookmarks->setIcon(LXDG::findIcon("bookmark-new", "")); ui->actionFind->setIcon(LXDG::findIcon("edit-find", "")); - ui->actionFind_Next->setIcon( - LXDG::findIcon("go-down-search", "edit-find-next")); - ui->actionFind_Previous->setIcon( - LXDG::findIcon("go-up-search", "edit-find-prev")); + ui->actionFind_Next->setIcon( LXDG::findIcon("go-down-search", "edit-find-next")); + ui->actionFind_Previous->setIcon( LXDG::findIcon("go-up-search", "edit-find-prev")); ui->actionProperties->setIcon(LXDG::findIcon("dialog-information", "")); ui->actionSettings->setIcon(LXDG::findIcon("document-properties", "")); ui->findNextB->setIcon(LXDG::findIcon("go-down-search")); @@ -280,6 +271,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()) { ui->actionScroll_Mode->setVisible(false); ui->actionSelect_Mode->setEnabled(false); ui->actionSelect_Mode->setVisible(false); + //qDebug() << "Done with MainUI Init"; } MainUI::~MainUI() { @@ -415,10 +407,9 @@ void MainUI::startPresentation(bool atStart) { void MainUI::ShowPage(int page) { // Check for valid document/page - // qDebug() << "Load Page:" << page << "/" << BACKEND->numPages() << "Index:" - // << page; - page = std::max(1, std::min(page, BACKEND->numPages())); - if (page == BACKEND->numPages() and CurrentPage == page) { + //qDebug() << "Load Page:" << page << "/" << BACKEND->numPages() << "Index:" << page; + //page = std::max(1, std::min(page, BACKEND->numPages())); + if (page == BACKEND->numPages()+2 ) { //allow one blank/black page after the end of the last slide endPresentation(); return; // invalid - no document loaded or invalid page specified } @@ -429,11 +420,11 @@ void MainUI::ShowPage(int page) { WIDGET->updatePreview(); return; } - // qDebug() << "Show Page:" << page << "/" << numPages; + //qDebug() << "Show Page:" << page << "/" << BACKEND->numPages(); CurrentPage = page; QImage PAGEIMAGE; if (page < BACKEND->numPages() + 1) { - PAGEIMAGE = BACKEND->imageHash(page - 1); + PAGEIMAGE = BACKEND->imageHash(page); } // Now scale the image according to the user-designations and show it @@ -448,6 +439,8 @@ void MainUI::ShowPage(int page) { // Blank page (useful so there is one blank page after the last slide before // stopping the presentation) presentationLabel->setPixmap(QPixmap()); + presentationLabel->setText(tr("Presentation Finished: Hit \"ESC\" key to close presentation view")); + presentationLabel->setAlignment(Qt::AlignBottom | Qt::AlignHCenter); } } @@ -463,14 +456,17 @@ void MainUI::endPresentation() { clockTimer->stop(); clockAct->setVisible(false); this->releaseKeyboard(); + if(WIDGET->currentPage() >= BACKEND->numPages()){ + lastPage(); + } updatePageNumber(); } void MainUI::startLoadingPages(int degrees) { - // qDebug() <<"Start Loading Pages"; + //qDebug() <<"Start Loading Pages"; // if(BACKEND->hashSize() != 0) { return; } //currently loaded[ing] loadingQueue.clear(); - // BACKEND->clearHash(); + BACKEND->clearHash(); WIDGET->setVisible(false); BOOKMARKS->setVisible(false); progress->setRange(0, BACKEND->numPages()); @@ -485,8 +481,7 @@ void MainUI::startLoadingPages(int degrees) { // pixelization) The best approach seams to be to increase the DPI a bit, but // match that with the same scaling on the page size (smoothing) - QSize DPI(250, - 250); // print-quality (some printers even go to 600 DPI nowdays) + QSize DPI(250, 250); // print-quality (some printers even go to 600 DPI nowdays) /*qDebug() << "Screen Resolutions:"; QList<QScreen*> screens = QApplication::screens(); @@ -506,33 +501,36 @@ void MainUI::startLoadingPages(int degrees) { } } } - // qDebug() << "Finish page loading kickoff"; + //qDebug() << "Finish page loading kickoff"; } void MainUI::slotSetProgress(int finished) { progress->setValue(finished); } -void MainUI::slotPageLoaded() { - // loadingQueue.push_back(page); - // int finished = loadingQueue.size(); - // qDebug() << "Page Loaded:" << page << finished; - // if (finished == BACKEND->numPages()) { - progAct->setVisible(false); - WIDGET->setVisible(true); - BOOKMARKS->setVisible(true); - ui->splitter->setSizes(QList<int>() << 0 << this->width()); - WIDGET->setCurrentPage(1); - ui->actionStop_Presentation->setEnabled(false); - ui->actionStart_Here->setEnabled(true); - ui->actionStart_Begin->setEnabled(true); - pageAct->setVisible(true); - PROPDIALOG->setSize(pageSize); - qDebug() << " - Document Setup: All pages loaded"; +void MainUI::slotPageLoaded(int page) { + //qDebug() << "slotPageLoaded"; + loadingQueue.push_back(page); + int finished = loadingQueue.size(); + //qDebug() << "Page Loaded:" << page << finished; + if (finished == BACKEND->numPages()) { + progAct->setVisible(false); + WIDGET->setVisible(true); + BOOKMARKS->setVisible(true); + ui->splitter->setSizes(QList<int>() << 0 << this->width()); + WIDGET->setCurrentPage(1); + ui->actionStop_Presentation->setEnabled(false); + ui->actionStart_Here->setEnabled(true); + ui->actionStart_Begin->setEnabled(true); + pageAct->setVisible(true); + PROPDIALOG->setSize(pageSize); + //qDebug() << " - Document Setup: All pages loaded"; + } // QTimer::singleShot(10, WIDGET, // SLOT(updatePreview())); // start loading the file preview WIDGET->updatePreview(); } void MainUI::paintToPrinter(QPrinter *PRINTER) { + //qDebug() << "paintToPrinter()"; if (BACKEND->hashSize() != BACKEND->numPages()) { return; } @@ -649,8 +647,8 @@ void MainUI::OpenNewFile() { } void MainUI::updateClock() { - label_clock->setText( - QDateTime::currentDateTime().toString("<b>hh:mm:ss</b>")); + label_clock->setText("<b>"+ + QDateTime::currentDateTime().toString( Qt::DefaultLocaleShortDate)+"</b>"); } void MainUI::updatePageNumber() { @@ -693,6 +691,7 @@ void MainUI::updateContextMenu() { } void MainUI::keyPressEvent(QKeyEvent *event) { + //qDebug() << "Got Key Press Event!"; // See if this is one of the special hotkeys and act appropriately bool inPresentation = (presentationLabel != 0); switch (event->key()) { @@ -746,6 +745,7 @@ void MainUI::keyPressEvent(QKeyEvent *event) { void MainUI::wheelEvent(QWheelEvent *event) { // Scroll the window according to the mouse wheel + //qDebug() << "Got Wheel Event!"; QMainWindow::wheelEvent(event); } diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.h b/src-qt5/desktop-utils/lumina-pdf/mainUI.h index 61467811..9220a448 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.h +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.h @@ -74,7 +74,7 @@ private: private slots: void startLoadingPages(int degrees = 0); - void slotPageLoaded(); + void slotPageLoaded(int); void slotSetProgress(int); // Simplification routines diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.ui b/src-qt5/desktop-utils/lumina-pdf/mainUI.ui index 0db7460b..f155a817 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.ui +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.ui @@ -116,7 +116,7 @@ <x>0</x> <y>0</y> <width>697</width> - <height>23</height> + <height>24</height> </rect> </property> <property name="contextMenuPolicy"> @@ -322,11 +322,17 @@ <property name="text"> <string>Previous Page</string> </property> + <property name="shortcutContext"> + <enum>Qt::ApplicationShortcut</enum> + </property> </action> <action name="actionNext_Page"> <property name="text"> <string>Next Page</string> </property> + <property name="shortcutContext"> + <enum>Qt::ApplicationShortcut</enum> + </property> </action> <action name="actionLast_Page"> <property name="text"> |