34#ifndef _POPPLER_ANNOTATION_H_
35#define _POPPLER_ANNOTATION_H_
37#include <QtCore/QDateTime>
38#include <QtCore/QSharedDataPointer>
39#include <QtCore/QList>
40#include <QtCore/QPointF>
41#include <QtCore/QRectF>
42#include <QtCore/QScopedPointer>
43#include <QtCore/QVector>
44#include <QtGui/QColor>
46#include "poppler-export.h"
47#include "poppler-converter.h"
54class AnnotationPrivate;
55class AnnotationAppearancePrivate;
56class TextAnnotationPrivate;
57class LineAnnotationPrivate;
58class GeomAnnotationPrivate;
59class HighlightAnnotationPrivate;
60class StampAnnotationPrivate;
61class SignatureAnnotationPrivate;
62class InkAnnotationPrivate;
63class LinkAnnotationPrivate;
64class CaretAnnotationPrivate;
65class FileAttachmentAnnotationPrivate;
66class SoundAnnotationPrivate;
67class MovieAnnotationPrivate;
68class ScreenAnnotationPrivate;
69class WidgetAnnotationPrivate;
70class RichMediaAnnotationPrivate;
99 AnnotationAppearancePrivate *d;
223 ToggleHidingOnMouse = 64,
226 Q_DECLARE_FLAGS(Flags, Flag)
268 QString contents()
const;
269 void setContents(
const QString &contents);
282 QDateTime modificationDate()
const;
283 void setModificationDate(
const QDateTime &date);
285 QDateTime creationDate()
const;
286 void setCreationDate(
const QDateTime &date);
331 QColor color()
const;
332 void setColor(
const QColor &color);
333 double opacity()
const;
334 void setOpacity(
double opacity);
337 double width()
const;
338 void setWidth(
double width);
339 LineStyle lineStyle()
const;
340 void setLineStyle(LineStyle style);
341 double xCorners()
const;
342 void setXCorners(
double radius);
343 double yCorners()
const;
344 void setYCorners(
double radius);
345 const QVector<double> &dashArray()
const;
346 void setDashArray(
const QVector<double> &array);
349 LineEffect lineEffect()
const;
350 void setLineEffect(LineEffect effect);
351 double effectIntensity()
const;
352 void setEffectIntensity(
double intens);
356 QSharedDataPointer<Private> d;
360 void setStyle(
const Style &style);
375 void setFlags(
int flags);
378 QRectF geometry()
const;
379 void setGeometry(
const QRectF &geom);
382 QString title()
const;
383 void setTitle(
const QString &title);
384 QString summary()
const;
385 void setSummary(
const QString &summary);
386 QString text()
const;
387 void setText(
const QString &text);
391 QSharedDataPointer<Private> d;
398 RevScope revisionScope()
const;
400 RevType revisionType()
const;
405 std::vector<std::unique_ptr<Annotation>>
revisions()
const;
455 QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr;
470 friend class AnnotationPrivate;
485 enum InplaceAlignPosition
522 QFont textFont()
const;
523 void setTextFont(
const QFont &font);
526 void setTextColor(
const QColor &color);
528 InplaceAlignPosition inplaceAlign()
const;
529 void setInplaceAlign(InplaceAlignPosition align);
531 QPointF calloutPoint(
int id)
const;
532 QVector<QPointF> calloutPoints()
const;
533 void setCalloutPoints(
const QVector<QPointF> &points);
535 InplaceIntent inplaceIntent()
const;
536 void setInplaceIntent(InplaceIntent intent);
540 void setTextType(TextType type);
552 friend class AnnotationPrivate;
586 LineType lineType()
const;
588 QVector<QPointF> linePoints()
const;
589 void setLinePoints(
const QVector<QPointF> &points);
591 TermStyle lineStartStyle()
const;
592 void setLineStartStyle(TermStyle style);
594 TermStyle lineEndStyle()
const;
595 void setLineEndStyle(TermStyle style);
597 bool isLineClosed()
const;
598 void setLineClosed(
bool closed);
600 QColor lineInnerColor()
const;
601 void setLineInnerColor(
const QColor &color);
603 double lineLeadingForwardPoint()
const;
604 void setLineLeadingForwardPoint(
double point);
606 double lineLeadingBackPoint()
const;
607 void setLineLeadingBackPoint(
double point);
609 bool lineShowCaption()
const;
610 void setLineShowCaption(
bool show);
612 LineIntent lineIntent()
const;
613 void setLineIntent(LineIntent intent);
617 void setLineType(LineType type);
630 friend class AnnotationPrivate;
644 GeomType geomType()
const;
645 void setGeomType(GeomType type);
647 QColor geomInnerColor()
const;
648 void setGeomInnerColor(
const QColor &color);
663 friend class AnnotationPrivate;
729 friend class AnnotationPrivate;
789 friend class AnnotationPrivate;
811 void setText(
const QString &text);
812 void setLeftText(
const QString &text);
818 void setFontSize(
double fontSize);
824 void setLeftFontSize(
double fontSize);
830 void setFontColor(
const QColor &color);
836 void setBorderColor(
const QColor &color);
844 void setBorderWidth(
double width);
850 void setBackgroundColor(
const QColor &color);
852 QString imagePath()
const;
853 void setImagePath(
const QString &imagePath);
855 QString fieldPartialName()
const;
856 void setFieldPartialName(
const QString &fieldPartialName);
858 [[nodiscard]]
SigningResult sign(
const QString &outputFileName,
const PDFConverter::NewSignatureData &data);
873 friend class AnnotationPrivate;
880 QList<QVector<QPointF>> inkPaths()
const;
881 void setInkPaths(
const QList<QVector<QPointF>> &paths);
891 friend class AnnotationPrivate;
906 Link *linkDestination()
const;
907 void setLinkDestination(std::unique_ptr<Link> &&link);
909 HighlightMode linkHighlightMode()
const;
910 void setLinkHighlightMode(HighlightMode mode);
912 QPointF linkRegionPoint(
int id)
const;
913 void setLinkRegionPoint(
int id,
const QPointF point);
929 friend class AnnotationPrivate;
945 CaretSymbol caretSymbol()
const;
946 void setCaretSymbol(CaretSymbol symbol);
961 friend class AnnotationPrivate;
1001 friend class AnnotationPrivate;
1041 friend class AnnotationPrivate;
1081 friend class AnnotationPrivate;
1133 friend class AnnotationPrivate;
1160 friend class AnnotationPrivate;
1177 friend class AnnotationPrivate;
1189 void setFlashVars(
const QString &flashVars);
1192 QScopedPointer<Private> d;
1204 friend class AnnotationPrivate;
1232 void setType(
Type type);
1236 QScopedPointer<Private> d;
1247 friend class AnnotationPrivate;
1280 void setType(
Type type);
1281 void setName(
const QString &name);
1282 void setInstances(
const QList<RichMediaAnnotation::Instance *> &instances);
1285 QScopedPointer<Private> d;
1297 friend class AnnotationPrivate;
1314 void setName(
const QString &name);
1318 QScopedPointer<Private> d;
1329 friend class AnnotationPrivate;
1343 QList<RichMediaAnnotation::Asset *>
assets()
const;
1346 void setConfigurations(
const QList<RichMediaAnnotation::Configuration *> &configurations);
1347 void setAssets(
const QList<RichMediaAnnotation::Asset *> &assets);
1350 QScopedPointer<Private> d;
1361 friend class AnnotationPrivate;
1386 QScopedPointer<Private> d;
1397 friend class AnnotationPrivate;
1422 QScopedPointer<Private> d;
1433 friend class AnnotationPrivate;
1454 QScopedPointer<Private> d;
AnnotationAppearance class wrapping Poppler's AP stream object.
Definition poppler-annotation.h:91
Container class for Annotation style information.
Definition poppler-annotation.h:323
Annotation class holding properties shared by all annotations.
Definition poppler-annotation.h:177
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:190
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:216
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:438
@ MouseReleasedAction
Performed when the mouse button is released inside the annotation's active area.
Definition poppler-annotation.h:442
@ FocusInAction
Performed when the annotation receives the input focus.
Definition poppler-annotation.h:443
@ PageOpeningAction
Performed when the page containing the annotation is opened.
Definition poppler-annotation.h:445
@ MousePressedAction
Performed when the mouse button is pressed inside the annotation's active area.
Definition poppler-annotation.h:441
@ FocusOutAction
Performed when the annotation loses the input focus.
Definition poppler-annotation.h:444
@ PageClosingAction
Performed when the page containing the annotation is closed.
Definition poppler-annotation.h:446
@ CursorLeavingAction
Performed when the cursor exists the annotation's active area.
Definition poppler-annotation.h:440
@ PageVisibleAction
Performed when the page containing the annotation becomes visible.
Definition poppler-annotation.h:447
@ CursorEnteringAction
Performed when the cursor enters the annotation's active area.
Definition poppler-annotation.h:439
virtual SubType subType() const =0
The type of the annotation.
Caret annotation.
Definition poppler-annotation.h:928
SubType subType() const override
The type of the annotation.
CaretSymbol
The symbols for the caret annotation.
Definition poppler-annotation.h:940
Container class for an embedded file with a PDF document.
Definition poppler-qt6.h:339
File attachment annotation.
Definition poppler-annotation.h:960
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:629
SubType subType() const override
The type of the annotation.
Text highlight annotation.
Definition poppler-annotation.h:662
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:674
@ Squiggly
jagged or squiggly underline
Definition poppler-annotation.h:676
@ Underline
straight line underline
Definition poppler-annotation.h:677
@ Highlight
highlighter pen style annotation
Definition poppler-annotation.h:675
Ink Annotation.
Definition poppler-annotation.h:872
SubType subType() const override
The type of the annotation.
Polygon/polyline annotation.
Definition poppler-annotation.h:551
SubType subType() const override
The type of the annotation.
Definition poppler-annotation.h:890
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:1040
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:1328
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:1080
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:788
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:796
@ SigningSuccess
No error.
Definition poppler-annotation.h:797
@ WriteFailed
Write failed (permissions, faulty disk, ...)
Definition poppler-annotation.h:802
@ InternalError
Unexpected error, likely a bug in poppler.
Definition poppler-annotation.h:800
@ FieldAlreadySigned
Trying to sign a field that is already signed.
Definition poppler-annotation.h:798
@ BadPassphrase
User entered bad passphrase.
Definition poppler-annotation.h:804
@ KeyMissing
Key not found (Either the input key is not from the list or the available keys has changed underneath...
Definition poppler-annotation.h:801
@ GenericSigningError
Unclassified error.
Definition poppler-annotation.h:799
@ UserCancelled
User cancelled the process.
Definition poppler-annotation.h:803
Sound annotation.
Definition poppler-annotation.h:1000
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:728
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:469
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:51
Structure corresponding to a QuadPoints array.
Definition poppler-annotation.h:687