diff --git a/part.cpp b/part.cpp index 7ce186bda..627d0f7ad 100644 --- a/part.cpp +++ b/part.cpp @@ -1427,6 +1427,17 @@ void Part::slotHidePresentation() } +void Part::slotTogglePresentation() +{ + if ( m_document->isOpened() ) + { + if ( !m_presentationWidget ) + m_presentationWidget = new PresentationWidget( widget(), m_document ); + else delete (PresentationWidget*) m_presentationWidget; + } +} + + void Part::slotAboutBackend() { const KComponentData *data = m_document->componentData(); diff --git a/part.h b/part.h index 87fd2d95f..0451cd6e7 100644 --- a/part.h +++ b/part.h @@ -108,6 +108,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi Q_SCRIPTABLE void slotNextPage(); Q_SCRIPTABLE void slotGotoFirst(); Q_SCRIPTABLE void slotGotoLast(); + Q_SCRIPTABLE void slotTogglePresentation(); signals: void enablePrintAction(bool enable);