okular
#include <page.h>
Public Types | |
enum | PageAction { Opening, Closing } |
Public Member Functions | |
Page (uint number, double width, double height, Rotation orientation) | |
~Page () | |
void | addAnnotation (Annotation *annotation) |
QLinkedList< Annotation * > | annotations () const |
NormalizedRect | boundingBox () const |
void | deleteAnnotations () |
void | deletePixmap (DocumentObserver *observer) |
void | deletePixmaps () |
void | deleteRects () |
void | deleteSourceReferences () |
double | duration () const |
RegularAreaRect * | findText (int id, const QString &text, SearchDirection direction, Qt::CaseSensitivity caseSensitivity, const RegularAreaRect *lastRect=0) const |
QLinkedList< FormField * > | formFields () const |
bool | hasAnnotations () const |
bool | hasHighlights (int id=-1) const |
bool | hasObjectRect (double x, double y, double xScale, double yScale) const |
bool | hasPixmap (DocumentObserver *observer, int width=-1, int height=-1, const NormalizedRect &rect=NormalizedRect()) const |
bool | hasTextPage () const |
bool | hasTilesManager () const |
bool | hasTransition () const |
double | height () const |
bool | isBoundingBoxKnown () const |
QString | label () const |
const ObjectRect * | nearestObjectRect (ObjectRect::ObjectType type, double x, double y, double xScale, double yScale, double *distance) const |
int | number () const |
const ObjectRect * | objectRect (ObjectRect::ObjectType type, double x, double y, double xScale, double yScale) const |
QLinkedList< const ObjectRect * > | objectRects (ObjectRect::ObjectType type, double x, double y, double xScale, double yScale) const |
Rotation | orientation () const |
const Action * | pageAction (PageAction action) const |
double | ratio () const |
bool | removeAnnotation (Annotation *annotation) |
Rotation | rotation () const |
void | setBoundingBox (const NormalizedRect &bbox) |
void | setDuration (double seconds) |
void | setFormFields (const QLinkedList< FormField * > &fields) |
void | setLabel (const QString &label) |
void | setObjectRects (const QLinkedList< ObjectRect * > &rects) |
void | setPageAction (PageAction action, Action *link) |
void | setPixmap (DocumentObserver *observer, QPixmap *pixmap, const NormalizedRect &rect=NormalizedRect()) |
void | setSourceReferences (const QLinkedList< SourceRefObjectRect * > &rects) |
void | setTextPage (TextPage *text) |
void | setTransition (PageTransition *transition) |
QString | text (const RegularAreaRect *rect=0) const |
QString | text (const RegularAreaRect *rect, TextPage::TextAreaInclusionBehaviour b) const |
RegularAreaRect * | textArea (TextSelection *selection) const |
const RegularAreaRect * | textSelection () const |
QColor | textSelectionColor () const |
QList< Tile > | tilesAt (const NormalizedRect &rect) const |
Rotation | totalOrientation () const |
const PageTransition * | transition () const |
double | width () const |
RegularAreaRect * | wordAt (const NormalizedPoint &p, QString *word=0) const |
TextEntity::List | words (const RegularAreaRect *rect, TextPage::TextAreaInclusionBehaviour b) const |
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.
Member Enumeration Documentation
Constructor & Destructor Documentation
Page::Page | ( | uint | number, |
double | width, | ||
double | height, | ||
Rotation | orientation | ||
) |
Member Function Documentation
void Page::addAnnotation | ( | Annotation * | annotation | ) |
QLinkedList< Annotation * > Page::annotations | ( | ) | const |
NormalizedRect Page::boundingBox | ( | ) | const |
Returns the bounding box of the page content in normalized [0,1] coordinates, in terms of the upright orientation (Rotation0).
If it has not been computed yet, returns the full page (i.e., (0, 0, 1, 1)). Note that the bounding box may be null if the page is blank.
- Since
- 0.7 (KDE 4.1)
void Page::deleteAnnotations | ( | ) |
void Page::deletePixmap | ( | DocumentObserver * | observer | ) |
void Page::deletePixmaps | ( | ) |
void Page::deleteRects | ( | ) |
void Page::deleteSourceReferences | ( | ) |
double Page::duration | ( | ) | const |
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 given rect.
QLinkedList< FormField * > Page::formFields | ( | ) | const |
bool Page::hasAnnotations | ( | ) | const |
bool Page::hasHighlights | ( | int | id = -1 | ) | const |
bool Page::hasObjectRect | ( | double | x, |
double | y, | ||
double | xScale, | ||
double | yScale | ||
) | const |
bool Page::hasPixmap | ( | DocumentObserver * | observer, |
int | width = -1 , |
||
int | height = -1 , |
||
const NormalizedRect & | rect = NormalizedRect() |
||
) | const |
bool Page::hasTextPage | ( | ) | const |
bool Page::hasTilesManager | ( | ) | const |
bool Page::hasTransition | ( | ) | const |
double Page::height | ( | ) | const |
bool Page::isBoundingBoxKnown | ( | ) | const |
QString Page::label | ( | ) | const |
const ObjectRect * Page::nearestObjectRect | ( | ObjectRect::ObjectType | type, |
double | x, | ||
double | y, | ||
double | xScale, | ||
double | yScale, | ||
double * | distance | ||
) | const |
int Page::number | ( | ) | const |
const ObjectRect * Page::objectRect | ( | ObjectRect::ObjectType | type, |
double | x, | ||
double | y, | ||
double | xScale, | ||
double | yScale | ||
) | const |
QLinkedList< const ObjectRect * > Page::objectRects | ( | ObjectRect::ObjectType | type, |
double | x, | ||
double | y, | ||
double | xScale, | ||
double | yScale | ||
) | const |
Rotation Page::orientation | ( | ) | const |
const Action * Page::pageAction | ( | PageAction | action | ) | const |
double Page::ratio | ( | ) | const |
bool Page::removeAnnotation | ( | Annotation * | annotation | ) |
Rotation Page::rotation | ( | ) | const |
void Page::setBoundingBox | ( | const NormalizedRect & | bbox | ) |
void Page::setDuration | ( | double | seconds | ) |
void Page::setFormFields | ( | const QLinkedList< FormField * > & | fields | ) |
void Page::setLabel | ( | const QString & | label | ) |
void Page::setObjectRects | ( | const QLinkedList< ObjectRect * > & | rects | ) |
void Page::setPageAction | ( | PageAction | action, |
Action * | link | ||
) |
void Page::setPixmap | ( | DocumentObserver * | observer, |
QPixmap * | pixmap, | ||
const NormalizedRect & | rect = NormalizedRect() |
||
) |
void Page::setSourceReferences | ( | const QLinkedList< SourceRefObjectRect * > & | rects | ) |
void Page::setTextPage | ( | TextPage * | text | ) |
void Page::setTransition | ( | PageTransition * | transition | ) |
QString Page::text | ( | const RegularAreaRect * | rect = 0 | ) | const |
Returns the page text (or part of it).
- See also
- TextPage::text()
QString Page::text | ( | const RegularAreaRect * | rect, |
TextPage::TextAreaInclusionBehaviour | b | ||
) | const |
RegularAreaRect * Page::textArea | ( | TextSelection * | selection | ) | const |
const RegularAreaRect * Page::textSelection | ( | ) | const |
QColor Page::textSelectionColor | ( | ) | const |
QList< Tile > Page::tilesAt | ( | const NormalizedRect & | rect | ) | const |
Rotation Page::totalOrientation | ( | ) | const |
const PageTransition * Page::transition | ( | ) | const |
Returns the transition effect of the page or 0 if no transition effect is set (see hasTransition()).
double Page::width | ( | ) | const |
RegularAreaRect * Page::wordAt | ( | const NormalizedPoint & | p, |
QString * | word = 0 |
||
) | const |
Returns the area and text of the word at the given point Note that ownership of the returned area belongs to the caller.
- See also
- TextPage::wordAt()
- Since
- 0.15 (KDE 4.9)
TextEntity::List Page::words | ( | const RegularAreaRect * | rect, |
TextPage::TextAreaInclusionBehaviour | b | ||
) | const |
Returns the page text (or part of it) including the bounding rectangles.
Note that ownership of the contents of the returned list belongs to the caller.
- See also
- TextPage::words()
- Since
- 0.14 (KDE 4.8)
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.