mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 10:55:37 +00:00
merging patch_080,085
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=425031
This commit is contained in:
parent
d65e147ffb
commit
5fa94e1643
|
@ -249,6 +249,7 @@ void KPDFDocument::closeDocument()
|
|||
d->searches.clear();
|
||||
|
||||
// reset internal variables
|
||||
d->url = KURL();
|
||||
d->viewportHistory.clear();
|
||||
d->viewportHistory.append( DocumentViewport() );
|
||||
d->viewportIterator = d->viewportHistory.begin();
|
||||
|
@ -369,6 +370,11 @@ uint KPDFDocument::pages() const
|
|||
return pages_vector.size();
|
||||
}
|
||||
|
||||
KURL KPDFDocument::currentDocument() const
|
||||
{
|
||||
return d->url;
|
||||
}
|
||||
|
||||
bool KPDFDocument::isAllowed( int flags ) const
|
||||
{
|
||||
return generator ? generator->isAllowed( flags ) : false;
|
||||
|
|
|
@ -74,6 +74,7 @@ class KPDFDocument : public QObject
|
|||
const DocumentViewport & viewport() const;
|
||||
uint currentPage() const;
|
||||
uint pages() const;
|
||||
KURL currentDocument() const;
|
||||
bool isAllowed( int /*Document::Permisison(s)*/ ) const;
|
||||
bool historyAtBegin() const;
|
||||
bool historyAtEnd() const;
|
||||
|
|
30
dcop.h
30
dcop.h
|
@ -7,26 +7,28 @@
|
|||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MY_INTERFACE_H
|
||||
#define MY_INTERFACE_H
|
||||
#ifndef _KPDF_DCOP_INTERFACE_H_
|
||||
#define _KPDF_DCOP_INTERFACE_H_
|
||||
|
||||
#include <dcopobject.h>
|
||||
#include <kurl.h>
|
||||
|
||||
class kpdf_dcop : virtual public DCOPObject
|
||||
{
|
||||
K_DCOP
|
||||
k_dcop:
|
||||
virtual ASYNC goToPage(uint page) = 0;
|
||||
virtual ASYNC openDocument(KURL doc) = 0;
|
||||
virtual uint pages() = 0;
|
||||
virtual void slotPreferences() = 0;
|
||||
virtual void slotFind() = 0;
|
||||
virtual void slotPrintPreview() = 0;
|
||||
virtual void slotPreviousPage() = 0;
|
||||
virtual void slotNextPage() = 0;
|
||||
virtual void slotGotoFirst() = 0;
|
||||
virtual void slotGotoLast() = 0;
|
||||
K_DCOP
|
||||
k_dcop:
|
||||
virtual ASYNC goToPage( uint page ) = 0;
|
||||
virtual ASYNC openDocument( KURL doc ) = 0;
|
||||
virtual uint pages() = 0;
|
||||
virtual uint currentPage() = 0;
|
||||
virtual KURL currentDocument() = 0;
|
||||
virtual void slotPreferences() = 0;
|
||||
virtual void slotFind() = 0;
|
||||
virtual void slotPrintPreview() = 0;
|
||||
virtual void slotPreviousPage() = 0;
|
||||
virtual void slotNextPage() = 0;
|
||||
virtual void slotGotoFirst() = 0;
|
||||
virtual void slotGotoLast() = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
14
part.cpp
14
part.cpp
|
@ -310,12 +310,22 @@ void Part::goToPage(uint i)
|
|||
|
||||
void Part::openDocument(KURL doc)
|
||||
{
|
||||
openURL(doc);
|
||||
openURL(doc);
|
||||
}
|
||||
|
||||
uint Part::pages()
|
||||
{
|
||||
return m_document->pages();
|
||||
return m_document->pages();
|
||||
}
|
||||
|
||||
uint Part::currentPage()
|
||||
{
|
||||
return m_document->pages() ? m_document->currentPage() + 1 : 0;
|
||||
}
|
||||
|
||||
KURL Part::currentDocument()
|
||||
{
|
||||
return m_document->currentDocument();
|
||||
}
|
||||
|
||||
//this don't go anywhere but is required by genericfactory.h
|
||||
|
|
Loading…
Reference in a new issue