compile
[kdegraphics.git] / okular / core / page_p.h
blob04709c28382943a4ce1d1c50dcac021638b7e36a
1 /***************************************************************************
2 * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> *
3 * Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
4 * *
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_
14 // qt/kde includes
15 #include <qlinkedlist.h>
16 #include <qmap.h>
17 #include <qmatrix.h>
18 #include <qstring.h>
20 // local includes
21 #include "global.h"
22 #include "area.h"
24 class QColor;
25 class QDomDocument;
26 class QDomNode;
28 namespace Okular {
30 class Action;
31 class Annotation;
32 class FormField;
33 class HighlightAreaRect;
34 class Page;
35 class PageSize;
36 class PageTransition;
37 class RotationJob;
38 class TextPage;
40 class PagePrivate
42 public:
43 PagePrivate( Page *page, uint n, double w, double h, Rotation o );
44 ~PagePrivate();
46 void imageRotationDone( RotationJob * job );
47 QMatrix rotationMatrix() const;
49 /**
50 * Loads the local contents (e.g. annotations) of the page.
52 void restoreLocalContents( const QDomNode & pageNode );
54 /**
55 * Saves the local contents (e.g. annotations) of the page.
57 void saveLocalContents( QDomNode & parentNode, QDomDocument & document ) const;
59 /**
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 );
66 /**
67 * Rotates the image and object rects of the page to the given @p orientation.
69 void rotateAt( Rotation orientation );
71 /**
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 );
78 /**
79 * Sets the @p color and @p areas of text selections.
81 void setTextSelections( RegularAreaRect *areas, const QColor & color );
83 /**
84 * Sets the @p color and @p area of the highlight for the observer with
85 * the given @p id.
87 void setHighlight( int id, RegularAreaRect *area, const QColor & color );
89 /**
90 * Deletes all highlight objects for the observer with the given @p id.
92 void deleteHighlights( int id = -1 );
94 /**
95 * Deletes all text selection objects of the page.
97 void deleteTextSelections();
99 class PixmapObject
101 public:
102 QPixmap *m_pixmap;
103 Rotation m_rotation;
105 QMap< int, PixmapObject > m_pixmaps;
107 Page *m_page;
108 int m_number;
109 Rotation m_orientation;
110 double m_width, m_height;
111 NormalizedRect m_boundingBox;
112 Rotation m_rotation;
113 int m_maxuniqueNum;
115 TextPage * m_text;
116 PageTransition * m_transition;
117 HighlightAreaRect *m_textSelections;
118 QLinkedList< FormField * > formfields;
119 Action * m_openingAction;
120 Action * m_closingAction;
121 double m_duration;
122 QString m_label;
124 bool m_isBoundingBoxKnown : 1;
129 #endif