[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [okular] core: Extend Document::processAction() to handle RenditionActions
From: Tobias Koenig <tokoe () kde ! org>
Date: 2012-10-22 11:05:51
Message-ID: 20121022110551.6BC4BA60CB () git ! kde ! org
[Download RAW message or body]
Git commit 563ad0458e7def8c68fc5fd6978b550200d6e7b7 by Tobias Koenig.
Committed on 27/09/2012 at 14:15.
Pushed by tokoe into branch 'master'.
Extend Document::processAction() to handle RenditionActions
REVIEW: 106608
M +13 -0 core/document.cpp
M +8 -0 core/document.h
http://commits.kde.org/okular/563ad0458e7def8c68fc5fd6978b550200d6e7b7
diff --git a/core/document.cpp b/core/document.cpp
index bddef39..1331c44 100644
--- a/core/document.cpp
+++ b/core/document.cpp
@@ -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;
}
}
diff --git a/core/document.h b/core/document.h
index d47acec..ac1d056 100644
--- a/core/document.h
+++ b/core/document.h
@@ -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;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic