Okular
page.cpp
54static void deleteObjectRects(QList<ObjectRect *> &rects, const QSet<ObjectRect::ObjectType> &which)
219bool Page::hasPixmap(DocumentObserver *observer, int width, int height, const NormalizedRect &rect) const
230 QMap<DocumentObserver *, PagePrivate::PixmapObject>::const_iterator it = d->m_pixmaps.constFind(observer);
323RegularAreaRect *Page::findText(int id, const QString &text, SearchDirection direction, Qt::CaseSensitivity caseSensitivity, const RegularAreaRect *lastRect) const
359TextEntity::List Page::words(const RegularAreaRect *area, TextPage::TextAreaInclusionBehaviour b) const
377 retI = TextEntity(retI.text(), Okular::NormalizedRect(retI.transformedArea(d->rotationMatrix())));
391 if (((int)m_orientation + (int)m_rotation) % 2 != ((int)m_orientation + (int)orientation) % 2) {
407 RotationJob *job = new RotationJob(object.m_pixmap->toImage(), object.m_rotation, m_rotation, it.key());
433 const QTransform highlightRotationMatrix = Okular::buildRotationMatrix((Rotation)(((int)m_rotation - (int)oldRotation + 4) % 4));
456const ObjectRect *Page::objectRect(ObjectRect::ObjectType type, double x, double y, double xScale, double yScale) const
463 if ((objrect->objectType() == type) && objrect->distanceSqr(x, y, xScale, yScale) < distanceConsideredEqual) {
471QList<const ObjectRect *> Page::objectRects(ObjectRect::ObjectType type, double x, double y, double xScale, double yScale) const
479 if ((objrect->objectType() == type) && objrect->distanceSqr(x, y, xScale, yScale) < distanceConsideredEqual) {
487const ObjectRect *Page::nearestObjectRect(ObjectRect::ObjectType type, double x, double y, double xScale, double yScale, double *distance) const
552void PagePrivate::setPixmap(DocumentObserver *observer, QPixmap *pixmap, const NormalizedRect &rect, bool isPartialPixmap)
858 qCWarning(OkularCoreDebug).nospace() << "page (" << m_number << "): can't restore an annotation from XML.";
912void PagePrivate::saveLocalContents(QDomNode &parentNode, QDomDocument &document, PageItems what) const
993 QMap<DocumentObserver *, PagePrivate::PixmapObject>::const_iterator itPixmap = d->m_pixmaps.constFind(observer);
999 QMap<DocumentObserver *, PagePrivate::PixmapObject>::const_iterator it = d->m_pixmaps.constBegin(), end = d->m_pixmaps.constEnd();
1067 if (f->rect() == oldField->rect() && f->type() == oldField->type() && f->id() == oldField->id()) {
1079 if (f->type() == oldField->type() && f->id() == oldField->id() && qFuzzyCompare(f->rect().left, oldField->rect().left) && qFuzzyCompare(f->rect().top, oldField->rect().top) &&
1080 qFuzzyCompare(f->rect().right, oldField->rect().right) && qFuzzyCompare(f->rect().bottom, oldField->rect().bottom)) {
1086 if (f->type() == oldField->type() && qFuzzyCompare(f->rect().left, oldField->rect().left) && qFuzzyCompare(f->rect().top, oldField->rect().top) && qFuzzyCompare(f->rect().right, oldField->rect().right) &&
This class describes the object rectangle for an annotation.
Definition area.h:556
static Annotation * createAnnotation(const QDomElement &element)
Restore an annotation (with revisions if needed) from the dom element.
Definition annotations.cpp:98
static void storeAnnotation(const Annotation *annotation, QDomElement &element, QDomDocument &document)
Saves the annotation as a child of element taking care of saving all revisions if it has any.
Definition annotations.cpp:136
Annotation struct holds properties shared by all annotations.
Definition annotations.h:99
void setUniqueName(const QString &name)
Sets the unique name of the annotation.
Definition annotations.cpp:622
Base class for objects being notified when something changes.
Definition observer.h:29
virtual NormalizedRect rect() const =0
The bounding rect of the field, in normalized coordinates.
This class stores the geometry of a highlighting area in normalized coordinates, together with highli...
Definition area.h:945
NormalizedPoint is a helper class which stores the coordinates of a normalized point.
Definition area.h:117
A NormalizedRect is a rectangle which can be defined by two NormalizedPoints.
Definition area.h:189
An area with normalized coordinates that contains a reference to an object.
Definition area.h:458
ObjectType objectType() const
Returns the object type of the object rectangle.
Definition area.cpp:352
double distanceSqr(double x, double y, double xScale, double yScale) const
Returns the squared distance between the object and the point with normalized coordinates (x,...
Definition area.cpp:384
virtual void transform(const QTransform &matrix)
Transforms the object rectangle with the operations defined by matrix.
Definition area.cpp:379
Information object for the transition effect of a page.
Definition pagetransition.h:22
Rotation orientation() const
Returns the orientation of the page as defined by the document.
Definition page.cpp:165
void deletePixmap(DocumentObserver *observer)
Deletes the pixmap for the given observer.
Definition page.cpp:753
RegularAreaRect * findText(int id, const QString &text, SearchDirection direction, Qt::CaseSensitivity caseSensitivity, const RegularAreaRect *lastRect=nullptr) const
Returns the bounding rect of the text which matches the following criteria or 0 if the search is not ...
Definition page.cpp:323
bool hasTilesManager(const DocumentObserver *observer) const
Returns whether pixmaps for the tiled observer are handled by a tile manager.
Definition page.cpp:1012
bool hasTransition() const
Returns whether the page provides a transition effect.
Definition page.cpp:313
Rotation totalOrientation() const
Returns the total orientation which is the original orientation plus the user defined rotation.
Definition page.cpp:175
Annotation * annotation(const QString &uniqueName) const
Returns the annotation with the given unique name.
Definition page.cpp:518
bool 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,...
Definition page.cpp:279
const Action * pageAction(PageAction action) const
Returns the Action object which is associated with the given page action or 0 if no page action is se...
Definition page.cpp:528
const QList< ObjectRect * > & objectRects() const
Gets the list of object rects of the page.
Definition page.cpp:615
NormalizedRect boundingBox() const
Returns the bounding box of the page content in normalized [0,1] coordinates, in terms of the upright...
Definition page.cpp:195
void setTransition(PageTransition *transition)
Sets the page transition effect.
Definition page.cpp:723
void deleteSourceReferences()
Deletes all source reference objects of the page.
Definition page.cpp:808
bool removeAnnotation(Annotation *annotation)
Removes the annotation from the page.
Definition page.cpp:695
std::unique_ptr< RegularAreaRect > wordAt(const NormalizedPoint &p) const
Returns the area and text of the word at the given point Note that ownership of the returned area bel...
Definition page.cpp:261
const PageTransition * transition() const
Returns the transition effect of the page or 0 if no transition effect is set (see hasTransition()).
Definition page.cpp:508
const ObjectRect * 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,...
Definition page.cpp:456
QList< Annotation * > annotations() const
Returns the list of annotations of the page.
Definition page.cpp:513
QString label() const
Returns the label of the page, or a null string if not set.
Definition page.cpp:661
double duration() const
Returns the duration in seconds of the page when displayed in presentation mode.
Definition page.cpp:651
bool hasPixmap(DocumentObserver *observer, int width=-1, int height=-1, const NormalizedRect &rect=NormalizedRect()) const
Returns whether the page of size width x height has a pixmap in the region given by rect for the give...
Definition page.cpp:219
void setObjectRects(const QList< ObjectRect * > &rects)
Sets the list of object rects of the page.
Definition page.cpp:597
QColor textSelectionColor() const
Returns the color of the current text selection, or an invalid color if no text selection has been se...
Definition page.cpp:671
void setSourceReferences(const QList< SourceRefObjectRect * > &rects)
Sets the list of source reference objects rects.
Definition page.cpp:638
QList< FormField * > formFields() const
Returns the list of FormField of the page.
Definition page.cpp:542
TextEntity::List words(const RegularAreaRect *area, TextPage::TextAreaInclusionBehaviour b) const
Returns the page text (or part of it) including the bounding rectangles.
Definition page.cpp:359
const RegularAreaRect * textSelection() const
Returns the current text selection.
Definition page.cpp:666
bool hasTextPage() const
Returns whether the page provides a text page (TextPage).
Definition page.cpp:256
void setFormFields(const QList< FormField * > &fields)
Sets fields as list of FormField of the page.
Definition page.cpp:743
const ObjectRect * nearestObjectRect(ObjectRect::ObjectType type, double x, double y, double xScale, double yScale, double *distance) const
Returns the object rect of the given type which is nearest to the point (x, y) at scale (xScale,...
Definition page.cpp:487
std::unique_ptr< RegularAreaRect > textArea(const TextSelection &selection) const
Returns the rectangular area of the given selection.
Definition page.cpp:270
QList< Tile > tilesAt(const DocumentObserver *observer, const NormalizedRect &rect) const
Returns a list of all tiles intersecting with rect.
Definition page.cpp:1017
void setBoundingBox(const NormalizedRect &bbox)
Sets the bounding box of the page content in normalized [0,1] coordinates, in terms of the upright or...
Definition page.cpp:205
bool hasHighlights(int id=-1) const
Returns whether the page provides highlighting for the observer with the given id.
Definition page.cpp:294
QString text(const RegularAreaRect *area=nullptr) const
Returns the page text (or part of it).
Definition page.cpp:334
void setPageSize(DocumentObserver *observer, int width, int height)
Sets the size of the page (in screen pixels) if there is a TilesManager.
Definition page.cpp:248
void setPageAction(PageAction action, Action *link)
Sets the link object for the given page action.
Definition page.cpp:729
void setPixmap(DocumentObserver *observer, QPixmap *pixmap, const NormalizedRect &rect=NormalizedRect())
Sets the region described by rect with pixmap for the given observer.
Definition page.cpp:547
bool isBoundingBoxKnown() const
Returns whether the bounding box of the page has been computed.
Definition page.cpp:200
Rotation rotation() const
Returns the rotation of the page as defined by the user.
Definition page.cpp:170
void setDuration(double seconds)
Sets the duration of the page to seconds when displayed in presentation mode.
Definition page.cpp:646
This is a list of NormalizedRect, to describe an area consisting of multiple rectangles using normali...
Definition area.h:927
void transform(const QTransform &matrix)
Transforms the regular area with the operations defined by matrix.
Definition area.h:903
This class describes the object rectangle for a source reference.
Definition area.h:599
Represents a piece of text on a TextPage, containing its textual representation and its bounding box.
Definition textpage.h:53
TextAreaInclusionBehaviour
Defines the behaviour of adding characters to text() result.
Definition textpage.h:113
@ AnyPixelTextAreaInclusionBehaviour
A character is included into text() result if any pixel of his bounding box is in the given area.
Definition textpage.h:114
Wrapper around the information needed to generate the selection area.
Definition misc.h:19
KGuiItem ok()
const QList< QKeySequence > & end()
KOSM_EXPORT double distance(const std::vector< const OSM::Node * > &path, Coordinate coord)
QDomElement createElement(const QString &tagName)
QDomNode importNode(const QDomNode &importedNode, bool deep)
QString attribute(const QString &name, const QString &defValue) const const
void setAttribute(const QString &name, const QString &value)
QString tagName() const const
QDomNode appendChild(const QDomNode &newChild)
QDomNode firstChild() const const
bool hasChildNodes() const const
bool isElement() const const
bool isNull() const const
QDomNode nextSibling() const const
QDomElement toElement() const const
const_iterator constEnd() const const
const_iterator constFind(const Key &key) const const
void append(QList< T > &&value)
iterator begin()
iterator end()
iterator erase(const_iterator begin, const_iterator end)
bool hasPrevious() const const
const T & previous()
void toBack()
bool hasNext() const const
Item next()
const T & value() const const
QPixmap fromImage(QImage &&image, Qt::ImageConversionFlags flags)
int height() const const
QImage toImage() const const
int width() const const
bool contains(const QSet< T > &other) const const
bool isEmpty() const const
int toInt(bool *ok, int base) const const
CaseSensitivity
QUuid createUuid()
QString toString(StringFormat mode) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.