Poppler Qt6 25.03.90
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, 2025, 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:
806
808 ~SignatureAnnotation() override;
809 SubType subType() const override;
810
811 void setText(const QString &text);
812 void setLeftText(const QString &text);
813
817 double fontSize() const;
818 void setFontSize(double fontSize);
819
823 double leftFontSize() const;
824 void setLeftFontSize(double fontSize);
825
829 QColor fontColor() const;
830 void setFontColor(const QColor &color);
831
835 QColor borderColor() const;
836 void setBorderColor(const QColor &color);
837
843 double borderWidth() const;
844 void setBorderWidth(double width);
845
849 QColor backgroundColor() const;
850 void setBackgroundColor(const QColor &color);
851
852 QString imagePath() const;
853 void setImagePath(const QString &imagePath);
854
855 QString fieldPartialName() const;
856 void setFieldPartialName(const QString &fieldPartialName);
857
858 [[nodiscard]] SigningResult sign(const QString &outputFileName, const PDFConverter::NewSignatureData &data);
859
860private:
861 explicit SignatureAnnotation(SignatureAnnotationPrivate &dd);
862 Q_DECLARE_PRIVATE(SignatureAnnotation)
863 Q_DISABLE_COPY(SignatureAnnotation)
864};
865
871class POPPLER_QT6_EXPORT InkAnnotation : public Annotation
872{
873 friend class AnnotationPrivate;
874
875public:
877 ~InkAnnotation() override;
878 SubType subType() const override;
879
880 QList<QVector<QPointF>> inkPaths() const;
881 void setInkPaths(const QList<QVector<QPointF>> &paths);
882
883private:
884 explicit InkAnnotation(InkAnnotationPrivate &dd);
885 Q_DECLARE_PRIVATE(InkAnnotation)
886 Q_DISABLE_COPY(InkAnnotation)
887};
888
889class POPPLER_QT6_EXPORT LinkAnnotation : public Annotation
890{
891 friend class AnnotationPrivate;
892
893public:
894 ~LinkAnnotation() override;
895 SubType subType() const override;
896
897 // local enums
898 enum HighlightMode
899 {
900 None,
901 Invert,
902 Outline,
903 Push
904 };
905
906 Link *linkDestination() const;
907 void setLinkDestination(std::unique_ptr<Link> &&link);
908
909 HighlightMode linkHighlightMode() const;
910 void setLinkHighlightMode(HighlightMode mode);
911
912 QPointF linkRegionPoint(int id) const;
913 void setLinkRegionPoint(int id, const QPointF point);
914
915private:
917 explicit LinkAnnotation(LinkAnnotationPrivate &dd);
918 Q_DECLARE_PRIVATE(LinkAnnotation)
919 Q_DISABLE_COPY(LinkAnnotation)
920};
921
927class POPPLER_QT6_EXPORT CaretAnnotation : public Annotation
928{
929 friend class AnnotationPrivate;
930
931public:
933 ~CaretAnnotation() override;
934 SubType subType() const override;
935
940 {
941 None,
942 P
943 };
944
945 CaretSymbol caretSymbol() const;
946 void setCaretSymbol(CaretSymbol symbol);
947
948private:
949 explicit CaretAnnotation(CaretAnnotationPrivate &dd);
950 Q_DECLARE_PRIVATE(CaretAnnotation)
951 Q_DISABLE_COPY(CaretAnnotation)
952};
953
959class POPPLER_QT6_EXPORT FileAttachmentAnnotation : public Annotation
960{
961 friend class AnnotationPrivate;
962
963public:
964 ~FileAttachmentAnnotation() override;
965 SubType subType() const override;
966
970 QString fileIconName() const;
974 void setFileIconName(const QString &icon);
975
986
987private:
989 explicit FileAttachmentAnnotation(FileAttachmentAnnotationPrivate &dd);
990 Q_DECLARE_PRIVATE(FileAttachmentAnnotation)
991 Q_DISABLE_COPY(FileAttachmentAnnotation)
992};
993
999class POPPLER_QT6_EXPORT SoundAnnotation : public Annotation
1000{
1001 friend class AnnotationPrivate;
1002
1003public:
1004 ~SoundAnnotation() override;
1005 SubType subType() const override;
1006
1010 QString soundIconName() const;
1014 void setSoundIconName(const QString &icon);
1015
1026
1027private:
1029 explicit SoundAnnotation(SoundAnnotationPrivate &dd);
1030 Q_DECLARE_PRIVATE(SoundAnnotation)
1031 Q_DISABLE_COPY(SoundAnnotation)
1032};
1033
1039class POPPLER_QT6_EXPORT MovieAnnotation : public Annotation
1040{
1041 friend class AnnotationPrivate;
1042
1043public:
1044 ~MovieAnnotation() override;
1045 SubType subType() const override;
1046
1056 void setMovie(MovieObject *movie);
1057
1061 QString movieTitle() const;
1065 void setMovieTitle(const QString &title);
1066
1067private:
1069 explicit MovieAnnotation(MovieAnnotationPrivate &dd);
1070 Q_DECLARE_PRIVATE(MovieAnnotation)
1071 Q_DISABLE_COPY(MovieAnnotation)
1072};
1073
1079class POPPLER_QT6_EXPORT ScreenAnnotation : public Annotation
1080{
1081 friend class AnnotationPrivate;
1082
1083public:
1084 ~ScreenAnnotation() override;
1085
1086 SubType subType() const override;
1087
1092
1099
1103 QString screenTitle() const;
1104
1108 void setScreenTitle(const QString &title);
1109
1114 std::unique_ptr<Link> additionalAction(AdditionalActionType type) const;
1115
1116private:
1118 explicit ScreenAnnotation(ScreenAnnotationPrivate &dd);
1119 Q_DECLARE_PRIVATE(ScreenAnnotation)
1120 Q_DISABLE_COPY(ScreenAnnotation)
1121};
1122
1131class POPPLER_QT6_EXPORT WidgetAnnotation : public Annotation
1132{
1133 friend class AnnotationPrivate;
1134
1135public:
1136 ~WidgetAnnotation() override;
1137
1138 SubType subType() const override;
1139
1144 std::unique_ptr<Link> additionalAction(AdditionalActionType type) const;
1145
1146private:
1148 explicit WidgetAnnotation(WidgetAnnotationPrivate &dd);
1149 Q_DECLARE_PRIVATE(WidgetAnnotation)
1150 Q_DISABLE_COPY(WidgetAnnotation)
1151};
1152
1158class POPPLER_QT6_EXPORT RichMediaAnnotation : public Annotation
1159{
1160 friend class AnnotationPrivate;
1161
1162public:
1163 ~RichMediaAnnotation() override;
1164
1165 SubType subType() const override;
1166
1175 class POPPLER_QT6_EXPORT Params
1176 {
1177 friend class AnnotationPrivate;
1178
1179 public:
1180 Params();
1181 ~Params();
1182
1186 QString flashVars() const;
1187
1188 private:
1189 void setFlashVars(const QString &flashVars);
1190
1191 class Private;
1192 QScopedPointer<Private> d;
1193 };
1194
1202 class POPPLER_QT6_EXPORT Instance
1203 {
1204 friend class AnnotationPrivate;
1205
1206 public:
1210 enum Type
1211 {
1215 TypeVideo
1217
1218 Instance();
1219 ~Instance();
1220
1224 Type type() const;
1225
1230
1231 private:
1232 void setType(Type type);
1233 void setParams(RichMediaAnnotation::Params *params);
1234
1235 class Private;
1236 QScopedPointer<Private> d;
1237 };
1238
1245 class POPPLER_QT6_EXPORT Configuration
1246 {
1247 friend class AnnotationPrivate;
1248
1249 public:
1253 enum Type
1254 {
1258 TypeVideo
1260
1261 Configuration();
1263
1267 Type type() const;
1268
1272 QString name() const;
1273
1277 QList<RichMediaAnnotation::Instance *> instances() const;
1278
1279 private:
1280 void setType(Type type);
1281 void setName(const QString &name);
1282 void setInstances(const QList<RichMediaAnnotation::Instance *> &instances);
1283
1284 class Private;
1285 QScopedPointer<Private> d;
1286 };
1287
1295 class POPPLER_QT6_EXPORT Asset
1296 {
1297 friend class AnnotationPrivate;
1298
1299 public:
1300 Asset();
1301 ~Asset();
1302
1306 QString name() const;
1307
1312
1313 private:
1314 void setName(const QString &name);
1315 void setEmbeddedFile(EmbeddedFile *embeddedFile);
1316
1317 class Private;
1318 QScopedPointer<Private> d;
1319 };
1320
1327 class POPPLER_QT6_EXPORT Content
1328 {
1329 friend class AnnotationPrivate;
1330
1331 public:
1332 Content();
1333 ~Content();
1334
1338 QList<RichMediaAnnotation::Configuration *> configurations() const;
1339
1343 QList<RichMediaAnnotation::Asset *> assets() const;
1344
1345 private:
1346 void setConfigurations(const QList<RichMediaAnnotation::Configuration *> &configurations);
1347 void setAssets(const QList<RichMediaAnnotation::Asset *> &assets);
1348
1349 class Private;
1350 QScopedPointer<Private> d;
1351 };
1352
1359 class POPPLER_QT6_EXPORT Activation
1360 {
1361 friend class AnnotationPrivate;
1362
1363 public:
1368 {
1371 UserAction
1373
1374 Activation();
1375 ~Activation();
1376
1381
1382 private:
1383 void setCondition(Condition condition);
1384
1385 class Private;
1386 QScopedPointer<Private> d;
1387 };
1388
1395 class POPPLER_QT6_EXPORT Deactivation
1396 {
1397 friend class AnnotationPrivate;
1398
1399 public:
1404 {
1407 UserAction
1409
1410 Deactivation();
1411 ~Deactivation();
1412
1417
1418 private:
1419 void setCondition(Condition condition);
1420
1421 class Private;
1422 QScopedPointer<Private> d;
1423 };
1424
1431 class POPPLER_QT6_EXPORT Settings
1432 {
1433 friend class AnnotationPrivate;
1434
1435 public:
1436 Settings();
1437 ~Settings();
1438
1443
1448
1449 private:
1450 void setActivation(RichMediaAnnotation::Activation *activation);
1451 void setDeactivation(RichMediaAnnotation::Deactivation *deactivation);
1452
1453 class Private;
1454 QScopedPointer<Private> d;
1455 };
1456
1461
1466
1467private:
1468 void setSettings(RichMediaAnnotation::Settings *settings);
1469 void setContent(RichMediaAnnotation::Content *content);
1470
1472 explicit RichMediaAnnotation(RichMediaAnnotationPrivate &dd);
1473 Q_DECLARE_PRIVATE(RichMediaAnnotation)
1474 Q_DISABLE_COPY(RichMediaAnnotation)
1475};
1476
1477}
1478
1479#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: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
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 activation object of the RichMediaAnnotation::Settings object.
Definition poppler-annotation.h:1360
Condition
Describes the condition for activating the rich media.
Definition poppler-annotation.h:1368
@ PageVisible
Activate when page becomes visible.
Definition poppler-annotation.h:1370
@ PageOpened
Activate when page is opened.
Definition poppler-annotation.h:1369
Condition condition() const
Returns the activation condition.
The asset object of a RichMediaAnnotation::Content object.
Definition poppler-annotation.h:1296
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:1246
Type
Describes the media type of the configuration.
Definition poppler-annotation.h:1254
@ Type3D
A 3D media file.
Definition poppler-annotation.h:1255
@ TypeSound
A sound media file.
Definition poppler-annotation.h:1257
@ TypeFlash
A Flash media file.
Definition poppler-annotation.h:1256
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: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.
The deactivation object of the RichMediaAnnotation::Settings object.
Definition poppler-annotation.h:1396
Condition
Describes the condition for deactivating the rich media.
Definition poppler-annotation.h:1404
@ PageClosed
Deactivate when page is closed.
Definition poppler-annotation.h:1405
@ PageInvisible
Deactivate when page becomes invisible.
Definition poppler-annotation.h:1406
Condition condition() const
Returns the deactivation condition.
The instance object of a RichMediaAnnotation::Configuration object.
Definition poppler-annotation.h:1203
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:1211
@ TypeFlash
A Flash media file.
Definition poppler-annotation.h:1213
@ TypeSound
A sound media file.
Definition poppler-annotation.h:1214
@ Type3D
A 3D media file.
Definition poppler-annotation.h:1212
Type type() const
Returns the media type of the instance.
The params object of a RichMediaAnnotation::Instance object.
Definition poppler-annotation.h:1176
QString flashVars() const
Returns the parameters for the flash player.
The settings object of a RichMediaAnnotation.
Definition poppler-annotation.h:1432
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:1159
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: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.
Widget annotation.
Definition poppler-annotation.h:1132
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