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

okular

  • Okular
  • Okular::Page
Public Types | Public Member Functions

Okular::Page Class Reference

Collector for all the data belonging to a page. More...

#include <page.h>

List of all members.

Public Types

enum  PageAction { Opening, Closing }

Public Member Functions

 Page (uint number, double width, double height, Rotation orientation)
 ~Page ()
int number () const
Rotation orientation () const
Rotation rotation () const
Rotation totalOrientation () const
double width () const
double height () const
double ratio () const
bool hasPixmap (int id, int width=-1, int height=-1) const
bool hasTextPage () const
bool hasObjectRect (double x, double y, double xScale, double yScale) const
bool hasHighlights (int id=-1) const
bool hasTransition () const
bool hasAnnotations () const
RegularAreaRect * findText (int id, const QString &text, SearchDirection direction, Qt::CaseSensitivity caseSensitivity, const RegularAreaRect *lastRect=0) const
QString text (const RegularAreaRect *rect=0) const
RegularAreaRect * textArea (TextSelection *selection) const
const ObjectRect * objectRect (ObjectRect::ObjectType type, double x, double y, double xScale, double yScale) const
const PageTransition * transition () const
QLinkedList< Annotation * > annotations () const
const Action * pageAction (PageAction action) const
QLinkedList< FormField * > formFields () const
void setPixmap (int id, QPixmap *pixmap)
void setTextPage (TextPage *text)
void setObjectRects (const QLinkedList< ObjectRect * > &rects)
void setSourceReferences (const QLinkedList< SourceRefObjectRect * > &rects)
void setDuration (double seconds)
double duration () const
void setLabel (const QString &label)
QString label () const
const RegularAreaRect * textSelection () const
QColor textSelectionColor () const
void addAnnotation (Annotation *annotation)
bool removeAnnotation (Annotation *annotation)
void setTransition (PageTransition *transition)
void setPageAction (PageAction action, Action *link)
void setFormFields (const QLinkedList< FormField * > &fields)
void deletePixmap (int id)
void deletePixmaps ()
void deleteRects ()
void deleteSourceReferences ()
void deleteAnnotations ()

Detailed Description

Collector for all the data belonging to a page.

The Page class contains pixmaps (referenced using observers id as key), 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.

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.

Definition at line 47 of file page.h.


Member Enumeration Documentation

enum Okular::Page::PageAction

An action to be executed when particular events happen.

Enumerator:
Opening 

An action to be executed when the page is "opened".

Closing 

An action to be executed when the page is "closed".

Definition at line 53 of file page.h.


Constructor & Destructor Documentation

Page::Page ( uint  number,
double  width,
double  height,
Rotation  orientation 
)

Creates a new page.

class Page

Parameters:
number The number of the page in the document.
width The width of the page.
height The height of the page.
orientation The orientation of the page

Definition at line 123 of file page.cpp.

Page::~Page (  ) 

Destroys the page.

Definition at line 128 of file page.cpp.


Member Function Documentation

void Page::addAnnotation ( Annotation *  annotation  ) 

Adds a new annotation to the page.

Definition at line 480 of file page.cpp.

QLinkedList< Annotation * > Page::annotations (  )  const

Returns the list of annotations of the page.

Definition at line 344 of file page.cpp.

void Page::deleteAnnotations (  ) 

Deletes all annotations of the page.

Definition at line 647 of file page.cpp.

void Page::deletePixmap ( int  id  ) 

Deletes the pixmap for the observer with the given id.

Definition at line 594 of file page.cpp.

void Page::deletePixmaps (  ) 

Deletes all pixmaps of the page.

Definition at line 600 of file page.cpp.

void Page::deleteRects (  ) 

Deletes all object rects of the page.

Definition at line 611 of file page.cpp.

void Page::deleteSourceReferences (  ) 

Deletes all source reference objects of the page.

Definition at line 642 of file page.cpp.

double Page::duration (  )  const

Returns the duration in seconds of the page when displayed in presentation mode.

A negative number means that no time is set.

Definition at line 455 of file page.cpp.

RegularAreaRect * Page::findText ( int  id,
const QString &  text,
SearchDirection  direction,
Qt::CaseSensitivity  caseSensitivity,
const RegularAreaRect *  lastRect = 0 
) const

Returns the bounding rect of the text which matches the following criteria or 0 if the search is not successful.

Parameters:
id An unique id for this search.
text The search text.
direction The direction of the search (SearchDirection)
caseSensitivity If Qt::CaseSensitive, the search is case sensitive; otherwise the search is case insensitive.
lastRect If 0 (default) the search starts at the beginning of the page, otherwise right/below the coordinates of the the given rect.

Definition at line 241 of file page.cpp.

QLinkedList< FormField * > Page::formFields (  )  const

Returns the list of FormField of the page.

Definition at line 364 of file page.cpp.

