32#ifndef _POPPLER_ANNOTATION_H_
33#define _POPPLER_ANNOTATION_H_
35#include <QtCore/QDateTime>
36#include <QtCore/QSharedDataPointer>
37#include <QtCore/QLinkedList>
38#include <QtCore/QList>
39#include <QtCore/QPointF>
40#include <QtCore/QRectF>
41#include <QtCore/QScopedPointer>
42#include <QtCore/QVector>
43#include <QtGui/QColor>
45#include <QtXml/QDomDocument>
46#include "poppler-export.h"
53class AnnotationPrivate;
54class AnnotationAppearancePrivate;
55class TextAnnotationPrivate;
56class LineAnnotationPrivate;
57class GeomAnnotationPrivate;
58class HighlightAnnotationPrivate;
59class StampAnnotationPrivate;
60class InkAnnotationPrivate;
61class LinkAnnotationPrivate;
62class CaretAnnotationPrivate;
63class FileAttachmentAnnotationPrivate;
64class SoundAnnotationPrivate;
65class MovieAnnotationPrivate;
66class ScreenAnnotationPrivate;
67class WidgetAnnotationPrivate;
68class RichMediaAnnotationPrivate;
101 Q_DECL_DEPRECATED
static QDomElement
findChildElement(
const QDomNode &parentNode,
const QString &name);
125 AnnotationAppearancePrivate *d;
251 ToggleHidingOnMouse = 64,
295 QString contents()
const;
296 void setContents(
const QString &contents);
309 QDateTime modificationDate()
const;
310 void setModificationDate(
const QDateTime &date);
312 QDateTime creationDate()
const;
313 void setCreationDate(
const QDateTime &date);
360 QColor color()
const;
361 void setColor(
const QColor &color);
362 double opacity()
const;
363 void setOpacity(
double opacity);
366 double width()
const;
367 void setWidth(
double width);
368 LineStyle lineStyle()
const;
369 void setLineStyle(LineStyle style);
370 double xCorners()
const;
371 void setXCorners(
double radius);
372 double yCorners()
const;
373 void setYCorners(
double radius);
374 const QVector<double> &dashArray()
const;
375 void setDashArray(
const QVector<double> &array);
378 LineEffect lineEffect()
const;
379 void setLineEffect(LineEffect effect);
380 double effectIntensity()
const;
381 void setEffectIntensity(
double intens);
385 QSharedDataPointer<Private> d;
408 void setFlags(
int flags);
411 QRectF geometry()
const;
412 void setGeometry(
const QRectF &geom);
415 QString title()
const;
416 void setTitle(
const QString &title);
417 QString summary()
const;
418 void setSummary(
const QString &summary);
419 QString text()
const;
420 void setText(
const QString &text);
424 QSharedDataPointer<Private> d;
497 Annotation(AnnotationPrivate &dd,
const QDomNode &annNode);
498 void storeBaseAnnotationProperties(QDomNode &annNode, QDomDocument &document)
const;
500 QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr;
504 virtual void store(QDomNode &parentNode, QDomDocument &document)
const = 0;
517 friend class AnnotationPrivate;
563 QFont textFont()
const;
564 void setTextFont(
const QFont &font);
571 int inplaceAlign()
const;
572 void setInplaceAlign(
int align);
574 QPointF calloutPoint(
int id)
const;
580 InplaceIntent inplaceIntent()
const;
581 void setInplaceIntent(InplaceIntent intent);
586 void store(QDomNode &parentNode, QDomDocument &document)
const override;
587 void setTextType(TextType type);
600 friend class AnnotationPrivate;
639 QLinkedList<QPointF> linePoints()
const;
640 void setLinePoints(
const QLinkedList<QPointF> &points);
642 TermStyle lineStartStyle()
const;
643 void setLineStartStyle(TermStyle style);
645 TermStyle lineEndStyle()
const;
646 void setLineEndStyle(TermStyle style);
648 bool isLineClosed()
const;
649 void setLineClosed(
bool closed);
651 QColor lineInnerColor()
const;
652 void setLineInnerColor(
const QColor &color);
654 double lineLeadingForwardPoint()
const;
655 void setLineLeadingForwardPoint(
double point);
657 double lineLeadingBackPoint()
const;
658 void setLineLeadingBackPoint(
double point);
660 bool lineShowCaption()
const;
661 void setLineShowCaption(
bool show);
663 LineIntent lineIntent()
const;
664 void setLineIntent(LineIntent intent);
669 void store(QDomNode &parentNode, QDomDocument &document)
const override;
684 friend class AnnotationPrivate;
698 GeomType geomType()
const;
699 void setGeomType(GeomType type);
701 QColor geomInnerColor()
const;
702 void setGeomInnerColor(
const QColor &color);
707 void store(QDomNode &parentNode, QDomDocument &document)
const override;
720 friend class AnnotationPrivate;
776 void store(QDomNode &parentNode, QDomDocument &document)
const override;
789 friend class AnnotationPrivate;
834 void store(QDomNode &parentNode, QDomDocument &document)
const override;
847 friend class AnnotationPrivate;
854 QList<QLinkedList<QPointF>> inkPaths()
const;
855 void setInkPaths(
const QList<QLinkedList<QPointF>> &paths);
859 void store(QDomNode &parentNode, QDomDocument &document)
const override;
868 friend class AnnotationPrivate;
885 void setLinkDestination(
Link *link);
887 HighlightMode linkHighlightMode()
const;
888 void setLinkHighlightMode(HighlightMode mode);
890 QPointF linkRegionPoint(
int id)
const;
892 void setLinkRegionPoint(
int id,
const QPointF &point);
898 void store(QDomNode &parentNode, QDomDocument &document)
const override;
911 friend class AnnotationPrivate;
927 CaretSymbol caretSymbol()
const;
928 void setCaretSymbol(CaretSymbol symbol);
933 void store(QDomNode &parentNode, QDomDocument &document)
const override;
947 friend class AnnotationPrivate;
977 void store(QDomNode &parentNode, QDomDocument &document)
const override;
991 friend class AnnotationPrivate;
1021 void store(QDomNode &parentNode, QDomDocument &document)
const override;
1035 friend class AnnotationPrivate;
1065 void store(QDomNode &parentNode, QDomDocument &document)
const override;
1079 friend class AnnotationPrivate;
1119 void store(QDomNode &parentNode, QDomDocument &document)
const override;
1136 friend class AnnotationPrivate;
1154 void store(QDomNode &parentNode, QDomDocument &document)
const override;
1168 friend class AnnotationPrivate;
1185 friend class AnnotationPrivate;
1197 void setFlashVars(
const QString &flashVars);
1200 QScopedPointer<Private> d;
1212 friend class AnnotationPrivate;
1240 void setType(
Type type);
1244 QScopedPointer<Private> d;
1255 friend class AnnotationPrivate;
1288 void setType(
Type type);
1289 void setName(
const QString &name);
1290 void setInstances(
const QList<RichMediaAnnotation::Instance *> &instances);
1293 QScopedPointer<Private> d;
1305 friend class AnnotationPrivate;
1322 void setName(
const QString &name);
1326 QScopedPointer<Private> d;
1337 friend class AnnotationPrivate;
1351 QList<RichMediaAnnotation::Asset *>
assets()
const;
1354 void setConfigurations(
const QList<RichMediaAnnotation::Configuration *> &configurations);
1355 void setAssets(
const QList<RichMediaAnnotation::Asset *> &assets);
1358 QScopedPointer<Private> d;
1369 friend class AnnotationPrivate;
1394 QScopedPointer<Private> d;
1405 friend class AnnotationPrivate;
1430 QScopedPointer<Private> d;
1441 friend class AnnotationPrivate;
1462 QScopedPointer<Private> d;
1482 void store(QDomNode &parentNode, QDomDocument &document)
const override;
AnnotationAppearance class wrapping Poppler's AP stream object.
Definition poppler-annotation.h:117
Helper class for (recursive) Annotation retrieval/storage.
Definition poppler-annotation.h:81
static Annotation * createAnnotation(const QDomElement &annElement)
Restore an Annotation (with revisions if needed) from the DOM element annElement.
static void storeAnnotation(const Annotation *ann, QDomElement &annElement, QDomDocument &document)
Save the Annotation ann as a child of annElement taking care of saving all revisions if ann has any.
static QDomElement findChildElement(const QDomNode &parentNode, const QString &name)
Returns an element called name from the direct children of parentNode or a null element if not found.
Container class for Annotation style information.
Definition poppler-annotation.h:352
Annotation class holding properties shared by all annotations.
Definition poppler-annotation.h:203
RevType revisionType() const
std::unique_ptr< AnnotationAppearance > annotationAppearance() const
Returns the current appearance stream of this annotation.
SubType
Annotation subclasses.
Definition poppler-annotation.h:217
int flags() const
Returns this annotation's flags.
RevScope revisionScope() const
void setAuthor(const QString &author)
Sets a new author for the annotation.
void setPopup(const Popup &popup)
QRectF boundary() const
Returns this annotation's boundary rectangle in normalized coordinates.
void setAnnotationAppearance(const AnnotationAppearance &annotationAppearance)
Sets the annotation's appearance stream with the annotationAppearance.
Flag
Annotation flags.
Definition poppler-annotation.h:244
QList< Annotation * > revisions() const
Returns the revisions of this annotation.
QString author() const
Returns the author of the annotation.
void setUniqueName(const QString &uniqueName)
Sets a new unique name for the annotation.
virtual ~Annotation()
Destructor.
void setFlags(int flags)
Sets this annotation's flags.
QString uniqueName() const
Returns the unique name (ID) of the annotation.
void setBoundary(const QRectF &boundary)
Sets this annotation's boundary rectangle.
AdditionalActionType
Describes the flags from an annotations 'AA' dictionary.
Definition poppler-annotation.h:481
@ MouseReleasedAction
Performed when the mouse button is released inside the annotation's active area.
Definition poppler-annotation.h:485
@ FocusInAction
Performed when the annotation receives the input focus.
Definition poppler-annotation.h:486
@ PageOpeningAction
Performed when the page containing the annotation is opened.
Definition poppler-annotation.h:488
@ MousePressedAction
Performed when the mouse button is pressed inside the annotation's active area.
Definition poppler-annotation.h:484
@ FocusOutAction
Performed when the annotation loses the input focus.
Definition poppler-annotation.h:487
@ PageClosingAction
Performed when the page containing the annotation is closed.
Definition poppler-annotation.h:489
@ CursorLeavingAction
Performed when the cursor exists the annotation's active area.
Definition poppler-annotation.h:483
@ PageVisibleAction
Performed when the page containing the annotation becomes visible.
Definition poppler-annotation.h:490
@ CursorEnteringAction
Performed when the cursor enters the annotation's active area.
Definition poppler-annotation.h:482
virtual SubType subType() const =0
The type of the annotation.
void setStyle(const Style &style)
Caret annotation.
Definition poppler-annotation.h:909
SubType subType() const override
The type of the annotation.
CaretSymbol
The symbols for the caret annotation.
Definition poppler-annotation.h:922
Container class for an embedded file with a PDF document.
Definition poppler-qt5.h:346
File attachment annotation.
Definition poppler-annotation.h:946
void setFileIconName(const QString &icon)
Sets a new name for the icon of this annotation.
QString fileIconName() const
Returns the name of the icon of this annotation.
void setEmbeddedFile(EmbeddedFile *ef)
Sets a new EmbeddedFile for this annotation.
EmbeddedFile * embeddedFile() const
Returns the EmbeddedFile of this annotation.
SubType subType() const override
The type of the annotation.
Geometric annotation.
Definition poppler-annotation.h:682
SubType subType() const override
The type of the annotation.
Text highlight annotation.
Definition poppler-annotation.h:718
void setHighlightQuads(const QList< Quad > &quads)
Set the areas to highlight.
QList< Quad > highlightQuads() const
The list of areas to highlight.
void setHighlightType(HighlightType type)
Set the type of highlighting to use for the given area or areas.
SubType subType() const override
The type of the annotation.
HighlightType highlightType() const
The type (style) of highlighting to use for this area or these areas.
HighlightType
The type of highlight.
Definition poppler-annotation.h:731
@ Squiggly
jagged or squiggly underline
Definition poppler-annotation.h:733
@ Underline
straight line underline
Definition poppler-annotation.h:734
@ Highlight
highlighter pen style annotation
Definition poppler-annotation.h:732
Ink Annotation.
Definition poppler-annotation.h:845
SubType subType() const override
The type of the annotation.
Polygon/polyline annotation.
Definition poppler-annotation.h:598
LineType
Definition poppler-annotation.h:606
LineType lineType() const
LineAnnotation(LineType type)
SubType subType() const override
The type of the annotation.
Definition poppler-annotation.h:866
Link * linkDestination() const
SubType subType() const override
The type of the annotation.
Movie: a movie to be played.
Definition poppler-link.h:598
Rendition: Rendition link.
Definition poppler-link.h:482
Encapsulates data that describes a link.
Definition poppler-link.h:185
Movie annotation.
Definition poppler-annotation.h:1034
void setMovieTitle(const QString &title)
Sets a new title for the movie of this annotation.
MovieObject * movie() const
Returns the MovieObject of this annotation.
SubType subType() const override
The type of the annotation.
void setMovie(MovieObject *movie)
Sets a new MovieObject for this annotation.
QString movieTitle() const
Returns the title of the movie of this annotation.
Container class for a movie object in a PDF document.
Definition poppler-qt5.h:2509
A page in a document.
Definition poppler-qt5.h:436
The content object of a RichMediaAnnotation.
Definition poppler-annotation.h:1336
QList< RichMediaAnnotation::Configuration * > configurations() const
Returns the list of configuration objects of the content object.
QList< RichMediaAnnotation::Asset * > assets() const
Returns the list of asset objects of the content object.
Screen annotation.
Definition poppler-annotation.h:1078
LinkRendition * action() const
Returns the LinkRendition of this annotation.
SubType subType() const override
The type of the annotation.
void setAction(LinkRendition *action)
Sets a new LinkRendition for this annotation.
Link * additionalAction(AdditionalActionType type) const
Returns the additional action of the given type fo the annotation or 0 if no action has been defined.
void setScreenTitle(const QString &title)
Sets a new title for the screen of this annotation.
QString screenTitle() const
Returns the title of the screen of this annotation.
Sound annotation.
Definition poppler-annotation.h:990
SubType subType() const override
The type of the annotation.
void setSound(SoundObject *s)
Sets a new SoundObject for this annotation.
void setSoundIconName(const QString &icon)
Sets a new name for the icon of this annotation.
QString soundIconName() const
Returns the name of the icon of this annotation.
SoundObject * sound() const
Returns the SoundObject of this annotation.
Container class for a sound file in a PDF document.
Definition poppler-qt5.h:2433
Stamp annotation.
Definition poppler-annotation.h:787
SubType subType() const override
The type of the annotation.
void setStampCustomImage(const QImage &image)
Set a custom icon for this stamp annotation.
void setStampIconName(const QString &name)
Set the icon type for this stamp annotation.
QString stampIconName() const
The name of the icon for this stamp annotation.
Annotation containing text.
Definition poppler-annotation.h:515
QString textIcon() const
The name of the icon for this text annotation.
void setCalloutPoints(const QVector< QPointF > &points)
TextType textType() const
The type of text annotation represented by this object.
void setTextIcon(const QString &icon)
Set the name of the icon to use for this text annotation.
SubType subType() const override
The type of the annotation.
QColor textColor() const
Default text color is black.
QVector< QPointF > calloutPoints() const
void setTextColor(const QColor &color)
The Poppler Qt5 binding.
Definition poppler-annotation.h:50
Structure corresponding to a QuadPoints array.
Definition poppler-annotation.h:744