mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-17 23:11:48 +00:00
rework for adding mem management / thread gen in preogress...
public slots -> public functions. they were slots, but wrongly. merget setPage and setPagePosition using overloading. svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=358204
This commit is contained in:
parent
5fee859d0e
commit
dec5dbb31b
|
@ -36,6 +36,7 @@
|
|||
#include "kpdf_error.h"
|
||||
#include "document.h"
|
||||
#include "page.h"
|
||||
#include "settings.h"
|
||||
|
||||
/* Notes:
|
||||
- FIXME event queuing to avoid flow loops (!!??) maybe avoided by the
|
||||
|
@ -80,8 +81,11 @@ KPDFDocument::KPDFDocument()
|
|||
d->pdfdoc = 0;
|
||||
d->currentPage = -1;
|
||||
d->searchPage = -1;
|
||||
// load paper color from Settings
|
||||
QColor col = Settings::paperColor();
|
||||
SplashColor paperColor;
|
||||
paperColor.rgb8 = splashMakeRGB8( 0xff, 0xff, 0xff );
|
||||
paperColor.rgb8 = splashMakeRGB8( col.red(), col.green(), col.blue() );
|
||||
// create the output device
|
||||
d->kpdfOutputDev = new KPDFOutputDev( paperColor );
|
||||
}
|
||||
|
||||
|
@ -92,6 +96,7 @@ KPDFDocument::~KPDFDocument()
|
|||
delete d;
|
||||
}
|
||||
|
||||
|
||||
bool KPDFDocument::openDocument( const QString & docFile )
|
||||
{
|
||||
// docFile is always local so we can use QFile on it
|
||||
|
@ -295,12 +300,7 @@ void KPDFDocument::requestTextPage( uint n )
|
|||
}
|
||||
|
||||
// BEGIN slots
|
||||
void KPDFDocument::slotSetCurrentPage( int page )
|
||||
{
|
||||
slotSetCurrentPageViewport( page, QRect() );
|
||||
}
|
||||
|
||||
void KPDFDocument::slotSetCurrentPageViewport( int page, const QRect & viewport )
|
||||
void KPDFDocument::slotSetCurrentPage( int page, const QRect & viewport )
|
||||
{
|
||||
if ( page < 0 )
|
||||
page = 0;
|
||||
|
@ -438,7 +438,7 @@ void KPDFDocument::slotProcessLink( const KPDFLink * link )
|
|||
}
|
||||
// get destination position
|
||||
QRect r;
|
||||
KPDFPage * page = (pageNum >= 0 && pageNum < (int)d->pages.count()) ? d->pages[ pageNum ] : 0;
|
||||
//KPDFPage * page = (pageNum >= 0 && pageNum < (int)d->pages.count()) ? d->pages[ pageNum ] : 0;
|
||||
//if ( page )
|
||||
/* TODO
|
||||
switch ( dest->getKind() )
|
||||
|
@ -463,7 +463,7 @@ void KPDFDocument::slotProcessLink( const KPDFLink * link )
|
|||
destFitR
|
||||
read and fit left,bottom,right,top
|
||||
}*/
|
||||
slotSetCurrentPageViewport( pageNum, r );
|
||||
slotSetCurrentPage( pageNum, r );
|
||||
}
|
||||
delete namedDest;
|
||||
delete dest;
|
||||
|
|
|
@ -74,10 +74,9 @@ public:
|
|||
void requestPixmap( int id, uint page, int width, int height, bool syncronous = false );
|
||||
void requestTextPage( uint page );
|
||||
|
||||
public slots:
|
||||
//public slots:
|
||||
// document commands via slots
|
||||
void slotSetCurrentPage( int page );
|
||||
void slotSetCurrentPageViewport( int page, const QRect & viewport );
|
||||
void slotSetCurrentPage( int page, const QRect & viewport = QRect() );
|
||||
void slotSetFilter( const QString & pattern, bool caseSensitive );
|
||||
void slotBookmarkPage( int page, bool enabled );
|
||||
void slotFind( const QString & text = "", bool caseSensitive = false );
|
||||
|
|
Loading…
Reference in a new issue