1 /***************************************************************************
2 * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> *
3 * Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
11 #ifndef _OKULAR_PAGE_PRIVATE_H_
12 #define _OKULAR_PAGE_PRIVATE_H_
15 #include <qlinkedlist.h>
33 class HighlightAreaRect
;
43 PagePrivate( Page
*page
, uint n
, double w
, double h
, Rotation o
);
46 void imageRotationDone( RotationJob
* job
);
47 QMatrix
rotationMatrix() const;
50 * Loads the local contents (e.g. annotations) of the page.
52 void restoreLocalContents( const QDomNode
& pageNode
);
55 * Saves the local contents (e.g. annotations) of the page.
57 void saveLocalContents( QDomNode
& parentNode
, QDomDocument
& document
) const;
60 * Modifies an existing annotation by replacing it with a new @p annotation.
62 * The unique name is used to find the old annotation.
64 void modifyAnnotation( Annotation
* annotation
);
67 * Rotates the image and object rects of the page to the given @p orientation.
69 void rotateAt( Rotation orientation
);
72 * Changes the size of the page to the given @p size.
74 * The @p size is meant to be referred to the page not rotated.
76 void changeSize( const PageSize
&size
);
79 * Sets the @p color and @p areas of text selections.
81 void setTextSelections( RegularAreaRect
*areas
, const QColor
& color
);
84 * Sets the @p color and @p area of the highlight for the observer with
87 void setHighlight( int id
, RegularAreaRect
*area
, const QColor
& color
);
90 * Deletes all highlight objects for the observer with the given @p id.
92 void deleteHighlights( int id
= -1 );
95 * Deletes all text selection objects of the page.
97 void deleteTextSelections();
105 QMap
< int, PixmapObject
> m_pixmaps
;
109 Rotation m_orientation
;
110 double m_width
, m_height
;
111 NormalizedRect m_boundingBox
;
116 PageTransition
* m_transition
;
117 HighlightAreaRect
*m_textSelections
;
118 QLinkedList
< FormField
* > formfields
;
119 Action
* m_openingAction
;
120 Action
* m_closingAction
;
124 bool m_isBoundingBoxKnown
: 1;