[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kpdf_annotations: kdegraphics/kpdf
From: Enrico Ros <rosenric () dei ! unipd ! it>
Date: 2005-04-07 9:53:16
Message-ID: 20050407095316.307CD487 () office ! kde ! org
[Download RAW message or body]
CVS commit by eros:
Implemented PDF:FullScreen and Close action to KPDF 'Presentation' and
'EndPresentation' actions. Based on testcase by Mikolaj.
M +9 -3 part.cpp 1.25.2.5
M +1 -0 part.h 1.10.2.2
M +6 -0 core/document.cpp 1.32.2.8
M +2 -0 core/document.h 1.19.2.4
M +2 -1 core/link.h 1.7.2.1
M +4 -0 core/generator_pdf/gp_outputdev.cpp 1.8.2.1
--- kdegraphics/kpdf/core/generator_pdf/gp_outputdev.cpp #1.8:1.8.2.1
@@ -323,4 +323,8 @@ KPDFLink * KPDFOutputDev::generateLink(
else if ( !strcmp( name, "Find" ) )
link = new KPDFLinkAction( KPDFLinkAction::Find );
+ else if ( !strcmp( name, "FullScreen" ) )
+ link = new KPDFLinkAction( KPDFLinkAction::Presentation );
+ else if ( !strcmp( name, "Close" ) )
+ link = new KPDFLinkAction( KPDFLinkAction::EndPresentation );
else
kdDebug() << "Unknown named action: '" << name << "'" << endl;
--- kdegraphics/kpdf/core/link.h #1.7:1.7.2.1
@@ -89,5 +89,6 @@ class KPDFLinkAction : public KPDFLink
public:
// define types of actions
- enum ActionType { PageFirst, PagePrev, PageNext, PageLast, HistoryBack, \
HistoryForward, Quit, Find, GoToPage }; + enum ActionType { PageFirst, \
PagePrev, PageNext, PageLast, HistoryBack, HistoryForward, + \
Quit, Presentation, EndPresentation, Find, GoToPage };
// query for action type
--- kdegraphics/kpdf/core/document.h #1.19.2.3:1.19.2.4
@@ -103,4 +103,6 @@ class KPDFDocument : public QObject
void linkFind();
void linkGoToPage();
+ void linkPresentation();
+ void linkEndPresentation();
void openURL(const KURL &url);
--- kdegraphics/kpdf/core/document.cpp #1.32.2.7:1.32.2.8
@@ -993,4 +993,10 @@ void KPDFDocument::processLink( const KP
kapp->quit();
break;
+ case KPDFLinkAction::Presentation:
+ emit linkPresentation();
+ break;
+ case KPDFLinkAction::EndPresentation:
+ emit linkEndPresentation();
+ break;
case KPDFLinkAction::Find:
emit linkFind();
--- kdegraphics/kpdf/part.h #1.10.2.1:1.10.2.2
@@ -102,4 +102,5 @@ protected slots:
void slotShowLeftPanel();
void slotShowPresentation();
+ void slotHidePresentation();
// can be connected to widget elements
void updateViewActions();
--- kdegraphics/kpdf/part.cpp #1.25.2.4:1.25.2.5
@@ -105,4 +105,6 @@ Part::Part(QWidget *parentWidget, const
connect( m_document, SIGNAL( linkFind() ), this, SLOT( slotFind() ) );
connect( m_document, SIGNAL( linkGoToPage() ), this, SLOT( slotGoToPage() ) \
); + connect( m_document, SIGNAL( linkPresentation() ), this, SLOT( \
slotShowPresentation() ) ); + connect( m_document, SIGNAL( \
linkEndPresentation() ), this, SLOT( slotHidePresentation() ) );
connect( m_document, SIGNAL( openURL(const KURL &) ), this, SLOT( \
openURL(const KURL &) ) );
@@ -728,8 +730,12 @@ void Part::slotShowProperties()
void Part::slotShowPresentation()
{
+ slotHidePresentation();
+ m_presentationWidget = new PresentationWidget( m_document );
+}
+
+void Part::slotHidePresentation()
+{
if ( m_presentationWidget )
delete (PresentationWidget*) m_presentationWidget;
-
- m_presentationWidget = new PresentationWidget( m_document );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic