mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-13 05:01:30 +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();
|
d->searches.clear();
|
||||||
|
|
||||||
// reset internal variables
|
// reset internal variables
|
||||||
|
d->url = KURL();
|
||||||
d->viewportHistory.clear();
|
d->viewportHistory.clear();
|
||||||
d->viewportHistory.append( DocumentViewport() );
|
d->viewportHistory.append( DocumentViewport() );
|
||||||
d->viewportIterator = d->viewportHistory.begin();
|
d->viewportIterator = d->viewportHistory.begin();
|
||||||
|
@ -369,6 +370,11 @@ uint KPDFDocument::pages() const
|
||||||
return pages_vector.size();
|
return pages_vector.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KURL KPDFDocument::currentDocument() const
|
||||||
|
{
|
||||||
|
return d->url;
|
||||||
|
}
|
||||||
|
|
||||||
bool KPDFDocument::isAllowed( int flags ) const
|
bool KPDFDocument::isAllowed( int flags ) const
|
||||||
{
|
{
|
||||||
return generator ? generator->isAllowed( flags ) : false;
|
return generator ? generator->isAllowed( flags ) : false;
|
||||||
|
|
|
@ -74,6 +74,7 @@ class KPDFDocument : public QObject
|
||||||
const DocumentViewport & viewport() const;
|
const DocumentViewport & viewport() const;
|
||||||
uint currentPage() const;
|
uint currentPage() const;
|
||||||
uint pages() const;
|
uint pages() const;
|
||||||
|
KURL currentDocument() const;
|
||||||
bool isAllowed( int /*Document::Permisison(s)*/ ) const;
|
bool isAllowed( int /*Document::Permisison(s)*/ ) const;
|
||||||
bool historyAtBegin() const;
|
bool historyAtBegin() const;
|
||||||
bool historyAtEnd() const;
|
bool historyAtEnd() const;
|
||||||
|
|
30
dcop.h
30
dcop.h
|
@ -7,26 +7,28 @@
|
||||||
* (at your option) any later version. *
|
* (at your option) any later version. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef MY_INTERFACE_H
|
#ifndef _KPDF_DCOP_INTERFACE_H_
|
||||||
#define MY_INTERFACE_H
|
#define _KPDF_DCOP_INTERFACE_H_
|
||||||
|
|
||||||
#include <dcopobject.h>
|
#include <dcopobject.h>
|
||||||
#include <kurl.h>
|
#include <kurl.h>
|
||||||
|
|
||||||
class kpdf_dcop : virtual public DCOPObject
|
class kpdf_dcop : virtual public DCOPObject
|
||||||
{
|
{
|
||||||
K_DCOP
|
K_DCOP
|
||||||
k_dcop:
|
k_dcop:
|
||||||
virtual ASYNC goToPage(uint page) = 0;
|
virtual ASYNC goToPage( uint page ) = 0;
|
||||||
virtual ASYNC openDocument(KURL doc) = 0;
|
virtual ASYNC openDocument( KURL doc ) = 0;
|
||||||
virtual uint pages() = 0;
|
virtual uint pages() = 0;
|
||||||
virtual void slotPreferences() = 0;
|
virtual uint currentPage() = 0;
|
||||||
virtual void slotFind() = 0;
|
virtual KURL currentDocument() = 0;
|
||||||
virtual void slotPrintPreview() = 0;
|
virtual void slotPreferences() = 0;
|
||||||
virtual void slotPreviousPage() = 0;
|
virtual void slotFind() = 0;
|
||||||
virtual void slotNextPage() = 0;
|
virtual void slotPrintPreview() = 0;
|
||||||
virtual void slotGotoFirst() = 0;
|
virtual void slotPreviousPage() = 0;
|
||||||
virtual void slotGotoLast() = 0;
|
virtual void slotNextPage() = 0;
|
||||||
|
virtual void slotGotoFirst() = 0;
|
||||||
|
virtual void slotGotoLast() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
14
part.cpp
14
part.cpp
|
@ -310,12 +310,22 @@ void Part::goToPage(uint i)
|
||||||
|
|
||||||
void Part::openDocument(KURL doc)
|
void Part::openDocument(KURL doc)
|
||||||
{
|
{
|
||||||
openURL(doc);
|
openURL(doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint Part::pages()
|
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
|
//this don't go anywhere but is required by genericfactory.h
|
||||||
|
|
2
part.h
2
part.h
|
@ -75,6 +75,8 @@ public:
|
||||||
ASYNC goToPage(uint page);
|
ASYNC goToPage(uint page);
|
||||||
ASYNC openDocument(KURL doc);
|
ASYNC openDocument(KURL doc);
|
||||||
uint pages();
|
uint pages();
|
||||||
|
uint currentPage();
|
||||||
|
KURL currentDocument();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// reimplemented from KParts::ReadOnlyPart
|
// reimplemented from KParts::ReadOnlyPart
|
||||||
|
|
Loading…
Reference in a new issue