mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 03:30:20 +00:00
Extend Document::processAction() to handle RenditionActions
REVIEW: 106608
This commit is contained in:
parent
d68bba55b4
commit
563ad0458e
|
@ -3254,6 +3254,19 @@ void Document::processAction( const Action * action )
|
|||
case Action::Movie:
|
||||
emit processMovieAction( static_cast< const MovieAction * >( action ) );
|
||||
break;
|
||||
case Action::Rendition: {
|
||||
const RenditionAction * linkrendition = static_cast< const RenditionAction * >( action );
|
||||
if ( !linkrendition->script().isEmpty() )
|
||||
{
|
||||
if ( !d->m_scripter )
|
||||
d->m_scripter = new Scripter( d );
|
||||
d->m_scripter->execute( linkrendition->scriptType(), linkrendition->script() );
|
||||
}
|
||||
else
|
||||
{
|
||||
emit processRenditionAction( static_cast< const RenditionAction * >( action ) );
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ class Action;
|
|||
class MovieAction;
|
||||
class Page;
|
||||
class PixmapRequest;
|
||||
class RenditionAction;
|
||||
class SourceReference;
|
||||
class View;
|
||||
class VisiblePageRect;
|
||||
|
@ -801,6 +802,13 @@ class OKULAR_EXPORT Document : public QObject
|
|||
*/
|
||||
void processMovieAction( const Okular::MovieAction *action );
|
||||
|
||||
/**
|
||||
* This signal is emitted whenever an rendition action is triggered and the UI should process it.
|
||||
*
|
||||
* @since 0.16 (KDE 4.10)
|
||||
*/
|
||||
void processRenditionAction( const Okular::RenditionAction *action );
|
||||
|
||||
private:
|
||||
/// @cond PRIVATE
|
||||
friend class DocumentPrivate;
|
||||
|
|
Loading…
Reference in a new issue