• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdegraphics
  • Sitemap
  • Contact Us
 

okular

page.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>                  *
00003  *                                                                         *
00004  *   This program is free software; you can redistribute it and/or modify  *
00005  *   it under the terms of the GNU General Public License as published by  *
00006  *   the Free Software Foundation; either version 2 of the License, or     *
00007  *   (at your option) any later version.                                   *
00008  ***************************************************************************/
00009 
00010 #ifndef _OKULAR_PAGE_H_
00011 #define _OKULAR_PAGE_H_
00012 
00013 #include <QtCore/QLinkedList>
00014 
00015 #include <okular/core/okular_export.h>
00016 #include <okular/core/area.h>
00017 #include <okular/core/global.h>
00018 
00019 class QPixmap;
00020 
00021 class PagePainter;
00022 
00023 namespace Okular {
00024 
00025 class Annotation;
00026 class Document;
00027 class DocumentPrivate;
00028 class FormField;
00029 class PagePrivate;
00030 class PageTransition;
00031 class SourceReference;
00032 class TextPage;
00033 class TextSelection;
00034 
00047 class OKULAR_EXPORT Page
00048 {
00049     public:
00053         enum PageAction
00054         {
00055             Opening,       
00056             Closing        
00057         };
00058 
00067         Page( uint number, double width, double height, Rotation orientation );
00068 
00072         ~Page();
00073 
00077         int number() const;
00078 
00082         Rotation orientation() const;
00083 
00087         Rotation rotation() const;
00088 
00093         Rotation totalOrientation() const;
00094 
00098         double width() const;
00099 
00103         double height() const;
00104 
00108         double ratio() const;
00109 
00114         bool hasPixmap( int id, int width = -1, int height = -1 ) const;
00115 
00119         bool hasTextPage() const;
00120 
00125         bool hasObjectRect( double x, double y, double xScale, double yScale ) const;
00126 
00131         bool hasHighlights( int id = -1 ) const;
00132 
00136         bool hasTransition() const;
00137 
00141         bool hasAnnotations() const;
00142 
00155         RegularAreaRect* findText( int id, const QString & text, SearchDirection direction,
00156                                    Qt::CaseSensitivity caseSensitivity, const RegularAreaRect * lastRect=0) const;
00157 
00162         QString text( const RegularAreaRect * rect = 0 ) const;
00163 
00167         RegularAreaRect * textArea( TextSelection *selection ) const;
00168 
00172         const ObjectRect * objectRect( ObjectRect::ObjectType type, double x, double y, double xScale, double yScale ) const;
00173 
00178         const PageTransition * transition() const;
00179 
00183         QLinkedList< Annotation* > annotations() const;
00184 
00189         const Action * pageAction( PageAction action ) const;
00190 
00194         QLinkedList< FormField * > formFields() const;
00195 
00199         void setPixmap( int id, QPixmap *pixmap );
00200 
00204         void setTextPage( TextPage * text );
00205 
00209         void setObjectRects( const QLinkedList< ObjectRect * > & rects );
00210 
00214         void setSourceReferences( const QLinkedList< SourceRefObjectRect * > & rects );
00215 
00221         void setDuration( double seconds );
00222 
00228         double duration() const;
00229 
00233         void setLabel( const QString& label );
00234 
00238         QString label() const;
00239 
00243         const RegularAreaRect * textSelection() const;
00244 
00249         QColor textSelectionColor() const;
00250 
00254         void addAnnotation( Annotation * annotation );
00255 
00259         bool removeAnnotation( Annotation * annotation );
00260 
00264         void setTransition( PageTransition * transition );
00265 
00269         void setPageAction( PageAction action, Action * link );
00270 
00274         void setFormFields( const QLinkedList< FormField * >& fields );
00275 
00279         void deletePixmap( int id );
00280 
00284         void deletePixmaps();
00285 
00289         void deleteRects();
00290 
00294         void deleteSourceReferences();
00295 
00299         void deleteAnnotations();
00300 
00301     private:
00302         PagePrivate* const d;
00304         friend class PagePrivate;
00305         friend class Document;
00306         friend class DocumentPrivate;
00307 
00312         friend class ::PagePainter;
00314 
00315         const QPixmap * _o_nearestPixmap( int, int, int ) const;
00316 
00317         QLinkedList< ObjectRect* > m_rects;
00318         QLinkedList< HighlightAreaRect* > m_highlights;
00319         QLinkedList< Annotation* > m_annotations;
00320 
00321         Q_DISABLE_COPY( Page )
00322 };
00323 
00324 }
00325 
00326 #endif

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdegraphics

Skip menu "kdegraphics"
  • okular
Generated for kdegraphics by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal