Poppler Qt6 24.07.0
poppler-annotation.h
1/* poppler-annotation.h: qt interface to poppler
2 * Copyright (C) 2006-2008, 2012, 2013, 2018-2022 Albert Astals Cid <aacid@kde.org>
3 * Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org>
4 * Copyright (C) 2007, Brad Hards <bradh@frogmouth.net>
5 * Copyright (C) 2010, Philip Lorenz <lorenzph+freedesktop@gmail.com>
6 * Copyright (C) 2012, 2015, Tobias Koenig <tobias.koenig@kdab.com>
7 * Copyright (C) 2012, Guillermo A. Amaral B. <gamaral@kde.org>
8 * Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it>
9 * Copyright (C) 2013, Anthony Granger <grangeranthony@gmail.com>
10 * Copyright (C) 2018, Dileep Sankhla <sankhla.dileep96@gmail.com>
11 * Copyright (C) 2020, Katarina Behrens <Katarina.Behrens@cib.de>
12 * Copyright (C) 2020, Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by Technische Universität Dresden
13 * Copyright (C) 2021, Oliver Sander <oliver.sander@tu-dresden.de>
14 * Copyright (C) 2021, Mahmoud Ahmed Khalil <mahmoudkhalil11@gmail.com>
15 * Adapting code from
16 * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
17 *
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2, or (at your option)
21 * any later version.
22 *
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
31 */
32
33#ifndef _POPPLER_ANNOTATION_H_
34#define _POPPLER_ANNOTATION_H_
35
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>
44#include <QtGui/QFont>
45#include "poppler-export.h"
46
47#include <memory>
48
49namespace Poppler {
50
51class Annotation;
52class AnnotationPrivate;
53class AnnotationAppearancePrivate;
54class TextAnnotationPrivate;
55class LineAnnotationPrivate;
56class GeomAnnotationPrivate;
57class HighlightAnnotationPrivate;
58class StampAnnotationPrivate;
59class InkAnnotationPrivate;
60class LinkAnnotationPrivate;
61class CaretAnnotationPrivate;
62class FileAttachmentAnnotationPrivate;
63class SoundAnnotationPrivate;
64class MovieAnnotationPrivate;
65class ScreenAnnotationPrivate;
66class WidgetAnnotationPrivate;
67class RichMediaAnnotationPrivate;
68class EmbeddedFile;
69class Link;
70class SoundObject;
71class MovieObject;
72class LinkRendition;
73class Page;
74
87class POPPLER_QT6_EXPORT AnnotationAppearance
88{
89 friend class Annotation;
90
91public:
92 explicit AnnotationAppearance(AnnotationAppearancePrivate *annotationAppearancePrivate);
94
95private:
96 AnnotationAppearancePrivate *d;
97 Q_DISABLE_COPY(AnnotationAppearance)
98};
99
173class POPPLER_QT6_EXPORT Annotation
174{
175 friend class LinkMovie;
176 friend class LinkRendition;
177
178public:
179 // enum definitions
185 // WARNING!!! oKular uses that very same values so if you change them notify the author!
187 {
188 AText = 1,
189 ALine = 2,
190 AGeom = 3,
191 AHighlight = 4,
192 AStamp = 5,
193 AInk = 6,
194 ALink = 7,
195 ACaret = 8,
196 AFileAttachment = 9,
197 ASound = 10,
198 AMovie = 11,
199 AScreen = 12,
200 AWidget = 13,
201 ARichMedia = 14
202 };
203
211 // NOTE: Only flags that are known to work are documented
212 enum Flag
213 {
214 Hidden = 1,
215 FixedSize = 2,
216 FixedRotation = 4,
217 DenyPrint = 8,
218 DenyWrite = 16,
219 DenyDelete = 32,
220 ToggleHidingOnMouse = 64,
221 External = 128
222 };
223 Q_DECLARE_FLAGS(Flags, Flag)
224
225 enum LineStyle
226 {
227 Solid = 1,
228 Dashed = 2,
229 Beveled = 4,
230 Inset = 8,
231 Underline = 16
232 };
233 enum LineEffect
234 {
235 NoEffect = 1,
236 Cloudy = 2
237 };
238 enum RevScope
239 {
240 Root = 0,
241 Reply = 1,
242 Group = 2,
243 Delete = 4
244 };
245 enum RevType
246 {
247 None = 1,
248 Marked = 2,
249 Unmarked = 4,
250 Accepted = 8,
251 Rejected = 16,
252 Cancelled = 32,
253 Completed = 64
254 };
255
259 QString author() const;
263 void setAuthor(const QString &author);
264
265 QString contents() const;
266 void setContents(const QString &contents);
267
271 QString uniqueName() const;
277 void setUniqueName(const QString &uniqueName);
278
279 QDateTime modificationDate() const;
280 void setModificationDate(const QDateTime &date);
281
282 QDateTime creationDate() const;
283 void setCreationDate(const QDateTime &date);
284
290 Flags flags() const;
296 void setFlags(Flags flags);
297
303 QRectF boundary() const;
314 void setBoundary(const QRectF &boundary);
315
319 class POPPLER_QT6_EXPORT Style
320 {
321 public:
322 Style();
323 Style(const Style &other);
324 Style &operator=(const Style &other);
325 ~Style();
326
327 // appearance properties
328 QColor color() const; // black
329 void setColor(const QColor &color);
330 double opacity() const; // 1.0
331 void setOpacity(double opacity);
332
333 // pen properties
334 double width() const; // 1.0
335 void setWidth(double width);
336 LineStyle lineStyle() const; // LineStyle::Solid
337 void setLineStyle(LineStyle style);
338 double xCorners() const; // 0.0
339 void setXCorners(double radius);
340 double yCorners() const; // 0.0
341 void setYCorners(double radius);
342 const QVector<double> &dashArray() const; // [ 3 ]
343 void setDashArray(const QVector<double> &array);
344
345 // pen effects
346 LineEffect lineEffect() const; // LineEffect::NoEffect
347 void setLineEffect(LineEffect effect);
348 double effectIntensity() const; // 1.0
349 void setEffectIntensity(double intens);
350
351 private:
352 class Private;
353 QSharedDataPointer<Private> d;
354 };
355
356 Style style() const;
357 void setStyle(const Style &style);
358
362 class POPPLER_QT6_EXPORT Popup
363 {
364 public:
365 Popup();
366 Popup(const Popup &other);
367 Popup &operator=(const Popup &other);
368 ~Popup();
369
370 // window state (Hidden, FixedRotation, Deny* flags allowed)
371 int flags() const; // -1 (never initialized) -> 0 (if inited and shown)
372 void setFlags(int flags);
373
374 // geometric properties
375 QRectF geometry() const; // no default
376 void setGeometry(const QRectF &geom);
377
378 // window contents/override properties
379 QString title() const; // '' text in the titlebar (overrides author)
380 void setTitle(const QString &title);
381 QString summary() const; // '' short description (displayed if not empty)
382 void setSummary(const QString &summary);
383 QString text() const; // '' text for the window (overrides annot->contents)
384 void setText(const QString &text);
385
386 private:
387 class Private;
388 QSharedDataPointer<Private> d;
389 };
390
391 Popup popup() const;
393 void setPopup(const Popup &popup);
394
395 RevScope revisionScope() const; // Root
396
397 RevType revisionType() const; // None
398
402 std::vector<std::unique_ptr<Annotation>> revisions() const;
403
407 virtual SubType subType() const = 0;
408
414 std::unique_ptr<AnnotationAppearance> annotationAppearance() const;
415
421 void setAnnotationAppearance(const AnnotationAppearance &annotationAppearance);
422
426 virtual ~Annotation();
427
447
448protected:
450 explicit Annotation(AnnotationPrivate &dd);
451 Q_DECLARE_PRIVATE(Annotation)
452 QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr;
454
455private:
456 Q_DISABLE_COPY(Annotation)
457};
458
465class POPPLER_QT6_EXPORT TextAnnotation : public Annotation
466{
467 friend class AnnotationPrivate;
468
469public:
470 // local enums
471 enum TextType
472 {
473 Linked,
474 InPlace
475 };
476 enum InplaceIntent
477 {
478 Unknown,
479 Callout,
480 TypeWriter
481 };
482 enum InplaceAlignPosition
483 {
484 InplaceAlignLeft,
485 InplaceAlignCenter,
486 InplaceAlignRight
487 };
488
489 explicit TextAnnotation(TextType type);
490 ~TextAnnotation() override;
491 SubType subType() const override;
492
496 TextType textType() const;
497
510 QString textIcon() const;
511
517 void setTextIcon(const QString &icon);
518
519 QFont textFont() const;
520 void setTextFont(const QFont &font);
522 QColor textColor() const;
523 void setTextColor(const QColor &color);
524
525 InplaceAlignPosition inplaceAlign() const;
526 void setInplaceAlign(InplaceAlignPosition align);
527
528 QPointF calloutPoint(int id) const;
529 QVector<QPointF> calloutPoints() const;
530 void setCalloutPoints(const QVector<QPointF> &points);
531
532 InplaceIntent inplaceIntent() const;
533 void setInplaceIntent(InplaceIntent intent);
534
535private:
536 explicit TextAnnotation(TextAnnotationPrivate &dd);
537 void setTextType(TextType type);
538 Q_DECLARE_PRIVATE(TextAnnotation)
539 Q_DISABLE_COPY(TextAnnotation)
540};
541
547class POPPLER_QT6_EXPORT LineAnnotation : public Annotation
548{
549 friend class AnnotationPrivate;
550
551public:
552 // local enums
553 enum LineType
554 {
555 StraightLine,
556 Polyline
557 };
558 enum TermStyle
559 {
560 Square,
561 Circle,
562 Diamond,
563 OpenArrow,
564 ClosedArrow,
565 None,
566 Butt,
567 ROpenArrow,
568 RClosedArrow,
569 Slash
570 };
571 enum LineIntent
572 {
573 Unknown,
574 Arrow,
575 Dimension,
576 PolygonCloud
577 };
578
579 explicit LineAnnotation(LineType type);
580 ~LineAnnotation() override;
581 SubType subType() const override;
582
583 LineType lineType() const;
584
585 QVector<QPointF> linePoints() const;
586 void setLinePoints(const QVector<QPointF> &points);
587
588 TermStyle lineStartStyle() const;
589 void setLineStartStyle(TermStyle style);
590
591 TermStyle lineEndStyle() const;
592 void setLineEndStyle(TermStyle style);
593
594 bool isLineClosed() const;
595 void setLineClosed(bool closed);
596
597 QColor lineInnerColor() const;
598 void setLineInnerColor(const QColor &color);
599
600 double lineLeadingForwardPoint() const;
601 void setLineLeadingForwardPoint(double point);
602
603 double lineLeadingBackPoint() const;
604 void setLineLeadingBackPoint(double point);
605
606 bool lineShowCaption() const;
607 void setLineShowCaption(bool show);
608
609 LineIntent lineIntent() const;
610 void setLineIntent(LineIntent intent);
611
612private:
613 explicit LineAnnotation(LineAnnotationPrivate &dd);
614 void setLineType(LineType type);
615 Q_DECLARE_PRIVATE(LineAnnotation)
616 Q_DISABLE_COPY(LineAnnotation)
617};
618
625class POPPLER_QT6_EXPORT GeomAnnotation : public Annotation
626{
627 friend class AnnotationPrivate;
628
629public:
631 ~GeomAnnotation() override;
632 SubType subType() const override;
633
634 // common enums
635 enum GeomType
636 {
637 InscribedSquare,
638 InscribedCircle
639 };
640
641 GeomType geomType() const;
642 void setGeomType(GeomType type);
643
644 QColor geomInnerColor() const;
645 void setGeomInnerColor(const QColor &color);
646
647private:
648 explicit GeomAnnotation(GeomAnnotationPrivate &dd);
649 Q_DECLARE_PRIVATE(GeomAnnotation)
650 Q_DISABLE_COPY(GeomAnnotation)
651};
652
658class POPPLER_QT6_EXPORT HighlightAnnotation : public Annotation
659{
660 friend class AnnotationPrivate;
661
662public:
664 ~HighlightAnnotation() override;
665 SubType subType() const override;
666
677
683 struct Quad
684 {
685 QPointF points[4]; // 8 valid coords
686 bool capStart; // false (vtx 1-4) [K]
687 bool capEnd; // false (vtx 2-3) [K]
688 double feather; // 0.1 (in range 0..1) [K]
689 };
690
696
702
706 QList<Quad> highlightQuads() const;
707
711 void setHighlightQuads(const QList<Quad> &quads);
712
713private:
714 explicit HighlightAnnotation(HighlightAnnotationPrivate &dd);
715 Q_DECLARE_PRIVATE(HighlightAnnotation)
716 Q_DISABLE_COPY(HighlightAnnotation)
717};
718
724class POPPLER_QT6_EXPORT StampAnnotation : public Annotation
725{
726 friend class AnnotationPrivate;
727
728public:
730 ~StampAnnotation() override;
731 SubType subType() const override;
732
752 QString stampIconName() const;
753
759 void setStampIconName(const QString &name);
760
766 void setStampCustomImage(const QImage &image);
767
768private:
769 explicit StampAnnotation(StampAnnotationPrivate &dd);
770 Q_DECLARE_PRIVATE(StampAnnotation)
771 Q_DISABLE_COPY(StampAnnotation)
772};
773
779class POPPLER_QT6_EXPORT InkAnnotation : public Annotation
780{
781 friend class AnnotationPrivate;
782
783public:
785 ~InkAnnotation() override;
786 SubType subType() const override;
787
788 QList<QVector<QPointF>> inkPaths() const;
789 void setInkPaths(const QList<QVector<QPointF>> &paths);
790
791private:
792 explicit InkAnnotation(InkAnnotationPrivate &dd);
793 Q_DECLARE_PRIVATE(InkAnnotation)
794 Q_DISABLE_COPY(InkAnnotation)
795};
796
797class POPPLER_QT6_EXPORT LinkAnnotation : public Annotation
798{
799 friend class AnnotationPrivate;
800
801public:
802 ~LinkAnnotation() override;
803 SubType subType() const override;
804
805 // local enums
806 enum HighlightMode
807 {
808 None,
809 Invert,
810 Outline,
811 Push
812 };
813
814 Link *linkDestination() const;
815 void setLinkDestination(std::unique_ptr<Link> &&link);
816
817 HighlightMode linkHighlightMode() const;
818 void setLinkHighlightMode(HighlightMode mode);
819
820 QPointF linkRegionPoint(int id) const;
821 void setLinkRegionPoint(int id, const QPointF point);
822
823private:
825 explicit LinkAnnotation(LinkAnnotationPrivate &dd);
826 Q_DECLARE_PRIVATE(LinkAnnotation)
827 Q_DISABLE_COPY(LinkAnnotation)
828};
829
835class POPPLER_QT6_EXPORT CaretAnnotation : public Annotation
836{
837 friend class AnnotationPrivate;
838
839public:
841 ~CaretAnnotation() override;
842 SubType subType() const override;
843
848 {
849 None,
850 P
851 };
852
853 CaretSymbol caretSymbol() const;
854 void setCaretSymbol(CaretSymbol symbol);
855
856private:
857 explicit CaretAnnotation(CaretAnnotationPrivate &dd);
858 Q_DECLARE_PRIVATE(CaretAnnotation)
859 Q_DISABLE_COPY(CaretAnnotation)
860};
861
867class POPPLER_QT6_EXPORT FileAttachmentAnnotation : public Annotation
868{
869 friend class AnnotationPrivate;
870
871public:
872 ~FileAttachmentAnnotation() override;
873 SubType subType() const override;
874
878 QString fileIconName() const;
882 void setFileIconName(const QString &icon);
883
894
895private:
897 explicit FileAttachmentAnnotation(FileAttachmentAnnotationPrivate &dd);
898 Q_DECLARE_PRIVATE(FileAttachmentAnnotation)
899 Q_DISABLE_COPY(FileAttachmentAnnotation)
900};
901
907class POPPLER_QT6_EXPORT SoundAnnotation : public Annotation
908{
909 friend class AnnotationPrivate;
910
911public:
912 ~SoundAnnotation() override;
913 SubType subType() const override;
914
918 QString soundIconName() const;
922 void setSoundIconName(const QString &icon);
923
934
935private:
937 explicit SoundAnnotation(SoundAnnotationPrivate &dd);
938 Q_DECLARE_PRIVATE(SoundAnnotation)
939 Q_DISABLE_COPY(SoundAnnotation)
940};
941
947class POPPLER_QT6_EXPORT MovieAnnotation : public Annotation
948{
949 friend class AnnotationPrivate;
950
951public:
952 ~MovieAnnotation() override;
953 SubType subType() const override;
954
964 void setMovie(MovieObject *movie);
965
969 QString movieTitle() const;
973 void setMovieTitle(const QString &title);
974
975private:
977 explicit MovieAnnotation(MovieAnnotationPrivate &dd);
978 Q_DECLARE_PRIVATE(MovieAnnotation)
979 Q_DISABLE_COPY(MovieAnnotation)
980};
981
987class POPPLER_QT6_EXPORT ScreenAnnotation : public Annotation
988{
989 friend class AnnotationPrivate;
990
991public:
992 ~ScreenAnnotation() override;
993
994 SubType subType() const override;
995
1000
1007
1011 QString screenTitle() const;
1012
1016 void setScreenTitle(const QString &title);
1017
1022 std::unique_ptr<Link> additionalAction(AdditionalActionType type) const;
1023
1024private:
1026 explicit ScreenAnnotation(ScreenAnnotationPrivate &dd);
1027 Q_DECLARE_PRIVATE(ScreenAnnotation)
1028 Q_DISABLE_COPY(ScreenAnnotation)
1029};
1030
1039class POPPLER_QT6_EXPORT WidgetAnnotation : public Annotation
1040{
1041 friend class AnnotationPrivate;
1042
1043public:
1044 ~WidgetAnnotation() override;
1045
1046 SubType subType() const override;
1047
1052 std::unique_ptr<Link> additionalAction(AdditionalActionType type) const;
1053
1054private:
1056 explicit WidgetAnnotation(WidgetAnnotationPrivate &dd);
1057 Q_DECLARE_PRIVATE(WidgetAnnotation)
1058 Q_DISABLE_COPY(WidgetAnnotation)
1059};
1060
1066class POPPLER_QT6_EXPORT RichMediaAnnotation : public Annotation
1067{
1068 friend class AnnotationPrivate;
1069
1070public:
1071 ~RichMediaAnnotation() override;
1072
1073 SubType subType() const override;
1074
1083 class POPPLER_QT6_EXPORT Params
1084 {
1085 friend class AnnotationPrivate;
1086
1087 public:
1088 Params();
1089 ~Params();
1090
1094 QString flashVars() const;
1095
1096 private:
1097 void setFlashVars(const QString &flashVars);
1098
1099 class Private;
1100 QScopedPointer<Private> d;
1101 };
1102
1110 class POPPLER_QT6_EXPORT Instance
1111 {
1112 friend class AnnotationPrivate;
1113
1114 public:
1118 enum Type
1119 {
1123 TypeVideo
1125
1126 Instance();
1127 ~Instance();
1128
1132 Type type() const;
1133
1138
1139 private:
1140 void setType(Type type);
1141 void setParams(RichMediaAnnotation::Params *params);
1142
1143 class Private;
1144 QScopedPointer<Private> d;
1145 };
1146
1153 class POPPLER_QT6_EXPORT Configuration
1154 {
1155 friend class AnnotationPrivate;
1156
1157 public:
1161 enum Type
1162 {
1166 TypeVideo
1168
1169 Configuration();
1171
1175 Type type() const;
1176
1180 QString name() const;
1181
1185 QList<RichMediaAnnotation::Instance *> instances() const;
1186
1187 private:
1188 void setType(Type type);
1189 void setName(const QString &name);
1190 void setInstances(const QList<RichMediaAnnotation::Instance *> &instances);
1191
1192 class Private;
1193 QScopedPointer<Private> d;
1194 };
1195
1203 class POPPLER_QT6_EXPORT Asset
1204 {
1205 friend class AnnotationPrivate;
1206
1207 public:
1208 Asset();
1209 ~Asset();
1210
1214 QString name() const;
1215
1220
1221 private:
1222 void setName(const QString &name);
1223 void setEmbeddedFile(EmbeddedFile *embeddedFile);
1224
1225 class Private;
1226 QScopedPointer<Private> d;
1227 };
1228
1235 class POPPLER_QT6_EXPORT Content
1236 {
1237 friend class AnnotationPrivate;
1238
1239 public:
1240 Content();
1241 ~Content();
1242
1246 QList<RichMediaAnnotation::Configuration *> configurations() const;
1247
1251 QList<RichMediaAnnotation::Asset *> assets() const;
1252
1253 private:
1254 void setConfigurations(const QList<RichMediaAnnotation::Configuration *> &configurations);
1255 void setAssets(const QList<RichMediaAnnotation::Asset *> &assets);
1256
1257 class Private;
1258 QScopedPointer<Private> d;
1259 };
1260
1267 class POPPLER_QT6_EXPORT Activation
1268 {
1269 friend class AnnotationPrivate;
1270
1271 public:
1276 {
1279 UserAction
1281
1282 Activation();
1283 ~Activation();
1284
1289
1290 private:
1291 void setCondition(Condition condition);
1292
1293 class Private;
1294 QScopedPointer<Private> d;
1295 };
1296
1303 class POPPLER_QT6_EXPORT Deactivation
1304 {
1305 friend class AnnotationPrivate;
1306
1307 public:
1312 {
1315 UserAction
1317
1318 Deactivation();
1319 ~Deactivation();
1320
1325
1326 private:
1327 void setCondition(Condition condition);
1328
1329 class Private;
1330 QScopedPointer<Private> d;
1331 };
1332
1339 class POPPLER_QT6_EXPORT Settings
1340 {
1341 friend class AnnotationPrivate;
1342
1343 public:
1344 Settings();
1345 ~Settings();
1346
1351
1356
1357 private:
1358 void setActivation(RichMediaAnnotation::Activation *activation);
1359 void setDeactivation(RichMediaAnnotation::Deactivation *deactivation);
1360
1361 class Private;
1362 QScopedPointer<Private> d;
1363 };
1364
1369
1374
1375private:
1376 void setSettings(RichMediaAnnotation::Settings *settings);
1377 void setContent(RichMediaAnnotation::Content *content);
1378
1380 explicit RichMediaAnnotation(RichMediaAnnotationPrivate &dd);
1381 Q_DECLARE_PRIVATE(RichMediaAnnotation)
1382 Q_DISABLE_COPY(RichMediaAnnotation)
1383};
1384
1385}
1386
1387#endif
AnnotationAppearance class wrapping Poppler's AP stream object.
Definition poppler-annotation.h:88
Container class for Annotation pop-up window information.
Definition poppler-annotation.h:363
Container class for Annotation style information.
Definition poppler-annotation.h:320
Annotation class holding properties shared by all annotations.
Definition poppler-annotation.h:174
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:187
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:213
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:435
@ MouseReleasedAction
Performed when the mouse button is released inside the annotation's active area.
Definition poppler-annotation.h:439
@ FocusInAction
Performed when the annotation receives the input focus.
Definition poppler-annotation.h:440
@ PageOpeningAction
Performed when the page containing the annotation is opened.
Definition poppler-annotation.h:442
@ MousePressedAction
Performed when the mouse button is pressed inside the annotation's active area.
Definition poppler-annotation.h:438
@ FocusOutAction
Performed when the annotation loses the input focus.
Definition poppler-annotation.h:441
@ PageClosingAction
Performed when the page containing the annotation is closed.
Definition poppler-annotation.h:443
@ CursorLeavingAction
Performed when the cursor exists the annotation's active area.
Definition poppler-annotation.h:437
@ PageVisibleAction
Performed when the page containing the annotation becomes visible.
Definition poppler-annotation.h:444
@ CursorEnteringAction
Performed when the cursor enters the annotation's active area.
Definition poppler-annotation.h:436
virtual SubType subType() const =0
The type of the annotation.
Caret annotation.
Definition poppler-annotation.h:836
SubType subType() const override
The type of the annotation.
CaretSymbol
The symbols for the caret annotation.
Definition poppler-annotation.h:848
Container class for an embedded file with a PDF document.
Definition poppler-qt6.h:338
File attachment annotation.
Definition poppler-annotation.h:868
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:626
SubType subType() const override
The type of the annotation.
Text highlight annotation.
Definition poppler-annotation.h:659
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:671
@ Squiggly
jagged or squiggly underline
Definition poppler-annotation.h:673
@ Underline
straight line underline
Definition poppler-annotation.h:674
@ Highlight
highlighter pen style annotation
Definition poppler-annotation.h:672
Ink Annotation.
Definition poppler-annotation.h:780
SubType subType() const override
The type of the annotation.
Polygon/polyline annotation.
Definition poppler-annotation.h:548
SubType subType() const override
The type of the annotation.
Definition poppler-annotation.h:798
SubType subType() const override
The type of the annotation.
Movie: a movie to be played.
Definition poppler-link.h:575
Rendition: Rendition link.
Definition poppler-link.h:473
Movie annotation.
Definition poppler-annotation.h:948
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:2272
A page in a document.
Definition poppler-qt6.h:424
The activation object of the RichMediaAnnotation::Settings object.
Definition poppler-annotation.h:1268
Condition
Describes the condition for activating the rich media.
Definition poppler-annotation.h:1276
@ PageVisible
Activate when page becomes visible.
Definition poppler-annotation.h:1278
@ PageOpened
Activate when page is opened.
Definition poppler-annotation.h:1277
Condition condition() const
Returns the activation condition.
The asset object of a RichMediaAnnotation::Content object.
Definition poppler-annotation.h:1204
EmbeddedFile * embeddedFile() const
Returns the embedded file the asset points to.
QString name() const
Returns the identifier name of the asset.
The configuration object of a RichMediaAnnotation::Content object.
Definition poppler-annotation.h:1154
Type
Describes the media type of the configuration.
Definition poppler-annotation.h:1162
@ Type3D
A 3D media file.
Definition poppler-annotation.h:1163
@ TypeSound
A sound media file.
Definition poppler-annotation.h:1165
@ TypeFlash
A Flash media file.
Definition poppler-annotation.h:1164
Type type() const
Returns the media type of the configuration.
QList< RichMediaAnnotation::Instance * > instances() const
Returns the list of Instance objects of the configuration.
QString name() const
Returns the name of the configuration.
The content object of a RichMediaAnnotation.
Definition poppler-annotation.h:1236
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.
The deactivation object of the RichMediaAnnotation::Settings object.
Definition poppler-annotation.h:1304
Condition
Describes the condition for deactivating the rich media.
Definition poppler-annotation.h:1312
@ PageClosed
Deactivate when page is closed.
Definition poppler-annotation.h:1313
@ PageInvisible
Deactivate when page becomes invisible.
Definition poppler-annotation.h:1314
Condition condition() const
Returns the deactivation condition.
The instance object of a RichMediaAnnotation::Configuration object.
Definition poppler-annotation.h:1111
RichMediaAnnotation::Params * params() const
Returns the params object of the instance or 0 if it doesn't exist.
Type
Describes the media type of the instance.
Definition poppler-annotation.h:1119
@ TypeFlash
A Flash media file.
Definition poppler-annotation.h:1121
@ TypeSound
A sound media file.
Definition poppler-annotation.h:1122
@ Type3D
A 3D media file.
Definition poppler-annotation.h:1120
Type type() const
Returns the media type of the instance.
The params object of a RichMediaAnnotation::Instance object.
Definition poppler-annotation.h:1084
QString flashVars() const
Returns the parameters for the flash player.
The settings object of a RichMediaAnnotation.
Definition poppler-annotation.h:1340
RichMediaAnnotation::Activation * activation() const
Returns the Activation object of the settings object or 0 if it doesn't exist.
RichMediaAnnotation::Deactivation * deactivation() const
Returns the Deactivation object of the settings object or 0 if it doesn't exist.
RichMedia annotation.
Definition poppler-annotation.h:1067
SubType subType() const override
The type of the annotation.
RichMediaAnnotation::Settings * settings() const
Returns the Settings object of the rich media annotation or 0 if it doesn't exist.
RichMediaAnnotation::Content * content() const
Returns the Content object of the rich media annotation or 0 if it doesn't exist.
Screen annotation.
Definition poppler-annotation.h:988
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.
Sound annotation.
Definition poppler-annotation.h:908
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:2196
Stamp annotation.
Definition poppler-annotation.h:725
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:466
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.
Widget annotation.
Definition poppler-annotation.h:1040
SubType subType() const override
The type of the 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...
The Poppler Qt6 binding.
Definition poppler-annotation.h:49
Structure corresponding to a QuadPoints array.
Definition poppler-annotation.h:684