| 997 | } |
| 998 | |
| 999 | void PDFDocumentWindow::jumpToSource() |
| 1000 | { |
| 1001 | QAction *act = qobject_cast<QAction*>(sender()); |
| 1002 | if (!act || !pdfWidget) |
| 1003 | return; |
| 1004 | |
| 1005 | QPoint eventPos = act->data().toPoint(); |
| 1006 | QPointF scenePos = pdfWidget->mapToScene(pdfWidget->mapFrom(this, eventPos)); |
| 1007 | |
| 1008 | // Map to scene, then map to page |
| 1009 | QtPDF::PDFDocumentScene * scene = qobject_cast<QtPDF::PDFDocumentScene*>(pdfWidget->scene()); |
| 1010 | if (!scene) |
| 1011 | return; |
| 1012 | QtPDF::PDFPageGraphicsItem * page = dynamic_cast<QtPDF::PDFPageGraphicsItem*>(scene->pageAt(scenePos)); |
| 1013 | if (!page) |
| 1014 | return; |
| 1015 | |
| 1016 | syncClick(scene->pageNumFor(page), page->mapToPage(page->mapFromScene(scenePos))); |
| 1017 | } |
| 1018 | |
| 1019 | void PDFDocumentWindow::doFindDialog() |
| 1020 | { |
nothing calls this directly
no test coverage detected