bool Page::hasAnnotations (  )  const

Returns whether the page provides annotations.

Definition at line 236 of file page.cpp.

bool Page::hasHighlights ( int  id = -1  )  const

Returns whether the page provides highlighting for the observer with the given id.

Definition at line 215 of file page.cpp.

bool Page::hasObjectRect ( double  x,
double  y,
double  xScale,
double  yScale 
) const

Returns whether the page has an object rect which includes the point (x, y) at scale (xScale, yScale).

Definition at line 202 of file page.cpp.

bool Page::hasPixmap ( int  id,
int  width = -1,
int  height = -1 
) const

Returns whether the page has a pixmap of size width x height for the observer with given id.

Definition at line 175 of file page.cpp.

bool Page::hasTextPage (  )  const

Returns whether the page provides a text page (TextPage).

Definition at line 189 of file page.cpp.

bool Page::hasTransition (  )  const

Returns whether the page provides a transition effect.

Definition at line 231 of file page.cpp.

double Page::height (  )  const

Returns the height of the page.

Definition at line 165 of file page.cpp.

QString Page::label (  )  const

Returns the label of the page, or a null string if not set.

Definition at line 465 of file page.cpp.

int Page::number (  )  const

Returns the number of the page in the document.

Definition at line 140 of file page.cpp.

const ObjectRect * Page::objectRect ( ObjectRect::ObjectType  type,
double  x,
double  y,
double  xScale,
double  yScale 
) const

Returns the object rect of the given type which is at point (x, y) at scale (xScale, yScale).

Definition at line 330 of file page.cpp.

Rotation Page::orientation (  )  const

Returns the orientation of the page as defined by the document.

Definition at line 145 of file page.cpp.

const Action * Page::pageAction ( PageAction  action  )  const

Returns the Action object which is associated with the given page action or 0 if no page action is set.

Definition at line 349 of file page.cpp.

double Page::ratio (  )  const

Returns the ration (height / width) of the page.

Definition at line 170 of file page.cpp.

bool Page::removeAnnotation ( Annotation *  annotation  ) 

Removes the annotation from the page.

Definition at line 533 of file page.cpp.

Rotation Page::rotation (  )  const

Returns the rotation of the page as defined by the user.

Definition at line 150 of file page.cpp.

void Page::setDuration ( double  seconds  ) 

Sets the duration of the page to seconds when displayed in presentation mode.

Setting a negative number disables the duration.

Definition at line 450 of file page.cpp.

void Page::setFormFields ( const QLinkedList< FormField * > &  fields  ) 

Sets fields as list of FormField of the page.

Definition at line 583 of file page.cpp.

void Page::setLabel ( const QString &  label  ) 

Sets the labels for the page to label .

Definition at line 460 of file page.cpp.

void Page::setObjectRects ( const QLinkedList< ObjectRect * > &  rects  ) 

Sets the list of object rects of the page.

Rotate the object rects of the page.

Definition at line 403 of file page.cpp.

void Page::setPageAction ( PageAction  action,
Action *  link 
)

Sets the link object for the given page action.

Definition at line 568 of file page.cpp.

void Page::setPixmap ( int  id,
QPixmap *  pixmap 
)

Sets the pixmap for the observer with the given id.

Definition at line 369 of file page.cpp.

void Page::setSourceReferences ( const QLinkedList< SourceRefObjectRect * > &  rects  ) 

Sets the list of source reference objects rects.

Definition at line 443 of file page.cpp.

void Page::setTextPage ( TextPage *  text  ) 

Sets the text page.

Definition at line 392 of file page.cpp.

void Page::setTransition ( PageTransition *  transition  ) 

Sets the page transition effect.

Definition at line 562 of file page.cpp.

QString Page::text ( const RegularAreaRect *  rect = 0  )  const

Returns the page text (or part of it).

See also:
TextPage::text()

Definition at line 252 of file page.cpp.

RegularAreaRect * Page::textArea ( TextSelection *  selection  )  const

Returns the rectangular area of the given selection.

Definition at line 194 of file page.cpp.

const RegularAreaRect * Page::textSelection (  )  const

Returns the current text selection.

Definition at line 470 of file page.cpp.

QColor Page::textSelectionColor (  )  const

Returns the color of the current text selection, or an invalid color if no text selection has been set.

Definition at line 475 of file page.cpp.

Rotation Page::totalOrientation (  )  const

Returns the total orientation which is the original orientation plus the user defined rotation.

Definition at line 155 of file page.cpp.

const PageTransition * Page::transition (  )  const

Returns the transition effect of the page or 0 if no transition effect is set (see hasTransition()).

Definition at line 339 of file page.cpp.

double Page::width (  )  const

Returns the width of the page.

Definition at line 160 of file page.cpp.


The documentation for this class was generated from the following files:
  • page.h
  • page.cpp

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.7.1
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