2007-03-24 00:18:54 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> *
|
|
|
|
* Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
|
|
|
|
* *
|
|
|
|
* 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. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _OKULAR_PAGE_PRIVATE_H_
|
|
|
|
#define _OKULAR_PAGE_PRIVATE_H_
|
|
|
|
|
|
|
|
// qt/kde includes
|
|
|
|
#include <qlinkedlist.h>
|
2007-03-25 22:36:41 +00:00
|
|
|
#include <qmap.h>
|
2007-03-24 00:18:54 +00:00
|
|
|
#include <qmatrix.h>
|
|
|
|
#include <qstring.h>
|
|
|
|
|
|
|
|
// local includes
|
|
|
|
#include "global.h"
|
2007-05-05 18:07:34 +00:00
|
|
|
#include "area.h"
|
2007-03-24 00:18:54 +00:00
|
|
|
|
2007-05-05 18:07:34 +00:00
|
|
|
class QColor;
|
2007-04-14 19:58:17 +00:00
|
|
|
class QDomDocument;
|
|
|
|
class QDomNode;
|
|
|
|
|
2007-03-24 00:18:54 +00:00
|
|
|
namespace Okular {
|
|
|
|
|
2007-04-20 12:37:12 +00:00
|
|
|
class Action;
|
2007-04-17 19:55:18 +00:00
|
|
|
class Annotation;
|
2007-03-24 00:18:54 +00:00
|
|
|
class FormField;
|
2007-03-30 14:08:20 +00:00
|
|
|
class HighlightAreaRect;
|
2007-03-24 00:18:54 +00:00
|
|
|
class Page;
|
2007-05-01 23:36:57 +00:00
|
|
|
class PageSize;
|
2007-03-24 00:18:54 +00:00
|
|
|
class PageTransition;
|
2007-03-24 10:47:22 +00:00
|
|
|
class RotationJob;
|
2007-03-24 00:18:54 +00:00
|
|
|
class TextPage;
|
|
|
|
|
|
|
|
class PagePrivate
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PagePrivate( Page *page, uint n, double w, double h, Rotation o );
|
|
|
|
~PagePrivate();
|
|
|
|
|
2007-03-24 10:47:22 +00:00
|
|
|
void imageRotationDone( RotationJob * job );
|
2007-03-24 00:18:54 +00:00
|
|
|
QMatrix rotationMatrix() const;
|
|
|
|
|
2007-04-14 19:58:17 +00:00
|
|
|
/**
|
|
|
|
* Loads the local contents (e.g. annotations) of the page.
|
|
|
|
*/
|
|
|
|
void restoreLocalContents( const QDomNode & pageNode );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Saves the local contents (e.g. annotations) of the page.
|
|
|
|
*/
|
|
|
|
void saveLocalContents( QDomNode & parentNode, QDomDocument & document ) const;
|
|
|
|
|
2007-04-17 19:55:18 +00:00
|
|
|
/**
|
|
|
|
* Modifies an existing annotation by replacing it with a new @p annotation.
|
|
|
|
*
|
|
|
|
* The unique name is used to find the old annotation.
|
|
|
|
*/
|
|
|
|
void modifyAnnotation( Annotation * annotation );
|
|
|
|
|
2007-05-01 23:36:57 +00:00
|
|
|
/**
|
|
|
|
* Rotates the image and object rects of the page to the given @p orientation.
|
|
|
|
*/
|
|
|
|
void rotateAt( Rotation orientation );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Changes the size of the page to the given @p size.
|
|
|
|
*
|
|
|
|
* The @p size is meant to be referred to the page not rotated.
|
|
|
|
*/
|
|
|
|
void changeSize( const PageSize &size );
|
|
|
|
|
2007-05-05 18:07:34 +00:00
|
|
|
/**
|
|
|
|
* Sets the @p color and @p areas of text selections.
|
|
|
|
*/
|
|
|
|
void setTextSelections( RegularAreaRect *areas, const QColor & color );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the @p color and @p area of the highlight for the observer with
|
|
|
|
* the given @p id.
|
|
|
|
*/
|
|
|
|
void setHighlight( int id, RegularAreaRect *area, const QColor & color );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deletes all highlight objects for the observer with the given @p id.
|
|
|
|
*/
|
|
|
|
void deleteHighlights( int id = -1 );
|
|
|
|
|
2007-09-03 23:47:12 +00:00
|
|
|
/**
|
|
|
|
* Deletes all text selection objects of the page.
|
|
|
|
*/
|
|
|
|
void deleteTextSelections();
|
|
|
|
|
2007-03-25 22:36:41 +00:00
|
|
|
class PixmapObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
QPixmap *m_pixmap;
|
|
|
|
Rotation m_rotation;
|
|
|
|
};
|
|
|
|
QMap< int, PixmapObject > m_pixmaps;
|
|
|
|
|
2007-03-24 00:18:54 +00:00
|
|
|
Page *m_page;
|
|
|
|
int m_number;
|
|
|
|
Rotation m_orientation;
|
|
|
|
double m_width, m_height;
|
|
|
|
Rotation m_rotation;
|
|
|
|
int m_maxuniqueNum;
|
|
|
|
|
|
|
|
TextPage * m_text;
|
|
|
|
PageTransition * m_transition;
|
2007-03-30 14:08:20 +00:00
|
|
|
HighlightAreaRect *m_textSelections;
|
2007-03-24 00:18:54 +00:00
|
|
|
QLinkedList< FormField * > formfields;
|
2007-04-20 12:37:12 +00:00
|
|
|
Action * m_openingAction;
|
|
|
|
Action * m_closingAction;
|
2007-03-24 00:18:54 +00:00
|
|
|
double m_duration;
|
|
|
|
QString m_label;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|