2004-08-26 21:17:24 +00:00
|
|
|
/***************************************************************************
|
2004-09-27 21:36:25 +00:00
|
|
|
* Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> *
|
2004-08-26 21:17:24 +00:00
|
|
|
* Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es> *
|
|
|
|
* *
|
2005-01-02 14:29:37 +00:00
|
|
|
* With portions of code from kpdf/kpdf_pagewidget.h by: *
|
2004-09-27 21:36:25 +00:00
|
|
|
* Copyright (C) 2002 by Wilco Greven <greven@kde.org> *
|
|
|
|
* Copyright (C) 2003 by Christophe Devriese *
|
|
|
|
* <Christophe.Devriese@student.kuleuven.ac.be> *
|
|
|
|
* Copyright (C) 2003 by Laurent Montel <montel@kde.org> *
|
|
|
|
* Copyright (C) 2003 by Kurt Pfeifle <kpfeifle@danka.de> *
|
|
|
|
* *
|
2004-08-26 21:17:24 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
2004-10-29 21:52:06 +00:00
|
|
|
// This file follows coding style described in kdebase/kicker/HACKING
|
2004-08-26 21:17:24 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
#ifndef _OKULAR_PAGEVIEW_H_
|
|
|
|
#define _OKULAR_PAGEVIEW_H_
|
2002-08-30 09:14:01 +00:00
|
|
|
|
2006-10-07 14:40:32 +00:00
|
|
|
#include <qscrollarea.h>
|
2006-10-03 17:13:42 +00:00
|
|
|
#include <qlist.h>
|
2006-03-23 20:43:38 +00:00
|
|
|
#include <qvector.h>
|
- Page/Link: tooltips for links backported
- Page: rotation does not switch height and width
- Document/Part/Generator:
1. Add API for attaching stuff to the interface: ActionCollection and the Navigation Panel
also add possibility to merge an XML .rc file with menu layout. Relevant functions are:
QString Generator::getXMLFile(), returns a QString with your .rc file name.
void Generator::setupGUI (KActionCollection* , QToolbox* ), add your components to the user interface
2. Supporting backend settings:
If during startup, backends which provide a configuration ([X-KDE-oKularHasInternalSettings]
set to true) are found, a menu item: configure backends is created, clicking on it results in
loading all the generators that have settings, but not those that dont. the Generator::addPages(KConfigDialog *dlg)
function should be overloaded by a generator and dlg->addPage should be used to add pages.
If a user opens a file that needs an already loaded generator, the already loaded one is used instead of loading another.
3. Error/Warning/Notice sending support, to send a notice/error/warning, add a relevant notice/error/warning(QString& txt ,int duration)
to the generator class, and sending a message to the user is as simple as emitting a signal!
4. Intercepting of events generated by the PageView is done by Generator::handleEvent(QEvent*), subclass it, do a switch on QEvent::type(), handle your
event and return true if pageview is to proceed with its handling or false if not.
5. Support configuring the KPrinter on the generator side, use Generator::canConfigurePrinter(), return true there, and you get a nonconfigured KPrinter in your
Generator::print()
6. PixmapRequest handling update:
a.) Generator::canGeneratePixmap is now Generator::canGeneratePixmap(bool async)
b.) Document::sendGeneratorRequests is a slot now
c.) Old way of sending pixmaps (Document::requestPixmaps(QValueList<PixmapRequest*> checking if we can generate pixmap if not, waiting for receiving)
is replaced with: requestPixmaps only queues the pixmap all checking if w can generate is done in sendGeneratorReqest, the sendGeneratorRequest is
run in three places:
1. in requestPixmaps when we receive a request
2. in requestDone if pixmapStack is not empty
3. sendGeneratorRequest, apart from removing invalid requests, takes the current request and if generator canGeratePixmap(request->async)
it removes the pixmap from stack and sends to generator if not, QTimer::singleshots to itself after 20ms, it ends when stack has no valid pixmap request
7. Added a commented out zoom field to PixmapGenerator, mightcome in handy sometime
- TextPage: add instructions that handle simplyfing the RegularAreaRect, no more double painted borders in selection rectangles, this rocks.
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445196
2005-08-10 16:14:39 +00:00
|
|
|
#include "ui/pageviewutils.h"
|
2006-10-03 17:13:42 +00:00
|
|
|
#include "core/area.h"
|
2005-01-02 14:55:14 +00:00
|
|
|
#include "core/observer.h"
|
2004-08-28 09:27:38 +00:00
|
|
|
|
2004-09-11 15:59:32 +00:00
|
|
|
class KActionCollection;
|
2004-09-04 22:28:14 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
namespace Okular {
|
|
|
|
class Document;
|
2006-08-08 15:31:13 +00:00
|
|
|
struct Annotation;
|
2006-09-21 08:45:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class PageViewPrivate;
|
2006-10-07 14:40:32 +00:00
|
|
|
class PageViewWidget;
|
2003-09-14 14:32:05 +00:00
|
|
|
|
2004-09-26 23:39:39 +00:00
|
|
|
/**
|
2005-03-05 15:59:15 +00:00
|
|
|
* @short The main view. Handles zoom and continuous mode.. oh, and page
|
2004-10-20 16:41:13 +00:00
|
|
|
* @short display of course :-)
|
2004-10-29 21:52:06 +00:00
|
|
|
* ...
|
2004-09-26 23:39:39 +00:00
|
|
|
*/
|
2006-10-07 14:40:32 +00:00
|
|
|
class PageView : public QScrollArea, public Okular::DocumentObserver
|
2004-09-12 23:19:03 +00:00
|
|
|
{
|
2006-10-07 14:40:32 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
friend class PageViewWidget;
|
2004-10-29 21:52:06 +00:00
|
|
|
|
|
|
|
public:
|
2006-09-21 08:45:36 +00:00
|
|
|
PageView( QWidget *parent, Okular::Document *document );
|
2004-10-29 21:52:06 +00:00
|
|
|
~PageView();
|
|
|
|
|
|
|
|
// Zoom mode ( last 4 are internally used only! )
|
2005-06-24 16:43:19 +00:00
|
|
|
enum ZoomMode { ZoomFixed = 0, ZoomFitWidth = 1, ZoomFitPage = 2, ZoomFitText,
|
2004-11-03 17:35:48 +00:00
|
|
|
ZoomIn, ZoomOut, ZoomRefreshCurrent };
|
2006-09-26 22:22:01 +00:00
|
|
|
enum MouseMode { MouseNormal, MouseZoom, MouseSelect, MouseTextSelect };
|
2004-10-29 21:52:06 +00:00
|
|
|
|
|
|
|
// create actions that interact with this widget
|
|
|
|
void setupActions( KActionCollection * collection );
|
|
|
|
|
2005-03-04 23:06:24 +00:00
|
|
|
// misc methods (from RMB menu/children)
|
2006-11-19 13:50:41 +00:00
|
|
|
bool canFitPageWidth() const;
|
2005-01-09 23:37:07 +00:00
|
|
|
void fitPageWidth( int page );
|
- Page/Link: tooltips for links backported
- Page: rotation does not switch height and width
- Document/Part/Generator:
1. Add API for attaching stuff to the interface: ActionCollection and the Navigation Panel
also add possibility to merge an XML .rc file with menu layout. Relevant functions are:
QString Generator::getXMLFile(), returns a QString with your .rc file name.
void Generator::setupGUI (KActionCollection* , QToolbox* ), add your components to the user interface
2. Supporting backend settings:
If during startup, backends which provide a configuration ([X-KDE-oKularHasInternalSettings]
set to true) are found, a menu item: configure backends is created, clicking on it results in
loading all the generators that have settings, but not those that dont. the Generator::addPages(KConfigDialog *dlg)
function should be overloaded by a generator and dlg->addPage should be used to add pages.
If a user opens a file that needs an already loaded generator, the already loaded one is used instead of loading another.
3. Error/Warning/Notice sending support, to send a notice/error/warning, add a relevant notice/error/warning(QString& txt ,int duration)
to the generator class, and sending a message to the user is as simple as emitting a signal!
4. Intercepting of events generated by the PageView is done by Generator::handleEvent(QEvent*), subclass it, do a switch on QEvent::type(), handle your
event and return true if pageview is to proceed with its handling or false if not.
5. Support configuring the KPrinter on the generator side, use Generator::canConfigurePrinter(), return true there, and you get a nonconfigured KPrinter in your
Generator::print()
6. PixmapRequest handling update:
a.) Generator::canGeneratePixmap is now Generator::canGeneratePixmap(bool async)
b.) Document::sendGeneratorRequests is a slot now
c.) Old way of sending pixmaps (Document::requestPixmaps(QValueList<PixmapRequest*> checking if we can generate pixmap if not, waiting for receiving)
is replaced with: requestPixmaps only queues the pixmap all checking if w can generate is done in sendGeneratorReqest, the sendGeneratorRequest is
run in three places:
1. in requestPixmaps when we receive a request
2. in requestDone if pixmapStack is not empty
3. sendGeneratorRequest, apart from removing invalid requests, takes the current request and if generator canGeratePixmap(request->async)
it removes the pixmap from stack and sends to generator if not, QTimer::singleshots to itself after 20ms, it ends when stack has no valid pixmap request
7. Added a commented out zoom field to PixmapGenerator, mightcome in handy sometime
- TextPage: add instructions that handle simplyfing the RegularAreaRect, no more double painted borders in selection rectangles, this rocks.
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445196
2005-08-10 16:14:39 +00:00
|
|
|
// keep in sync with pageviewutils
|
|
|
|
void displayMessage( const QString & message , PageViewMessage::Icon icon=PageViewMessage::Info, int duration=-1 );
|
2004-12-04 23:23:18 +00:00
|
|
|
|
2005-01-09 23:37:07 +00:00
|
|
|
// inherited from DocumentObserver
|
2004-10-29 21:52:06 +00:00
|
|
|
uint observerId() const { return PAGEVIEW_ID; }
|
2006-09-21 08:45:36 +00:00
|
|
|
void notifySetup( const QVector< Okular::Page * > & pages, bool documentChanged );
|
2005-02-01 18:23:55 +00:00
|
|
|
void notifyViewportChanged( bool smoothMove );
|
2005-01-09 23:37:07 +00:00
|
|
|
void notifyPageChanged( int pageNumber, int changedFlags );
|
|
|
|
void notifyContentsCleared( int changedFlags );
|
2006-11-20 20:10:42 +00:00
|
|
|
bool canUnloadPixmap( int pageNum ) const;
|
2004-10-29 21:52:06 +00:00
|
|
|
|
2006-10-03 17:13:42 +00:00
|
|
|
QList< Okular::RegularAreaRect * > textSelections( const QPoint& start, const QPoint& end, int& firstpage );
|
2006-10-22 20:53:56 +00:00
|
|
|
Okular::RegularAreaRect * textSelectionForItem( PageViewItem * item, const QPoint & startPoint = QPoint(), const QPoint & endPoint = QPoint() );
|
2006-10-03 17:13:42 +00:00
|
|
|
|
2006-10-28 22:58:05 +00:00
|
|
|
void reparseConfig();
|
|
|
|
|
- Page/Link: tooltips for links backported
- Page: rotation does not switch height and width
- Document/Part/Generator:
1. Add API for attaching stuff to the interface: ActionCollection and the Navigation Panel
also add possibility to merge an XML .rc file with menu layout. Relevant functions are:
QString Generator::getXMLFile(), returns a QString with your .rc file name.
void Generator::setupGUI (KActionCollection* , QToolbox* ), add your components to the user interface
2. Supporting backend settings:
If during startup, backends which provide a configuration ([X-KDE-oKularHasInternalSettings]
set to true) are found, a menu item: configure backends is created, clicking on it results in
loading all the generators that have settings, but not those that dont. the Generator::addPages(KConfigDialog *dlg)
function should be overloaded by a generator and dlg->addPage should be used to add pages.
If a user opens a file that needs an already loaded generator, the already loaded one is used instead of loading another.
3. Error/Warning/Notice sending support, to send a notice/error/warning, add a relevant notice/error/warning(QString& txt ,int duration)
to the generator class, and sending a message to the user is as simple as emitting a signal!
4. Intercepting of events generated by the PageView is done by Generator::handleEvent(QEvent*), subclass it, do a switch on QEvent::type(), handle your
event and return true if pageview is to proceed with its handling or false if not.
5. Support configuring the KPrinter on the generator side, use Generator::canConfigurePrinter(), return true there, and you get a nonconfigured KPrinter in your
Generator::print()
6. PixmapRequest handling update:
a.) Generator::canGeneratePixmap is now Generator::canGeneratePixmap(bool async)
b.) Document::sendGeneratorRequests is a slot now
c.) Old way of sending pixmaps (Document::requestPixmaps(QValueList<PixmapRequest*> checking if we can generate pixmap if not, waiting for receiving)
is replaced with: requestPixmaps only queues the pixmap all checking if w can generate is done in sendGeneratorReqest, the sendGeneratorRequest is
run in three places:
1. in requestPixmaps when we receive a request
2. in requestDone if pixmapStack is not empty
3. sendGeneratorRequest, apart from removing invalid requests, takes the current request and if generator canGeratePixmap(request->async)
it removes the pixmap from stack and sends to generator if not, QTimer::singleshots to itself after 20ms, it ends when stack has no valid pixmap request
7. Added a commented out zoom field to PixmapGenerator, mightcome in handy sometime
- TextPage: add instructions that handle simplyfing the RegularAreaRect, no more double painted borders in selection rectangles, this rocks.
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445196
2005-08-10 16:14:39 +00:00
|
|
|
public slots:
|
2006-06-10 12:59:09 +00:00
|
|
|
void errorMessage( const QString & message, int duration )
|
- Page/Link: tooltips for links backported
- Page: rotation does not switch height and width
- Document/Part/Generator:
1. Add API for attaching stuff to the interface: ActionCollection and the Navigation Panel
also add possibility to merge an XML .rc file with menu layout. Relevant functions are:
QString Generator::getXMLFile(), returns a QString with your .rc file name.
void Generator::setupGUI (KActionCollection* , QToolbox* ), add your components to the user interface
2. Supporting backend settings:
If during startup, backends which provide a configuration ([X-KDE-oKularHasInternalSettings]
set to true) are found, a menu item: configure backends is created, clicking on it results in
loading all the generators that have settings, but not those that dont. the Generator::addPages(KConfigDialog *dlg)
function should be overloaded by a generator and dlg->addPage should be used to add pages.
If a user opens a file that needs an already loaded generator, the already loaded one is used instead of loading another.
3. Error/Warning/Notice sending support, to send a notice/error/warning, add a relevant notice/error/warning(QString& txt ,int duration)
to the generator class, and sending a message to the user is as simple as emitting a signal!
4. Intercepting of events generated by the PageView is done by Generator::handleEvent(QEvent*), subclass it, do a switch on QEvent::type(), handle your
event and return true if pageview is to proceed with its handling or false if not.
5. Support configuring the KPrinter on the generator side, use Generator::canConfigurePrinter(), return true there, and you get a nonconfigured KPrinter in your
Generator::print()
6. PixmapRequest handling update:
a.) Generator::canGeneratePixmap is now Generator::canGeneratePixmap(bool async)
b.) Document::sendGeneratorRequests is a slot now
c.) Old way of sending pixmaps (Document::requestPixmaps(QValueList<PixmapRequest*> checking if we can generate pixmap if not, waiting for receiving)
is replaced with: requestPixmaps only queues the pixmap all checking if w can generate is done in sendGeneratorReqest, the sendGeneratorRequest is
run in three places:
1. in requestPixmaps when we receive a request
2. in requestDone if pixmapStack is not empty
3. sendGeneratorRequest, apart from removing invalid requests, takes the current request and if generator canGeratePixmap(request->async)
it removes the pixmap from stack and sends to generator if not, QTimer::singleshots to itself after 20ms, it ends when stack has no valid pixmap request
7. Added a commented out zoom field to PixmapGenerator, mightcome in handy sometime
- TextPage: add instructions that handle simplyfing the RegularAreaRect, no more double painted borders in selection rectangles, this rocks.
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445196
2005-08-10 16:14:39 +00:00
|
|
|
{
|
|
|
|
displayMessage( message, PageViewMessage::Error, duration );
|
|
|
|
}
|
|
|
|
|
2006-06-10 12:59:09 +00:00
|
|
|
void noticeMessage( const QString & message, int duration )
|
- Page/Link: tooltips for links backported
- Page: rotation does not switch height and width
- Document/Part/Generator:
1. Add API for attaching stuff to the interface: ActionCollection and the Navigation Panel
also add possibility to merge an XML .rc file with menu layout. Relevant functions are:
QString Generator::getXMLFile(), returns a QString with your .rc file name.
void Generator::setupGUI (KActionCollection* , QToolbox* ), add your components to the user interface
2. Supporting backend settings:
If during startup, backends which provide a configuration ([X-KDE-oKularHasInternalSettings]
set to true) are found, a menu item: configure backends is created, clicking on it results in
loading all the generators that have settings, but not those that dont. the Generator::addPages(KConfigDialog *dlg)
function should be overloaded by a generator and dlg->addPage should be used to add pages.
If a user opens a file that needs an already loaded generator, the already loaded one is used instead of loading another.
3. Error/Warning/Notice sending support, to send a notice/error/warning, add a relevant notice/error/warning(QString& txt ,int duration)
to the generator class, and sending a message to the user is as simple as emitting a signal!
4. Intercepting of events generated by the PageView is done by Generator::handleEvent(QEvent*), subclass it, do a switch on QEvent::type(), handle your
event and return true if pageview is to proceed with its handling or false if not.
5. Support configuring the KPrinter on the generator side, use Generator::canConfigurePrinter(), return true there, and you get a nonconfigured KPrinter in your
Generator::print()
6. PixmapRequest handling update:
a.) Generator::canGeneratePixmap is now Generator::canGeneratePixmap(bool async)
b.) Document::sendGeneratorRequests is a slot now
c.) Old way of sending pixmaps (Document::requestPixmaps(QValueList<PixmapRequest*> checking if we can generate pixmap if not, waiting for receiving)
is replaced with: requestPixmaps only queues the pixmap all checking if w can generate is done in sendGeneratorReqest, the sendGeneratorRequest is
run in three places:
1. in requestPixmaps when we receive a request
2. in requestDone if pixmapStack is not empty
3. sendGeneratorRequest, apart from removing invalid requests, takes the current request and if generator canGeratePixmap(request->async)
it removes the pixmap from stack and sends to generator if not, QTimer::singleshots to itself after 20ms, it ends when stack has no valid pixmap request
7. Added a commented out zoom field to PixmapGenerator, mightcome in handy sometime
- TextPage: add instructions that handle simplyfing the RegularAreaRect, no more double painted borders in selection rectangles, this rocks.
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445196
2005-08-10 16:14:39 +00:00
|
|
|
{
|
|
|
|
displayMessage( message, PageViewMessage::Info, duration );
|
|
|
|
}
|
|
|
|
|
2006-06-10 12:59:09 +00:00
|
|
|
void warningMessage( const QString & message, int duration )
|
- Page/Link: tooltips for links backported
- Page: rotation does not switch height and width
- Document/Part/Generator:
1. Add API for attaching stuff to the interface: ActionCollection and the Navigation Panel
also add possibility to merge an XML .rc file with menu layout. Relevant functions are:
QString Generator::getXMLFile(), returns a QString with your .rc file name.
void Generator::setupGUI (KActionCollection* , QToolbox* ), add your components to the user interface
2. Supporting backend settings:
If during startup, backends which provide a configuration ([X-KDE-oKularHasInternalSettings]
set to true) are found, a menu item: configure backends is created, clicking on it results in
loading all the generators that have settings, but not those that dont. the Generator::addPages(KConfigDialog *dlg)
function should be overloaded by a generator and dlg->addPage should be used to add pages.
If a user opens a file that needs an already loaded generator, the already loaded one is used instead of loading another.
3. Error/Warning/Notice sending support, to send a notice/error/warning, add a relevant notice/error/warning(QString& txt ,int duration)
to the generator class, and sending a message to the user is as simple as emitting a signal!
4. Intercepting of events generated by the PageView is done by Generator::handleEvent(QEvent*), subclass it, do a switch on QEvent::type(), handle your
event and return true if pageview is to proceed with its handling or false if not.
5. Support configuring the KPrinter on the generator side, use Generator::canConfigurePrinter(), return true there, and you get a nonconfigured KPrinter in your
Generator::print()
6. PixmapRequest handling update:
a.) Generator::canGeneratePixmap is now Generator::canGeneratePixmap(bool async)
b.) Document::sendGeneratorRequests is a slot now
c.) Old way of sending pixmaps (Document::requestPixmaps(QValueList<PixmapRequest*> checking if we can generate pixmap if not, waiting for receiving)
is replaced with: requestPixmaps only queues the pixmap all checking if w can generate is done in sendGeneratorReqest, the sendGeneratorRequest is
run in three places:
1. in requestPixmaps when we receive a request
2. in requestDone if pixmapStack is not empty
3. sendGeneratorRequest, apart from removing invalid requests, takes the current request and if generator canGeratePixmap(request->async)
it removes the pixmap from stack and sends to generator if not, QTimer::singleshots to itself after 20ms, it ends when stack has no valid pixmap request
7. Added a commented out zoom field to PixmapGenerator, mightcome in handy sometime
- TextPage: add instructions that handle simplyfing the RegularAreaRect, no more double painted borders in selection rectangles, this rocks.
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445196
2005-08-10 16:14:39 +00:00
|
|
|
{
|
|
|
|
displayMessage( message, PageViewMessage::Warning, duration );
|
|
|
|
}
|
|
|
|
|
2006-11-24 21:02:38 +00:00
|
|
|
void copyTextSelection() const;
|
|
|
|
|
2006-12-30 12:40:54 +00:00
|
|
|
void setAnnotationWindow( Okular::Annotation *annotation );
|
|
|
|
|
|
|
|
void removeAnnotationWindow( Okular::Annotation *annotation );
|
|
|
|
|
2004-10-29 21:52:06 +00:00
|
|
|
signals:
|
2006-03-24 20:40:02 +00:00
|
|
|
void urlDropped( const KUrl& );
|
2006-09-21 08:45:36 +00:00
|
|
|
void rightClick( const Okular::Page *, const QPoint & );
|
2004-10-29 21:52:06 +00:00
|
|
|
|
|
|
|
protected:
|
2006-10-07 14:40:32 +00:00
|
|
|
void resizeEvent( QResizeEvent* );
|
2004-10-29 21:52:06 +00:00
|
|
|
|
|
|
|
// mouse / keyboard events
|
|
|
|
void keyPressEvent( QKeyEvent* );
|
2006-08-14 15:03:12 +00:00
|
|
|
void inputMethodEvent( QInputMethodEvent * );
|
2004-10-29 21:52:06 +00:00
|
|
|
void wheelEvent( QWheelEvent* );
|
|
|
|
|
|
|
|
// drag and drop related events
|
|
|
|
void dragEnterEvent( QDragEnterEvent* );
|
2006-09-26 22:22:01 +00:00
|
|
|
void dragMoveEvent( QDragMoveEvent* );
|
2004-10-29 21:52:06 +00:00
|
|
|
void dropEvent( QDropEvent* );
|
|
|
|
|
|
|
|
private:
|
2006-10-07 14:40:32 +00:00
|
|
|
void contentsPaintEvent( QPaintEvent *e );
|
|
|
|
void contentsMouseMoveEvent( QMouseEvent *e );
|
|
|
|
void contentsMousePressEvent( QMouseEvent *e );
|
|
|
|
void contentsMouseReleaseEvent( QMouseEvent *e );
|
|
|
|
|
2005-04-01 16:24:11 +00:00
|
|
|
// draw background and items on the opened qpainter
|
|
|
|
void drawDocumentOnPainter( const QRect & pageViewRect, QPainter * p );
|
2004-10-30 20:54:48 +00:00
|
|
|
// update item width and height using current zoom parameters
|
|
|
|
void updateItemSize( PageViewItem * item, int columnWidth, int rowHeight );
|
|
|
|
// return the widget placed on a certain point or 0 if clicking on empty space
|
|
|
|
PageViewItem * pickItemOnPoint( int x, int y );
|
2004-11-03 17:35:48 +00:00
|
|
|
// start / modify / clear selection rectangle
|
2006-09-26 22:22:01 +00:00
|
|
|
void selectionStart( const QPoint & pos, const QColor & color, bool aboveAll = false );
|
|
|
|
void selectionEndPoint( const QPoint & pos );
|
2004-11-03 17:35:48 +00:00
|
|
|
void selectionClear();
|
2004-10-29 21:52:06 +00:00
|
|
|
// update internal zoom values and end in a slotRelayoutPages();
|
|
|
|
void updateZoom( ZoomMode newZm );
|
|
|
|
// update the text on the label using global zoom value or current page's one
|
|
|
|
void updateZoomText();
|
2006-10-07 14:40:32 +00:00
|
|
|
void textSelectionClear();
|
2004-12-26 21:20:17 +00:00
|
|
|
// updates cursor
|
|
|
|
void updateCursor( const QPoint &p );
|
2006-08-14 15:03:12 +00:00
|
|
|
// does the type ahead search
|
|
|
|
void doTypeAheadSearch();
|
|
|
|
|
2006-10-16 19:47:20 +00:00
|
|
|
int viewColumns() const;
|
|
|
|
int viewRows() const;
|
2006-10-07 14:40:32 +00:00
|
|
|
|
|
|
|
void center(int cx, int cy);
|
2005-01-28 17:21:28 +00:00
|
|
|
|
2004-10-29 21:52:06 +00:00
|
|
|
// don't want to expose classes in here
|
|
|
|
class PageViewPrivate * d;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
// activated either directly or via QTimer on the viewportResizeEvent
|
|
|
|
void slotRelayoutPages();
|
|
|
|
// activated either directly or via the contentsMoving(int,int) signal
|
2006-10-07 14:40:32 +00:00
|
|
|
void slotRequestVisiblePixmaps();
|
2005-02-01 18:24:16 +00:00
|
|
|
// activated by the viewport move timer
|
|
|
|
void slotMoveViewport();
|
2004-10-29 21:52:06 +00:00
|
|
|
// activated by the autoscroll timer (Shift+Up/Down keys)
|
|
|
|
void slotAutoScoll();
|
2006-11-22 21:32:21 +00:00
|
|
|
// activated by the dragScroll timer
|
|
|
|
void slotDragScroll();
|
2005-01-28 17:21:28 +00:00
|
|
|
// type-ahead find timeout
|
2005-02-18 18:24:45 +00:00
|
|
|
void slotStopFindAhead();
|
2006-11-22 21:32:21 +00:00
|
|
|
// show the welcome message
|
2006-09-20 13:58:28 +00:00
|
|
|
void slotShowWelcome();
|
2005-01-28 17:21:28 +00:00
|
|
|
|
2005-02-01 18:24:16 +00:00
|
|
|
// connected to local actions (toolbar, menu, ..)
|
2004-10-29 21:52:06 +00:00
|
|
|
void slotZoom();
|
|
|
|
void slotZoomIn();
|
|
|
|
void slotZoomOut();
|
|
|
|
void slotFitToWidthToggled( bool );
|
|
|
|
void slotFitToPageToggled( bool );
|
|
|
|
void slotFitToTextToggled( bool );
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
void slotRenderMode( int );
|
2005-03-05 15:59:15 +00:00
|
|
|
void slotContinuousToggled( bool );
|
2004-10-29 21:52:06 +00:00
|
|
|
void slotSetMouseNormal();
|
2004-11-03 17:35:48 +00:00
|
|
|
void slotSetMouseZoom();
|
2004-11-16 17:36:02 +00:00
|
|
|
void slotSetMouseSelect();
|
2006-09-26 22:22:01 +00:00
|
|
|
void slotSetMouseTextSelect();
|
2005-03-04 23:06:24 +00:00
|
|
|
void slotToggleAnnotator( bool );
|
2004-10-29 21:52:06 +00:00
|
|
|
void slotScrollUp();
|
|
|
|
void slotScrollDown();
|
2004-09-12 23:19:03 +00:00
|
|
|
};
|
2004-08-26 23:25:52 +00:00
|
|
|
|
2002-08-30 09:14:01 +00:00
|
|
|
#endif
|