33#ifndef _POPPLER_ANNOTATION_H_
34#define _POPPLER_ANNOTATION_H_
36#include <QtCore/QDateTime>
37#include <QtCore/QSharedDataPointer>
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 "poppler-export.h"
46#include "poppler-converter.h"
53class AnnotationPrivate;
54class AnnotationAppearancePrivate;
55class TextAnnotationPrivate;
56class LineAnnotationPrivate;
57class GeomAnnotationPrivate;
58class HighlightAnnotationPrivate;
59class StampAnnotationPrivate;
60class SignatureAnnotationPrivate;
61class InkAnnotationPrivate;
62class LinkAnnotationPrivate;
63class CaretAnnotationPrivate;
64class FileAttachmentAnnotationPrivate;
65class SoundAnnotationPrivate;
66class MovieAnnotationPrivate;
67class ScreenAnnotationPrivate;
68class WidgetAnnotationPrivate;
69class RichMediaAnnotationPrivate;
98 AnnotationAppearancePrivate *d;
222 ToggleHidingOnMouse = 64,
225 Q_DECLARE_FLAGS(Flags, Flag)
267 QString contents()
const;
268 void setContents(
const QString &contents);
281 QDateTime modificationDate()
const;
282 void setModificationDate(
const QDateTime &date);
284 QDateTime creationDate()
const;
285 void setCreationDate(
const QDateTime &date);
330 QColor color()
const;
331 void setColor(
const QColor &color);
332 double opacity()
const;
333 void setOpacity(
double opacity);
336 double width()
const;
337 void setWidth(
double width);
338 LineStyle lineStyle()
const;
339 void setLineStyle(LineStyle style);
340 double xCorners()
const;
341 void setXCorners(
double radius);
342 double yCorners()
const;
343 void setYCorners(
double radius);
344 const QVector<double> &dashArray()
const;
345 void setDashArray(
const QVector<double> &array);
348 LineEffect lineEffect()
const;
349 void setLineEffect(LineEffect effect);
350 double effectIntensity()
const;
351 void setEffectIntensity(
double intens);
355 QSharedDataPointer<Private> d;
359 void setStyle(
const Style &style);
374 void setFlags(
int flags);
377 QRectF geometry()
const;
378 void setGeometry(
const QRectF &geom);
381 QString title()
const;
382 void setTitle(
const QString &title);
383 QString summary()
const;
384 void setSummary(
const QString &summary);
385 QString text()
const;
386 void setText(
const QString &text);
390 QSharedDataPointer<Private> d;
397 RevScope revisionScope()
const;
399 RevType revisionType()
const;
404 std::vector<std::unique_ptr<Annotation>>
revisions()
const;
454 QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr;
469 friend class AnnotationPrivate;
484 enum InplaceAlignPosition
521 QFont textFont()
const;
522 void setTextFont(
const QFont &font);
525 void setTextColor(
const QColor &color);
527 InplaceAlignPosition inplaceAlign()
const;
528 void setInplaceAlign(InplaceAlignPosition align);
530 QPointF calloutPoint(
int id)
const;
531 QVector<QPointF> calloutPoints()
const;
532 void setCalloutPoints(
const QVector<QPointF> &points);
534 InplaceIntent inplaceIntent()
const;
535 void setInplaceIntent(InplaceIntent intent);
539 void setTextType(TextType type);
551 friend class AnnotationPrivate;
585 LineType lineType()
const;
587 QVector<QPointF> linePoints()
const;
588 void setLinePoints(
const QVector<QPointF> &points);
590 TermStyle lineStartStyle()
const;
591 void setLineStartStyle(TermStyle style);
593 TermStyle lineEndStyle()
const;
594 void setLineEndStyle(TermStyle style);
596 bool isLineClosed()
const;
597 void setLineClosed(
bool closed);
599 QColor lineInnerColor()
const;
600 void setLineInnerColor(
const QColor &color);
602 double lineLeadingForwardPoint()
const;
603 void setLineLeadingForwardPoint(
double point);
605 double lineLeadingBackPoint()
const;
606 void setLineLeadingBackPoint(
double point);
608 bool lineShowCaption()
const;
609 void setLineShowCaption(
bool show);
611 LineIntent lineIntent()
const;
612 void setLineIntent(LineIntent intent);
616 void setLineType(LineType type);
629 friend class AnnotationPrivate;
643 GeomType geomType()
const;
644 void setGeomType(GeomType type);
646 QColor geomInnerColor()
const;
647 void setGeomInnerColor(
const QColor &color);
662 friend class AnnotationPrivate;
728 friend class AnnotationPrivate;
788 friend class AnnotationPrivate;
805 void setText(
const QString &text);
806 void setLeftText(
const QString &text);
812 void setFontSize(
double fontSize);
818 void setLeftFontSize(
double fontSize);
824 void setFontColor(
const QColor &color);
830 void setBorderColor(
const QColor &color);
838 void setBorderWidth(
double width);
844 void setBackgroundColor(
const QColor &color);
846 QString imagePath()
const;
847 void setImagePath(
const QString &imagePath);
849 QString fieldPartialName()
const;
850 void setFieldPartialName(
const QString &fieldPartialName);
852 [[nodiscard]]
SigningResult sign(
const QString &outputFileName,
const PDFConverter::NewSignatureData &data);
867 friend class AnnotationPrivate;
874 QList<QVector<QPointF>> inkPaths()
const;
875 void setInkPaths(
const QList<QVector<QPointF>> &paths);
885 friend class AnnotationPrivate;
900 Link *linkDestination()
const;
901 void setLinkDestination(std::unique_ptr<Link> &&link);
903 HighlightMode linkHighlightMode()
const;
904 void setLinkHighlightMode(HighlightMode mode);
906 QPointF linkRegionPoint(
int id)
const;
907 void setLinkRegionPoint(
int id,
const QPointF point);
923 friend class AnnotationPrivate;
939 CaretSymbol caretSymbol()
const;
940 void setCaretSymbol(CaretSymbol symbol);
955 friend class AnnotationPrivate;
995 friend class AnnotationPrivate;
1035 friend class AnnotationPrivate;
1075 friend class AnnotationPrivate;
1127 friend class AnnotationPrivate;
1154 friend class AnnotationPrivate;
1171 friend class AnnotationPrivate;
1183 void setFlashVars(
const QString &flashVars);
1186 QScopedPointer<Private> d;
1198 friend class AnnotationPrivate;
1226 void setType(
Type type);
1230 QScopedPointer<Private> d;
1241 friend class AnnotationPrivate;
1274 void setType(
Type type);
1275 void setName(
const QString &name);
1276 void setInstances(
const QList<RichMediaAnnotation::Instance *> &instances);
1279 QScopedPointer<Private> d;
1291 friend class AnnotationPrivate;
1308 void setName(
const QString &name);
1312 QScopedPointer<Private> d;
1323 friend class AnnotationPrivate;
1337 QList<RichMediaAnnotation::Asset *>
assets()
const;
1340 void setConfigurations(
const QList<RichMediaAnnotation::Configuration *> &configurations);
1341 void setAssets(
const QList<RichMediaAnnotation::Asset *> &assets);
1344 QScopedPointer<Private> d;
1355 friend class AnnotationPrivate;
1380 QScopedPointer<Private> d;
1391 friend class AnnotationPrivate;
1416 QScopedPointer<Private> d;
1427 friend class AnnotationPrivate;
1448 QScopedPointer<Private> d;
AnnotationAppearance class wrapping Poppler's AP stream object.
Definition poppler-annotation.h:90
Container class for Annotation style information.
Definition poppler-annotation.h:322
Annotation class holding properties shared by all annotations.
Definition poppler-annotation.h:176
void setFlags(Flags flags)
Sets this annotation's flags.
std::unique_ptr< AnnotationAppearance > annotationAppearance() const
Returns the current appearance stream of this annotation.
SubType
Annotation subclasses.
Definition poppler-annotation.h:189
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.
std::vector< std::unique_ptr< Annotation > > revisions() const
Returns the revisions of this annotation.
Flag
Annotation flags.
Definition poppler-annotation.h:215
QString author() const
Returns the author of the annotation.
void setUniqueName(const QString &uniqueName)
Sets a new unique name for the annotation.
Flags flags() const
Returns this annotation's flags.
virtual ~Annotation()
Destructor.
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:437
@ MouseReleasedAction
Performed when the mouse button is released inside the annotation's active area.
Definition poppler-annotation.h:441
@ FocusInAction
Performed when the annotation receives the input focus.
Definition poppler-annotation.h:442
@ PageOpeningAction
Performed when the page containing the annotation is opened.
Definition poppler-annotation.h:444
@ MousePressedAction
Performed when the mouse button is pressed inside the annotation's active area.
Definition poppler-annotation.h:440
@ FocusOutAction
Performed when the annotation loses the input focus.
Definition poppler-annotation.h:443
@ PageClosingAction
Performed when the page containing the annotation is closed.
Definition poppler-annotation.h:445
@ CursorLeavingAction
Performed when the cursor exists the annotation's active area.
Definition poppler-annotation.h:439
@ PageVisibleAction
Performed when the page containing the annotation becomes visible.
Definition poppler-annotation.h:446
@ CursorEnteringAction
Performed when the cursor enters the annotation's active area.
Definition poppler-annotation.h:438
virtual SubType subType() const =0
The type of the annotation.
Caret annotation.
Definition poppler-annotation.h:922
SubType subType() const override
The type of the annotation.
CaretSymbol
The symbols for the caret annotation.
Definition poppler-annotation.h:934
Container class for an embedded file with a PDF document.
Definition poppler-qt6.h:339
File attachment annotation.
Definition poppler-annotation.h:954
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:628
SubType subType() const override
The type of the annotation.
Text highlight annotation.
Definition poppler-annotation.h:661
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:673
@ Squiggly
jagged or squiggly underline
Definition poppler-annotation.h:675
@ Underline
straight line underline
Definition poppler-annotation.h:676
@ Highlight
highlighter pen style annotation
Definition poppler-annotation.h:674
Ink Annotation.
Definition poppler-annotation.h:866
SubType subType() const override
The type of the annotation.
Polygon/polyline annotation.
Definition poppler-annotation.h:550
SubType subType() const override
The type of the annotation.
Definition poppler-annotation.h:884
SubType subType() const override
The type of the annotation.
Movie: a movie to be played.
Definition poppler-link.h:577
Rendition: Rendition link.
Definition poppler-link.h:475
Encapsulates data that describes a link.
Definition poppler-link.h:183
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-qt6.h:1875
A page in a document.
Definition poppler-qt6.h:425
The content object of a RichMediaAnnotation.
Definition poppler-annotation.h:1322
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:1074
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.
std::unique_ptr< Link > additionalAction(AdditionalActionType type) const
Returns the additional action of the given type for 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.
Signature annotation.
Definition poppler-annotation.h:787
double fontSize() const
Default: 10.
QColor borderColor() const
Default: red.
double borderWidth() const
border width in points
double leftFontSize() const
Default: 20.
QColor fontColor() const
Default: red.
QColor backgroundColor() const
Default: QColor(240, 240, 240)
SubType subType() const override
The type of the annotation.
SigningResult
Definition poppler-annotation.h:795
@ FieldAlreadySigned
Trying to sign a field that is already signed.
Definition poppler-annotation.h:797
Sound annotation.
Definition poppler-annotation.h:994
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-qt6.h:1799
Stamp annotation.
Definition poppler-annotation.h:727
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:468
QString textIcon() const
The name of the icon for this text annotation.
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.
The Poppler Qt6 binding.
Definition poppler-annotation.h:50
Structure corresponding to a QuadPoints array.
Definition poppler-annotation.h:686