Commit 0124e8a4 authored by Tobias Koenig's avatar Tobias Koenig

Let the PresentationWidget make use of the viewport. Now the presentation is

shown at the same page like before when a watched PDF file has changed.

svn path=/trunk/kdegraphics/kpdf/; revision=383193
parent 0cc0b192
......@@ -160,6 +160,11 @@ void PresentationWidget::notifySetup( const QValueVector< KPDFPage * > & pageSet
m_metaStrings += i18n( "Click to begin" );
}
void PresentationWidget::notifyViewportChanged()
{
changePage( m_document->viewport().pageNumber );
}
void PresentationWidget::notifyPageChanged( int pageNumber, int changedFlags )
{
// check if it's the last requested pixmap. if so update the widget.
......@@ -321,6 +326,8 @@ void PresentationWidget::changePage( int newPage )
}
else
generatePage();
m_document->setViewportPage( m_frameIndex, PRESENTATION_ID );
}
void PresentationWidget::generatePage()
......
......@@ -39,6 +39,7 @@ class PresentationWidget : public QWidget, public DocumentObserver
// inherited from DocumentObserver
uint observerId() const { return PRESENTATION_ID; }
void notifySetup( const QValueVector< KPDFPage * > & pages, bool documentChanged );
void notifyViewportChanged();
void notifyPageChanged( int pageNumber, int changedFlags );
bool canUnloadPixmap( int pageNumber );
......
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