Commit 210a0d44 authored by Piotr Szymanski's avatar Piotr Szymanski

- backport links in presentations

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=435938
parent 931271f9
......@@ -470,7 +470,7 @@ void PDFGenerator::generatePixmap( PixmapRequest * request )
bool genTextPage = !page->hasSearchPage() && (request->width == page->width()) &&
(request->height == page->height());
// generate links and image rects if rendering pages on pageview
bool genObjectRects = request->id == PAGEVIEW_ID;
bool genObjectRects = request->id & (PAGEVIEW_ID | PRESENTATION_ID);
// 0. LOCK [waits for the thread end]
docLock.lock();
......@@ -2225,7 +2225,7 @@ void PDFPixmapGeneratorThread::run()
( height == page->height() );
// generate links and image rects if rendering pages on pageview
bool genObjectRects = d->currentRequest->id == PAGEVIEW_ID;
bool genObjectRects = d->currentRequest->id & (PAGEVIEW_ID | PRESENTATION_ID);
// 0. LOCK s[tart locking XPDF thread unsafe classes]
d->generator->docLock.lock();
......
This diff is collapsed.
......@@ -22,6 +22,7 @@ class QTimer;
class KPDFDocument;
class KPDFPage;
class KPDFLink;
class PresentationFrame;
/**
......@@ -49,10 +50,13 @@ class PresentationWidget : public QDialog, public DocumentObserver
void keyPressEvent( QKeyEvent * e );
void wheelEvent( QWheelEvent * e );
void mousePressEvent( QMouseEvent * e );
void mouseReleaseEvent( QMouseEvent * e );
void mouseMoveEvent( QMouseEvent * e );
void paintEvent( QPaintEvent * e );
private:
const KPDFLink * getLink( int x, int y, QRect * geometry = 0 ) const;
void testCursorOnLink( int x, int y );
void overlayClick( const QPoint & position );
void changePage( int newPage );
void generatePage();
......@@ -69,6 +73,8 @@ class PresentationWidget : public QDialog, public DocumentObserver
QPixmap m_lastRenderedPixmap;
QPixmap m_lastRenderedOverlay;
QRect m_overlayGeometry;
const KPDFLink * m_pressedLink;
bool m_handCursor;
// transition related
QTimer * m_transitionTimer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment