Poppler Qt6 24.12.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, 2024, 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 * Copyright (C) 2024, g10 Code GmbH, Author: Sune Stolborg Vuorela <sune@vuorela.dk>
16 * Adapting code from
17 * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
18 *
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2, or (at your option)
22 * any later version.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
28 *
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
32 */
33
34#ifndef _POPPLER_ANNOTATION_H_
35#define _POPPLER_ANNOTATION_H_
36
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>
45#include <QtGui/QFont>
46#include "poppler-export.h"
47#include "poppler-converter.h"
48
49#include <memory>
50
51namespace Poppler {
52
53class Annotation;
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;
71class EmbeddedFile;
72class Link;
73class SoundObject;
74class MovieObject;
75class LinkRendition;
76class Page;
77
90class POPPLER_QT6_EXPORT AnnotationAppearance
91{
92 friend class Annotation;
93
94public:
95 explicit AnnotationAppearance(AnnotationAppearancePrivate *annotationAppearancePrivate);
97
98private:
99 AnnotationAppearancePrivate *d;
100 Q_DISABLE_COPY(AnnotationAppearance)
101};
102
176class POPPLER_QT6_EXPORT Annotation
177{
178 friend class LinkMovie;
179 friend class LinkRendition;
180
181public:
182 // enum definitions
188 // WARNING!!! oKular uses that very same values so if you change them notify the author!
190 {
191 AText = 1,
192 ALine = 2,
193 AGeom = 3,
194 AHighlight = 4,
195 AStamp = 5,
196 AInk = 6,
197 ALink = 7,
198 ACaret = 8,
199 AFileAttachment = 9,
200 ASound = 10,
201 AMovie = 11,
202 AScreen = 12,
203 AWidget = 13,
204 ARichMedia = 14
205 };
206
214 // NOTE: Only flags that are known to work are documented
215 enum Flag
216 {
217 Hidden = 1,
218 FixedSize = 2,
219 FixedRotation = 4,
220 DenyPrint = 8,
221 DenyWrite = 16,
222 DenyDelete = 32,
223 ToggleHidingOnMouse = 64,
224 External = 128
225 };
226 Q_DECLARE_FLAGS(Flags, Flag)
227
228 enum LineStyle
229 {
230 Solid = 1,
231 Dashed = 2,
232 Beveled = 4,
233 Inset = 8,
234 Underline = 16
235 };
236 enum LineEffect
237 {
238 NoEffect = 1,
239 Cloudy = 2
240 };
241 enum RevScope
242 {
243 Root = 0,
244 Reply = 1,
245 Group = 2,
246 Delete = 4
247 };
248 enum RevType
249 {
250 None = 1,
251 Marked = 2,
252 Unmarked = 4,
253 Accepted = 8,
254 Rejected = 16,
255 Cancelled = 32,
256 Completed = 64
257 };
258
262 QString author() const;
266 void setAuthor(const QString &author);
267
268 QString contents() const;
269 void setContents(const QString &contents);
270
274 QString uniqueName() const;
280 void setUniqueName(const QString &uniqueName);
281
282 QDateTime modificationDate() const;
283 void setModificationDate(const QDateTime &date);
284
285 QDateTime creationDate() const;
286 void setCreationDate(const QDateTime &date);
287
293 Flags flags() const;
299 void setFlags(Flags flags);
300
306 QRectF boundary() const;
317 void setBoundary(const QRectF &boundary);
318
322 class POPPLER_QT6_EXPORT Style
323 {
324 public:
325 Style();
326 Style(const Style &other);
327 Style &operator=(const Style &other);
328 ~Style();
329
330 // appearance properties
331 QColor color() const; // black
332 void setColor(const QColor &color);
333 double opacity() const; // 1.0
334 void setOpacity(double opacity);
335
336 // pen properties
337 double width() const; // 1.0
338 void setWidth(double width);
339 LineStyle lineStyle() const; // LineStyle::Solid
340 void setLineStyle(LineStyle style);
341 double xCorners() const; // 0.0
342 void setXCorners(double radius);
343 double yCorners() const; // 0.0
344 void setYCorners(double radius);
345 const QVector<double> &dashArray() const; // [ 3 ]
346 void setDashArray(const QVector<double> &array);
347
348 // pen effects
349 LineEffect lineEffect() const; // LineEffect::NoEffect
350 void setLineEffect(LineEffect effect);
351 double effectIntensity() const; // 1.0
352 void setEffectIntensity(double intens);
353
354 private:
355 class Private;
356 QSharedDataPointer<Private> d;
357 };
358
359 Style style() const;
360 void setStyle(const Style &style);
361
365 class POPPLER_QT6_EXPORT Popup
366 {
367 public:
368 Popup();
369 Popup(const Popup &other);
370 Popup &operator=(const Popup &other);
371 ~Popup();
372
373 // window state (Hidden, FixedRotation, Deny* flags allowed)
374 int flags() const; // -1 (never initialized) -> 0 (if inited and shown)
375 void setFlags(int flags);
376
377 // geometric properties
378 QRectF geometry() const; // no default
379 void setGeometry(const QRectF &geom);
380
381 // window contents/override properties
382 QString title() const; // '' text in the titlebar (overrides author)
383 void setTitle(const QString &title);
384 QString summary() const; // '' short description (displayed if not empty)
385 void setSummary(const QString &summary);
386 QString text() const; // '' text for the window (overrides annot->contents)
387 void setText(const QString &text);
388
389 private:
390 class Private;
391 QSharedDataPointer<Private> d;
392 };
393
394 Popup popup() const;
396 void setPopup(const Popup &popup);
397
398 RevScope revisionScope() const; // Root
399
400 RevType revisionType() const; // None
401
405 std::vector<std::unique_ptr<Annotation>> revisions() const;
406
410 virtual SubType subType() const = 0;
411
417 std::unique_ptr<AnnotationAppearance> annotationAppearance() const;
418
424 void setAnnotationAppearance(const AnnotationAppearance &annotationAppearance);
425
429 virtual ~Annotation();
430
450
451protected:
453 explicit Annotation(AnnotationPrivate &dd);
454 Q_DECLARE_PRIVATE(Annotation)
455 QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr;
457
458private:
459 Q_DISABLE_COPY(Annotation)
460};
461
468class POPPLER_QT6_EXPORT TextAnnotation : public Annotation
469{
470 friend class AnnotationPrivate;
471
472public:
473 // local enums
474 enum TextType
475 {
476 Linked,
477 InPlace
478 };
479 enum InplaceIntent
480 {
481 Unknown,
482 Callout,
483 TypeWriter
484 };
485 enum InplaceAlignPosition
486 {
487 InplaceAlignLeft,
488 InplaceAlignCenter,
489 InplaceAlignRight
490 };
491
492 explicit TextAnnotation(TextType type);
493 ~TextAnnotation() override;
494 SubType subType() const override;
495
499 TextType textType() const;
500
513 QString textIcon() const;
514
520 void setTextIcon(const QString &icon);
521
522 QFont textFont() const;
523 void setTextFont(const QFont &font);
525 QColor textColor() const;
526 void setTextColor(const QColor &color);
527
528 InplaceAlignPosition inplaceAlign() const;
529 void setInplaceAlign(InplaceAlignPosition align);
530
531 QPointF calloutPoint(int id) const;
532 QVector<QPointF> calloutPoints() const;
533 void setCalloutPoints(const QVector<QPointF> &points);
534
535 InplaceIntent inplaceIntent() const;
536 void setInplaceIntent(InplaceIntent intent);
537
538private:
539 explicit TextAnnotation(TextAnnotationPrivate &dd);
540 void setTextType(TextType type);
541 Q_DECLARE_PRIVATE(TextAnnotation)
542 Q_DISABLE_COPY(TextAnnotation)
543};
544
550class POPPLER_QT6_EXPORT LineAnnotation : public Annotation
551{
552 friend class AnnotationPrivate;
553
554public:
555 // local enums
556 enum LineType
557 {
558 StraightLine,
559 Polyline
560 };
561 enum TermStyle
562 {
563 Square,
564 Circle,
565 Diamond,
566 OpenArrow,
567 ClosedArrow,
568 None,
569 Butt,
570 ROpenArrow,
571 RClosedArrow,
572 Slash
573 };
574 enum LineIntent
575 {
576 Unknown,
577 Arrow,
578 Dimension,
579 PolygonCloud
580 };
581
582 explicit LineAnnotation(LineType type);
583 ~LineAnnotation() override;
584 SubType subType() const override;
585
586 LineType lineType() const;
587
588 QVector<QPointF> linePoints() const;
589 void setLinePoints(const QVector<QPointF> &points);
590
591 TermStyle lineStartStyle() const;
592 void setLineStartStyle(TermStyle style);
593
594 TermStyle lineEndStyle() const;
595 void setLineEndStyle(TermStyle style);
596
597 bool isLineClosed() const;
598 void setLineClosed(bool closed);
599
600 QColor lineInnerColor() const;
601 void setLineInnerColor(const QColor &color);
602
603 double lineLeadingForwardPoint() const;
604 void setLineLeadingForwardPoint(double point);
605
606 double lineLeadingBackPoint() const;
607 void setLineLeadingBackPoint(double point);
608
609 bool lineShowCaption() const;
610 void setLineShowCaption(bool show);
611
612 LineIntent lineIntent() const;
613 void setLineIntent(LineIntent intent);
614
615private:
616 explicit LineAnnotation(LineAnnotationPrivate &dd);
617 void setLineType(LineType type);
618 Q_DECLARE_PRIVATE(LineAnnotation)
619 Q_DISABLE_COPY(LineAnnotation)
620};
621
628class POPPLER_QT6_EXPORT GeomAnnotation : public Annotation
629{
630 friend class AnnotationPrivate;
631
632public:
634 ~GeomAnnotation() override;
635 SubType subType() const override;
636
637 // common enums
638 enum GeomType
639 {
640 InscribedSquare,
641 InscribedCircle
642 };
643
644 GeomType geomType() const;
645 void setGeomType(GeomType type);
646
647 QColor geomInnerColor() const;
648 void setGeomInnerColor(const QColor &color);
649
650private:
651 explicit GeomAnnotation(GeomAnnotationPrivate &dd);
652 Q_DECLARE_PRIVATE(GeomAnnotation)
653 Q_DISABLE_COPY(GeomAnnotation)
654};
655
661class POPPLER_QT6_EXPORT HighlightAnnotation : public Annotation
662{
663 friend class AnnotationPrivate;
664
665public:
667 ~HighlightAnnotation() override;
668 SubType subType() const override;
669
680
686 struct Quad
687 {
688 QPointF points[4]; // 8 valid coords
689 bool capStart; // false (vtx 1-4) [K]
690 bool capEnd; // false (vtx 2-3) [K]
691 double feather; // 0.1 (in range 0..1) [K]
692 };
693
699
705
709 QList<Quad> highlightQuads() const;
710
714 void setHighlightQuads(const QList<Quad> &quads);
715
716private:
717 explicit HighlightAnnotation(HighlightAnnotationPrivate &dd);
718 Q_DECLARE_PRIVATE(HighlightAnnotation)
719 Q_DISABLE_COPY(HighlightAnnotation)
720};
721
727class POPPLER_QT6_EXPORT StampAnnotation : public Annotation
728{
729 friend class AnnotationPrivate;
730
731public:
733 ~StampAnnotation() override;
734 SubType subType() const override;
735
755 QString stampIconName() const;
756
762 void setStampIconName(const QString &name);
763
769 void setStampCustomImage(const QImage &image);
770
771private:
772 explicit StampAnnotation(StampAnnotationPrivate &dd);
773 Q_DECLARE_PRIVATE(StampAnnotation)
774 Q_DISABLE_COPY(StampAnnotation)
775};
776
787class POPPLER_QT6_EXPORT SignatureAnnotation : public Annotation
788{
789 friend class AnnotationPrivate;
790
791public:
805
807 ~SignatureAnnotation() override;
808 SubType subType() const override;
809
810 void setText(const QString &text);
811 void setLeftText(const QString &text);
812
816 double fontSize() const;
817 void setFontSize(double fontSize);
818
822 double leftFontSize() const;
823 void setLeftFontSize(double fontSize);
824
828 QColor fontColor() const;
829 void setFontColor(const QColor &color);
830
834 QColor borderColor() const;
835 void setBorderColor(const QColor &color);
836
842 double borderWidth() const;
843 void setBorderWidth(double width);
844
848 QColor backgroundColor() const;
849 void setBackgroundColor(const QColor &color);
850
851 QString imagePath() const;
852 void setImagePath(const QString &imagePath);
853
854 QString fieldPartialName() const;
855 void setFieldPartialName(const QString &fieldPartialName);
856
857 [[nodiscard]] SigningResult sign(const QString &outputFileName, const PDFConverter::NewSignatureData &data);
858
859private:
860 explicit SignatureAnnotation(SignatureAnnotationPrivate &dd);
861 Q_DECLARE_PRIVATE(SignatureAnnotation)
862 Q_DISABLE_COPY(SignatureAnnotation)
863};
864
870class POPPLER_QT6_EXPORT InkAnnotation : public Annotation
871{
872 friend class AnnotationPrivate;
873
874public:
876 ~InkAnnotation() override;
877 SubType subType() const override;
878
879 QList<QVector<QPointF>> inkPaths() const;
880 void setInkPaths(const QList<QVector<QPointF>> &paths);
881
882private:
883 explicit InkAnnotation(InkAnnotationPrivate &dd);
884 Q_DECLARE_PRIVATE(InkAnnotation)
885 Q_DISABLE_COPY(InkAnnotation)
886};
887
888class POPPLER_QT6_EXPORT LinkAnnotation : public Annotation
889{
890 friend class AnnotationPrivate;
891
892public:
893 ~LinkAnnotation() override;
894 SubType subType() const override;
895
896 // local enums
897 enum HighlightMode
898 {
899 None,
900 Invert,
901 Outline,
902 Push
903 };
904
905 Link *linkDestination() const;
906 void setLinkDestination(std::unique_ptr<Link> &&link);
907
908 HighlightMode linkHighlightMode() const;
909 void setLinkHighlightMode(HighlightMode mode);
910
911 QPointF linkRegionPoint(int id) const;
912 void setLinkRegionPoint(int id, const QPointF point);
913
914private:
916 explicit LinkAnnotation(LinkAnnotationPrivate &dd);
917 Q_DECLARE_PRIVATE(LinkAnnotation)
918 Q_DISABLE_COPY(LinkAnnotation)
919};
920
926class POPPLER_QT6_EXPORT CaretAnnotation : public Annotation
927{
928 friend class AnnotationPrivate;
929
930public:
932 ~CaretAnnotation() override;
933 SubType subType() const override;
934
939 {
940 None,
941 P
942 };
943
944 CaretSymbol caretSymbol() const;
945 void setCaretSymbol(CaretSymbol symbol);
946
947private:
948 explicit CaretAnnotation(CaretAnnotationPrivate &dd);
949 Q_DECLARE_PRIVATE(CaretAnnotation)
950 Q_DISABLE_COPY(CaretAnnotation)
951};
952
958class POPPLER_QT6_EXPORT FileAttachmentAnnotation : public Annotation
959{
960 friend class AnnotationPrivate;
961
962public:
963 ~FileAttachmentAnnotation() override;
964 SubType subType() const override;
965
969 QString fileIconName() const;
973 void setFileIconName(const QString &icon);
974
985
986private:
988 explicit FileAttachmentAnnotation(FileAttachmentAnnotationPrivate &dd);
989 Q_DECLARE_PRIVATE(FileAttachmentAnnotation)
990 Q_DISABLE_COPY(FileAttachmentAnnotation)
991};
992
998class POPPLER_QT6_EXPORT SoundAnnotation : public Annotation
999{
1000 friend class AnnotationPrivate;
1001
1002public:
1003 ~SoundAnnotation() override;
1004 SubType subType() const override;
1005
1009 QString soundIconName() const;
1013 void setSoundIconName(const QString &icon);
1014
1025
1026private:
1028 explicit SoundAnnotation(SoundAnnotationPrivate &dd);
1029 Q_DECLARE_PRIVATE(SoundAnnotation)
1030 Q_DISABLE_COPY(SoundAnnotation)
1031};
1032
1038class POPPLER_QT6_EXPORT MovieAnnotation : public Annotation
1039{
1040 friend class AnnotationPrivate;
1041
1042public:
1043 ~MovieAnnotation() override;
1044 SubType subType() const override;
1045
1055 void setMovie(MovieObject *movie);
1056
1060 QString movieTitle() const;
1064 void setMovieTitle(const QString &title);
1065
1066private:
1068 explicit MovieAnnotation(MovieAnnotationPrivate &dd);
1069 Q_DECLARE_PRIVATE(MovieAnnotation)
1070 Q_DISABLE_COPY(MovieAnnotation)
1071};
1072
1078class POPPLER_QT6_EXPORT ScreenAnnotation : public Annotation
1079{
1080 friend class AnnotationPrivate;
1081
1082public:
1083 ~ScreenAnnotation() override;
1084
1085 SubType subType() const override;
1086
1091
1098
1102 QString screenTitle() const;
1103
1107 void setScreenTitle(const QString &title);
1108
1113 std::unique_ptr<Link> additionalAction(AdditionalActionType type) const;
1114
1115private:
1117 explicit ScreenAnnotation(ScreenAnnotationPrivate &dd);
1118 Q_DECLARE_PRIVATE(ScreenAnnotation)
1119 Q_DISABLE_COPY(ScreenAnnotation)
1120};
1121
1130class POPPLER_QT6_EXPORT WidgetAnnotation : public Annotation
1131{
1132 friend class AnnotationPrivate;
1133
1134public:
1135 ~WidgetAnnotation() override;
1136
1137 SubType subType() const override;
1138
1143 std::unique_ptr<Link> additionalAction(AdditionalActionType type) const;
1144
1145private:
1147 explicit WidgetAnnotation(WidgetAnnotationPrivate &dd);
1148 Q_DECLARE_PRIVATE(WidgetAnnotation)
1149 Q_DISABLE_COPY(WidgetAnnotation)
1150};
1151
1157class POPPLER_QT6_EXPORT RichMediaAnnotation : public Annotation
1158{
1159 friend class AnnotationPrivate;
1160
1161public:
1162 ~RichMediaAnnotation() override;
1163
1164 SubType subType() const override;
1165
1174 class POPPLER_QT6_EXPORT Params
1175 {
1176 friend class AnnotationPrivate;
1177
1178 public:
1179 Params();
1180 ~Params();
1181
1185 QString flashVars() const;
1186
1187 private:
1188 void setFlashVars(const QString &flashVars);
1189
1190 class Private;
1191 QScopedPointer<Private> d;
1192 };
1193
1201 class POPPLER_QT6_EXPORT Instance
1202 {
1203 friend class AnnotationPrivate;
1204
1205 public:
1209 enum Type
1210 {
1214 TypeVideo
1216
1217 Instance();
1218 ~Instance();
1219
1223 Type type() const;
1224
1229
1230 private:
1231 void setType(Type type);
1232 void setParams(RichMediaAnnotation::Params *params);
1233
1234 class Private;
1235 QScopedPointer<Private> d;
1236 };
1237
1244 class POPPLER_QT6_EXPORT Configuration
1245 {
1246 friend class AnnotationPrivate;
1247
1248 public:
1252 enum Type
1253 {
1257 TypeVideo
1259
1260 Configuration();
1262
1266 Type type() const;
1267
1271 QString name() const;
1272
1276 QList<RichMediaAnnotation::Instance *> instances() const;
1277
1278 private:
1279 void setType(Type type);
1280 void setName(const QString &name);
1281 void setInstances(const QList<RichMediaAnnotation::Instance *> &instances);
1282
1283 class Private;
1284 QScopedPointer<Private> d;
1285 };
1286
1294 class POPPLER_QT6_EXPORT Asset
1295 {
1296 friend class AnnotationPrivate;
1297
1298 public:
1299 Asset();
1300 ~Asset();
1301
1305 QString name() const;
1306
1311
1312 private:
1313 void setName(const QString &name);
1314 void setEmbeddedFile(EmbeddedFile *embeddedFile);
1315
1316 class Private;
1317 QScopedPointer<Private> d;
1318 };
1319
1326 class POPPLER_QT6_EXPORT Content
1327 {
1328 friend class AnnotationPrivate;
1329
1330 public:
1331 Content();
1332 ~Content();
1333
1337 QList<RichMediaAnnotation::Configuration *> configurations() const;
1338
1342 QList<RichMediaAnnotation::Asset *> assets() const;
1343
1344 private:
1345 void setConfigurations(const QList<RichMediaAnnotation::Configuration *> &configurations);
1346 void setAssets(const QList<RichMediaAnnotation::Asset *> &assets);
1347
1348 class Private;
1349 QScopedPointer<Private> d;
1350 };
1351
1358 class POPPLER_QT6_EXPORT Activation
1359 {
1360 friend class AnnotationPrivate;
1361
1362 public:
1367 {
1370 UserAction
1372
1373 Activation();
1374 ~Activation();
1375
1380
1381 private:
1382 void setCondition(Condition condition);
1383
1384 class Private;
1385 QScopedPointer<Private> d;
1386 };
1387
1394 class POPPLER_QT6_EXPORT Deactivation
1395 {
1396 friend class AnnotationPrivate;
1397
1398 public:
1403 {
1406 UserAction
1408
1409 Deactivation();
1410 ~Deactivation();
1411
1416
1417 private:
1418 void setCondition(Condition condition);
1419
1420 class Private;
1421 QScopedPointer<Private> d;
1422 };
1423
1430 class POPPLER_QT6_EXPORT Settings
1431 {
1432 friend class AnnotationPrivate;
1433
1434 public:
1435 Settings();
1436 ~Settings();
1437
1442
1447
1448 private:
1449 void setActivation(RichMediaAnnotation::Activation *activation);
1450 void setDeactivation(RichMediaAnnotation::Deactivation *deactivation);
1451
1452 class Private;
1453 QScopedPointer<Private> d;
1454 };
1455
1460
1465
1466private:
1467 void setSettings(RichMediaAnnotation::Settings *settings);
1468 void setContent(RichMediaAnnotation::Content *content);
1469
1471 explicit RichMediaAnnotation(RichMediaAnnotationPrivate &dd);
1472 Q_DECLARE_PRIVATE(RichMediaAnnotation)
1473 Q_DISABLE_COPY(RichMediaAnnotation)
1474};
1475
1476}
1477
1478#endif
AnnotationAppearance class wrapping Poppler's AP stream object.
Definition poppler-annotation.h:91
Container class for Annotation pop-up window information.
Definition poppler-annotation.h:366
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:927
SubType subType() const override
The type of the annotation.
CaretSymbol
The symbols for the caret annotation.
Definition poppler-annotation.h:939
Container class for an embedded file with a PDF document.
Definition poppler-qt6.h:339
File attachment annotation.
Definition poppler-annotation.h:959
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:871
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:889
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
Movie annotation.
Definition poppler-annotation.h:1039
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 activation object of the RichMediaAnnotation::Settings object.
Definition poppler-annotation.h:1359
Condition
Describes the condition for activating the rich media.
Definition poppler-annotation.h:1367
@ PageVisible
Activate when page becomes visible.
Definition poppler-annotation.h:1369
@ PageOpened
Activate when page is opened.
Definition poppler-annotation.h:1368
Condition condition() const
Returns the activation condition.
The asset object of a RichMediaAnnotation::Content object.
Definition poppler-annotation.h:1295
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:1245
Type
Describes the media type of the configuration.
Definition poppler-annotation.h:1253
@ Type3D
A 3D media file.
Definition poppler-annotation.h:1254
@ TypeSound
A sound media file.
Definition poppler-annotation.h:1256
@ TypeFlash
A Flash media file.
Definition poppler-annotation.h:1255
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:1327
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:1395
Condition
Describes the condition for deactivating the rich media.
Definition poppler-annotation.h:1403
@ PageClosed
Deactivate when page is closed.
Definition poppler-annotation.h:1404
@ PageInvisible
Deactivate when page becomes invisible.
Definition poppler-annotation.h:1405
Condition condition() const
Returns the deactivation condition.
The instance object of a RichMediaAnnotation::Configuration object.
Definition poppler-annotation.h:1202
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:1210
@ TypeFlash
A Flash media file.
Definition poppler-annotation.h:1212
@ TypeSound
A sound media file.
Definition poppler-annotation.h:1213
@ Type3D
A 3D media file.
Definition poppler-annotation.h:1211
Type type() const
Returns the media type of the instance.
The params object of a RichMediaAnnotation::Instance object.
Definition poppler-annotation.h:1175
QString flashVars() const
Returns the parameters for the flash player.
The settings object of a RichMediaAnnotation.
Definition poppler-annotation.h:1431
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:1158
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:1079
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
@ 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:999
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.
Widget annotation.
Definition poppler-annotation.h:1131
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:51
Structure corresponding to a QuadPoints array.
Definition poppler-annotation.h:687