| 205 | const QEvent::Type PDFLinksLoadedEvent::LinksLoadedEvent = static_cast<QEvent::Type>( QEvent::registerEventType() ); |
| 206 | |
| 207 | bool PageProcessingRenderPageRequest::execute() |
| 208 | { |
| 209 | // TODO: Aborting renders doesn't really work right now---the backend knows |
| 210 | // nothing about the PDF scenes. |
| 211 | // |
| 212 | // Idea: Perhaps allow page render requests to provide a pointer to a function |
| 213 | // that returns a `bool` value indicating if the request is still valid? Then |
| 214 | // the `PDFPageGraphicsItem` could have a function that indicates if the item |
| 215 | // is anywhere near a viewport. |
| 216 | QImage rendered_page = page->renderToImage(xres, yres, render_box, cache); |
| 217 | QCoreApplication::postEvent(listener, new PDFPageRenderedEvent(xres, yres, render_box, rendered_page)); |
| 218 | |
| 219 | return true; |
| 220 | } |
| 221 | |
| 222 | bool PageProcessingLoadLinksRequest::execute() |
| 223 | { |
no test coverage detected