2004-09-08 12:41:14 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> *
|
|
|
|
* *
|
|
|
|
* 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. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
#ifndef _OKULAR_PAGE_H_
|
|
|
|
#define _OKULAR_PAGE_H_
|
2004-09-08 12:41:14 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
#include <QtCore/QLinkedList>
|
2004-10-02 14:30:30 +00:00
|
|
|
|
2014-10-27 21:35:06 +00:00
|
|
|
#include "okularcore_export.h"
|
2011-06-01 08:31:44 +00:00
|
|
|
#include "area.h"
|
|
|
|
#include "global.h"
|
|
|
|
#include "textpage.h"
|
2005-07-15 18:20:57 +00:00
|
|
|
|
2007-03-25 22:36:41 +00:00
|
|
|
class QPixmap;
|
2006-09-21 08:45:36 +00:00
|
|
|
|
|
|
|
class PagePainter;
|
|
|
|
|
|
|
|
namespace Okular {
|
|
|
|
|
2005-07-15 18:20:57 +00:00
|
|
|
class Annotation;
|
2007-04-17 20:01:42 +00:00
|
|
|
class Document;
|
2013-02-24 21:58:53 +00:00
|
|
|
class DocumentObserver;
|
2007-04-14 19:58:17 +00:00
|
|
|
class DocumentPrivate;
|
2007-02-25 00:07:59 +00:00
|
|
|
class FormField;
|
2007-03-24 00:18:54 +00:00
|
|
|
class PagePrivate;
|
2006-09-21 08:45:36 +00:00
|
|
|
class PageTransition;
|
2006-11-17 22:15:15 +00:00
|
|
|
class SourceReference;
|
- 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
|
|
|
class TextSelection;
|
2012-11-08 20:29:09 +00:00
|
|
|
class Tile;
|
- 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
|
|
|
|
2004-09-08 12:41:14 +00:00
|
|
|
/**
|
|
|
|
* @short Collector for all the data belonging to a page.
|
|
|
|
*
|
2006-09-21 08:45:36 +00:00
|
|
|
* The Page class contains pixmaps (referenced using observers id as key),
|
2005-01-07 13:03:10 +00:00
|
|
|
* a search page (a class used internally for retrieving text), rect classes
|
|
|
|
* (that describe links or other active areas in the current page) and more.
|
2004-09-15 20:45:00 +00:00
|
|
|
*
|
2005-02-08 15:24:23 +00:00
|
|
|
* All coordinates are normalized to the page, so {x,y} are valid in [0,1]
|
|
|
|
* range as long as NormalizedRect components.
|
|
|
|
*
|
|
|
|
* Note: The class takes ownership of all objects.
|
2004-09-08 12:41:14 +00:00
|
|
|
*/
|
2014-10-27 21:35:06 +00:00
|
|
|
class OKULARCORE_EXPORT Page
|
2004-09-08 12:41:14 +00:00
|
|
|
{
|
2004-11-06 00:56:55 +00:00
|
|
|
public:
|
2007-01-20 14:51:43 +00:00
|
|
|
/**
|
|
|
|
* An action to be executed when particular events happen.
|
|
|
|
*/
|
2006-10-09 18:02:59 +00:00
|
|
|
enum PageAction
|
|
|
|
{
|
2007-01-20 14:51:43 +00:00
|
|
|
Opening, ///< An action to be executed when the page is "opened".
|
|
|
|
Closing ///< An action to be executed when the page is "closed".
|
2006-10-09 18:02:59 +00:00
|
|
|
};
|
|
|
|
|
2006-11-23 16:09:26 +00:00
|
|
|
/**
|
|
|
|
* Creates a new page.
|
|
|
|
*
|
|
|
|
* @param number The number of the page in the document.
|
|
|
|
* @param width The width of the page.
|
|
|
|
* @param height The height of the page.
|
2007-01-05 17:09:47 +00:00
|
|
|
* @param orientation The orientation of the page
|
2006-11-23 16:09:26 +00:00
|
|
|
*/
|
2007-01-05 17:09:47 +00:00
|
|
|
Page( uint number, double width, double height, Rotation orientation );
|
2006-11-23 16:09:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Destroys the page.
|
|
|
|
*/
|
2006-09-21 08:45:36 +00:00
|
|
|
~Page();
|
2004-11-06 00:56:55 +00:00
|
|
|
|
2006-11-23 19:25:52 +00:00
|
|
|
/**
|
|
|
|
* Returns the number of the page in the document.
|
|
|
|
*/
|
|
|
|
int number() const;
|
|
|
|
|
|
|
|
/**
|
2007-01-02 19:05:49 +00:00
|
|
|
* Returns the orientation of the page as defined by the document.
|
2006-11-23 19:25:52 +00:00
|
|
|
*/
|
2007-01-05 17:09:47 +00:00
|
|
|
Rotation orientation() const;
|
2007-01-02 19:05:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the rotation of the page as defined by the user.
|
|
|
|
*/
|
2007-01-05 17:09:47 +00:00
|
|
|
Rotation rotation() const;
|
2007-01-02 19:05:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the total orientation which is the original orientation plus
|
|
|
|
* the user defined rotation.
|
|
|
|
*/
|
2007-01-05 17:09:47 +00:00
|
|
|
Rotation totalOrientation() const;
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the width of the page.
|
|
|
|
*/
|
|
|
|
double width() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the height of the page.
|
|
|
|
*/
|
|
|
|
double height() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the ration (height / width) of the page.
|
|
|
|
*/
|
|
|
|
double ratio() const;
|
2006-11-23 16:09:26 +00:00
|
|
|
|
2008-05-18 23:06:21 +00:00
|
|
|
/**
|
|
|
|
* Returns the bounding box of the page content in normalized [0,1] coordinates,
|
|
|
|
* in terms of the upright orientation (Rotation0).
|
|
|
|
* If it has not been computed yet, returns the full page (i.e., (0, 0, 1, 1)).
|
|
|
|
* Note that the bounding box may be null if the page is blank.
|
|
|
|
*
|
|
|
|
* @since 0.7 (KDE 4.1)
|
|
|
|
*/
|
|
|
|
NormalizedRect boundingBox() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether the bounding box of the page has been computed.
|
|
|
|
* Note that even if the bounding box is computed, it may be null if the page is blank.
|
|
|
|
*
|
|
|
|
* @since 0.7 (KDE 4.1)
|
|
|
|
*/
|
|
|
|
bool isBoundingBoxKnown() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the bounding box of the page content in normalized [0,1] coordinates,
|
|
|
|
* in terms of the upright orientation (Rotation0).
|
|
|
|
* (This does not inform the document's observers, call Document::SetPageBoundingBox
|
|
|
|
* instead if you want that.)
|
|
|
|
*
|
|
|
|
* @since 0.7 (KDE 4.1)
|
|
|
|
*/
|
|
|
|
void setBoundingBox( const NormalizedRect& bbox );
|
|
|
|
|
2006-11-23 16:09:26 +00:00
|
|
|
/**
|
2012-08-19 23:31:32 +00:00
|
|
|
* Returns whether the page of size @p width x @p height has a @p pixmap
|
2013-02-24 21:58:53 +00:00
|
|
|
* in the region given by @p rect for the given @p observer
|
2006-11-23 16:09:26 +00:00
|
|
|
*/
|
2013-02-24 21:58:53 +00:00
|
|
|
bool hasPixmap( DocumentObserver *observer, int width = -1, int height = -1, const NormalizedRect &rect = NormalizedRect() ) const;
|
2006-11-23 16:09:26 +00:00
|
|
|
|
|
|
|
/**
|
2007-01-13 22:55:00 +00:00
|
|
|
* Returns whether the page provides a text page (@ref TextPage).
|
2006-11-23 16:09:26 +00:00
|
|
|
*/
|
|
|
|
bool hasTextPage() const;
|
2006-11-23 16:54:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether the page has an object rect which includes the point (@p x, @p y)
|
|
|
|
* at scale (@p xScale, @p yScale).
|
|
|
|
*/
|
2006-09-19 17:17:29 +00:00
|
|
|
bool hasObjectRect( double x, double y, double xScale, double yScale ) const;
|
2006-11-23 16:54:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether the page provides highlighting for the observer with the
|
|
|
|
* given @p id.
|
|
|
|
*/
|
|
|
|
bool hasHighlights( int id = -1 ) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether the page provides a transition effect.
|
|
|
|
*/
|
2005-02-08 15:24:23 +00:00
|
|
|
bool hasTransition() const;
|
|
|
|
|
2006-11-23 19:25:52 +00:00
|
|
|
/**
|
|
|
|
* Returns whether the page provides annotations.
|
|
|
|
*/
|
|
|
|
bool hasAnnotations() const;
|
|
|
|
|
2006-11-23 16:54:28 +00:00
|
|
|
/**
|
|
|
|
* Returns the bounding rect of the text which matches the following criteria
|
|
|
|
* or 0 if the search is not successful.
|
|
|
|
*
|
|
|
|
* @param id An unique id for this search.
|
|
|
|
* @param text The search text.
|
2007-01-13 22:55:00 +00:00
|
|
|
* @param direction The direction of the search (@ref SearchDirection)
|
2006-11-23 16:54:28 +00:00
|
|
|
* @param caseSensitivity If Qt::CaseSensitive, the search is case sensitive; otherwise
|
|
|
|
* the search is case insensitive.
|
|
|
|
* @param lastRect If 0 (default) the search starts at the beginning of the page, otherwise
|
2008-09-25 15:05:22 +00:00
|
|
|
* right/below the coordinates of the given rect.
|
2006-11-23 16:54:28 +00:00
|
|
|
*/
|
|
|
|
RegularAreaRect* findText( int id, const QString & text, SearchDirection direction,
|
|
|
|
Qt::CaseSensitivity caseSensitivity, const RegularAreaRect * lastRect=0) const;
|
|
|
|
|
2006-11-23 17:11:04 +00:00
|
|
|
/**
|
2006-11-24 21:02:38 +00:00
|
|
|
* Returns the page text (or part of it).
|
|
|
|
* @see TextPage::text()
|
2006-11-23 17:11:04 +00:00
|
|
|
*/
|
2006-11-24 21:02:38 +00:00
|
|
|
QString text( const RegularAreaRect * rect = 0 ) const;
|
2006-11-23 17:11:04 +00:00
|
|
|
|
2009-11-12 21:48:43 +00:00
|
|
|
/**
|
|
|
|
* Returns the page text (or part of it).
|
|
|
|
* @see TextPage::text()
|
|
|
|
* @since 0.10 (KDE 4.4)
|
|
|
|
*/
|
|
|
|
QString text( const RegularAreaRect * rect, TextPage::TextAreaInclusionBehaviour b ) const;
|
|
|
|
|
2011-10-31 15:33:03 +00:00
|
|
|
/**
|
|
|
|
* Returns the page text (or part of it) including the bounding
|
|
|
|
* rectangles. Note that ownership of the contents of the returned
|
|
|
|
* list belongs to the caller.
|
|
|
|
* @see TextPage::words()
|
|
|
|
* @since 0.14 (KDE 4.8)
|
|
|
|
*/
|
|
|
|
TextEntity::List words( const RegularAreaRect * rect, TextPage::TextAreaInclusionBehaviour b ) const;
|
2012-03-25 21:48:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the area and text of the word at the given point
|
|
|
|
* Note that ownership of the returned area belongs to the caller.
|
|
|
|
* @see TextPage::wordAt()
|
|
|
|
* @since 0.15 (KDE 4.9)
|
|
|
|
*/
|
|
|
|
RegularAreaRect * wordAt( const NormalizedPoint &p, QString *word = 0 ) const;
|
2011-10-31 15:33:03 +00:00
|
|
|
|
2006-11-23 17:11:04 +00:00
|
|
|
/**
|
|
|
|
* Returns the rectangular area of the given @p selection.
|
|
|
|
*/
|
|
|
|
RegularAreaRect * textArea( TextSelection *selection ) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the object rect of the given @p type which is at point (@p x, @p y) at scale (@p xScale, @p yScale).
|
|
|
|
*/
|
|
|
|
const ObjectRect * objectRect( ObjectRect::ObjectType type, double x, double y, double xScale, double yScale ) const;
|
|
|
|
|
2012-06-29 10:39:42 +00:00
|
|
|
/**
|
|
|
|
* Returns all object rects of the given @p type which are at point (@p x, @p y) at scale (@p xScale, @p yScale).
|
|
|
|
* @since 0.16 (KDE 4.10)
|
|
|
|
*/
|
|
|
|
QLinkedList< const ObjectRect * > objectRects( ObjectRect::ObjectType type, double x, double y, double xScale, double yScale ) const;
|
|
|
|
|
2009-03-23 12:05:00 +00:00
|
|
|
/**
|
|
|
|
* Returns the object rect of the given @p type which is nearest to the point (@p x, @p y) at scale (@p xScale, @p yScale).
|
|
|
|
*
|
|
|
|
* @since 0.8.2 (KDE 4.2.2)
|
|
|
|
*/
|
|
|
|
const ObjectRect * nearestObjectRect( ObjectRect::ObjectType type, double x, double y, double xScale, double yScale, double * distance ) const;
|
|
|
|
|
2006-11-23 17:11:04 +00:00
|
|
|
/**
|
2007-01-13 22:55:00 +00:00
|
|
|
* Returns the transition effect of the page or 0 if no transition
|
|
|
|
* effect is set (see hasTransition()).
|
2006-11-23 17:11:04 +00:00
|
|
|
*/
|
|
|
|
const PageTransition * transition() const;
|
|
|
|
|
2006-11-23 19:25:52 +00:00
|
|
|
/**
|
|
|
|
* Returns the list of annotations of the page.
|
|
|
|
*/
|
2007-09-03 23:01:57 +00:00
|
|
|
QLinkedList< Annotation* > annotations() const;
|
2006-11-23 19:25:52 +00:00
|
|
|
|
2006-11-23 17:11:04 +00:00
|
|
|
/**
|
2007-05-27 09:59:52 +00:00
|
|
|
* Returns the @ref Action object which is associated with the given page @p action
|
2006-11-23 17:11:04 +00:00
|
|
|
* or 0 if no page action is set.
|
|
|
|
*/
|
2007-04-20 12:37:12 +00:00
|
|
|
const Action * pageAction( PageAction action ) const;
|
2006-11-23 17:11:04 +00:00
|
|
|
|
2007-02-25 00:07:59 +00:00
|
|
|
/**
|
|
|
|
* Returns the list of FormField of the page.
|
|
|
|
*/
|
2007-09-03 23:01:57 +00:00
|
|
|
QLinkedList< FormField * > formFields() const;
|
2007-02-25 00:07:59 +00:00
|
|
|
|
2006-11-23 19:25:52 +00:00
|
|
|
/**
|
2013-02-24 21:58:53 +00:00
|
|
|
* Sets the region described by @p rect with @p pixmap for the
|
|
|
|
* given @p observer.
|
2012-08-19 23:31:32 +00:00
|
|
|
* If @p rect is not set (default) the @p pixmap is set to the entire
|
|
|
|
* page.
|
2006-11-23 19:25:52 +00:00
|
|
|
*/
|
2013-02-24 21:58:53 +00:00
|
|
|
void setPixmap( DocumentObserver *observer, QPixmap *pixmap, const NormalizedRect &rect = NormalizedRect() );
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the @p text page.
|
|
|
|
*/
|
2006-11-23 16:09:26 +00:00
|
|
|
void setTextPage( TextPage * text );
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the list of object @p rects of the page.
|
|
|
|
*/
|
2007-01-20 22:04:10 +00:00
|
|
|
void setObjectRects( const QLinkedList< ObjectRect * > & rects );
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the list of source reference objects @p rects.
|
|
|
|
*/
|
2007-01-20 22:04:10 +00:00
|
|
|
void setSourceReferences( const QLinkedList< SourceRefObjectRect * > & rects );
|
2006-11-23 19:25:52 +00:00
|
|
|
|
2006-12-31 10:48:49 +00:00
|
|
|
/**
|
|
|
|
* Sets the duration of the page to @p seconds when displayed in presentation mode.
|
|
|
|
*
|
2006-12-31 14:41:34 +00:00
|
|
|
* Setting a negative number disables the duration.
|
2006-12-31 10:48:49 +00:00
|
|
|
*/
|
2006-12-31 14:41:34 +00:00
|
|
|
void setDuration( double seconds );
|
2006-12-31 10:48:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the duration in seconds of the page when displayed in presentation mode.
|
|
|
|
*
|
2006-12-31 14:41:34 +00:00
|
|
|
* A negative number means that no time is set.
|
2006-12-31 10:48:49 +00:00
|
|
|
*/
|
2006-12-31 14:41:34 +00:00
|
|
|
double duration() const;
|
2006-12-31 10:48:49 +00:00
|
|
|
|
2007-01-19 23:30:32 +00:00
|
|
|
/**
|
|
|
|
* Sets the labels for the page to @p label .
|
|
|
|
*/
|
|
|
|
void setLabel( const QString& label );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the label of the page, or a null string if not set.
|
|
|
|
*/
|
|
|
|
QString label() const;
|
|
|
|
|
2006-11-24 21:02:38 +00:00
|
|
|
/**
|
|
|
|
* Returns the current text selection.
|
|
|
|
*/
|
|
|
|
const RegularAreaRect * textSelection() const;
|
|
|
|
|
2007-03-30 14:08:20 +00:00
|
|
|
/**
|
|
|
|
* Returns the color of the current text selection, or an invalid color
|
|
|
|
* if no text selection has been set.
|
|
|
|
*/
|
|
|
|
QColor textSelectionColor() const;
|
|
|
|
|
2006-11-23 19:25:52 +00:00
|
|
|
/**
|
|
|
|
* Adds a new @p annotation to the page.
|
|
|
|
*/
|
2005-02-18 18:24:45 +00:00
|
|
|
void addAnnotation( Annotation * annotation );
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Removes the @p annotation from the page.
|
|
|
|
*/
|
2006-09-14 18:42:28 +00:00
|
|
|
bool removeAnnotation( Annotation * annotation );
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the page @p transition effect.
|
|
|
|
*/
|
2006-09-21 08:45:36 +00:00
|
|
|
void setTransition( PageTransition * transition );
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the @p link object for the given page @p action.
|
|
|
|
*/
|
2007-04-20 12:37:12 +00:00
|
|
|
void setPageAction( PageAction action, Action * link );
|
2006-11-23 19:25:52 +00:00
|
|
|
|
2007-02-25 00:07:59 +00:00
|
|
|
/**
|
|
|
|
* Sets @p fields as list of FormField of the page.
|
|
|
|
*/
|
|
|
|
void setFormFields( const QLinkedList< FormField * >& fields );
|
|
|
|
|
2006-11-23 19:25:52 +00:00
|
|
|
/**
|
2013-02-24 21:58:53 +00:00
|
|
|
* Deletes the pixmap for the given @p observer
|
2006-11-23 19:25:52 +00:00
|
|
|
*/
|
2013-02-24 21:58:53 +00:00
|
|
|
void deletePixmap( DocumentObserver *observer );
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Deletes all pixmaps of the page.
|
|
|
|
*/
|
2006-11-20 07:53:32 +00:00
|
|
|
void deletePixmaps();
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Deletes all object rects of the page.
|
|
|
|
*/
|
2006-11-03 17:57:32 +00:00
|
|
|
void deleteRects();
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Deletes all source reference objects of the page.
|
|
|
|
*/
|
2006-11-17 22:15:15 +00:00
|
|
|
void deleteSourceReferences();
|
2006-11-23 19:25:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Deletes all annotations of the page.
|
|
|
|
*/
|
2005-02-18 18:24:45 +00:00
|
|
|
void deleteAnnotations();
|
2004-11-06 00:56:55 +00:00
|
|
|
|
2012-07-07 17:40:52 +00:00
|
|
|
/**
|
2013-02-24 21:58:53 +00:00
|
|
|
* Returns whether pixmaps for the tiled observer are handled by a
|
2012-11-08 20:29:09 +00:00
|
|
|
* tile manager.
|
2012-11-08 19:46:47 +00:00
|
|
|
*
|
2014-02-19 22:40:43 +00:00
|
|
|
* @since 0.19 (KDE 4.13)
|
2012-07-07 17:40:52 +00:00
|
|
|
*/
|
2014-02-19 22:40:43 +00:00
|
|
|
bool hasTilesManager( const DocumentObserver *observer ) const;
|
2012-11-08 20:29:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a list of all tiles intersecting with @p rect.
|
|
|
|
*
|
2012-11-12 14:55:13 +00:00
|
|
|
* The list contains only tiles with a pixmap
|
2012-11-08 20:29:09 +00:00
|
|
|
*
|
2014-02-19 22:40:43 +00:00
|
|
|
* @since 0.19 (KDE 4.13)
|
2012-11-08 20:29:09 +00:00
|
|
|
*/
|
2014-02-19 22:40:43 +00:00
|
|
|
QList<Tile> tilesAt( const DocumentObserver *observer, const NormalizedRect &rect ) const;
|
2012-07-07 17:40:52 +00:00
|
|
|
|
2004-11-06 00:56:55 +00:00
|
|
|
private:
|
2007-03-24 00:18:54 +00:00
|
|
|
PagePrivate* const d;
|
2007-09-01 22:48:28 +00:00
|
|
|
/// @cond PRIVATE
|
2007-03-24 00:18:54 +00:00
|
|
|
friend class PagePrivate;
|
2007-04-17 19:55:18 +00:00
|
|
|
friend class Document;
|
2007-04-14 19:58:17 +00:00
|
|
|
friend class DocumentPrivate;
|
2014-02-19 22:40:43 +00:00
|
|
|
friend class PixmapRequestPrivate;
|
2006-11-20 07:53:32 +00:00
|
|
|
|
2006-11-23 19:25:52 +00:00
|
|
|
/**
|
|
|
|
* To improve performance PagePainter accesses the following
|
|
|
|
* member variables directly.
|
|
|
|
*/
|
|
|
|
friend class ::PagePainter;
|
2007-09-01 22:48:28 +00:00
|
|
|
/// @endcond
|
2004-11-06 00:56:55 +00:00
|
|
|
|
2013-02-24 21:58:53 +00:00
|
|
|
const QPixmap * _o_nearestPixmap( DocumentObserver *, int, int ) const;
|
2006-11-20 07:53:32 +00:00
|
|
|
|
2006-11-23 19:25:52 +00:00
|
|
|
QLinkedList< ObjectRect* > m_rects;
|
|
|
|
QLinkedList< HighlightAreaRect* > m_highlights;
|
|
|
|
QLinkedList< Annotation* > m_annotations;
|
|
|
|
|
|
|
|
Q_DISABLE_COPY( Page )
|
2004-09-08 12:41:14 +00:00
|
|
|
};
|
2004-10-02 14:30:30 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
}
|
|
|
|
|
2004-09-08 12:41:14 +00:00
|
|
|
#endif
|