Poppler Qt6 24.11.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 * 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#include "poppler-converter.h"
47
48#include <memory>
49
50namespace Poppler {
51
52class Annotation;
53class AnnotationPrivate;
54class AnnotationAppearancePrivate;
55class TextAnnotationPrivate;
56class LineAnnotationPrivate;
57class GeomAnnotationPrivate;
58class HighlightAnnotationPrivate;
59class StampAnnotationPrivate;
60class SignatureAnnotationPrivate;
61class InkAnnotationPrivate;
62class LinkAnnotationPrivate;
63class CaretAnnotationPrivate;
64class FileAttachmentAnnotationPrivate;
65class SoundAnnotationPrivate;
66class MovieAnnotationPrivate;
67class ScreenAnnotationPrivate;
68class WidgetAnnotationPrivate;
69class RichMediaAnnotationPrivate;
70class EmbeddedFile;
71class Link;
72class SoundObject;
73class MovieObject;
74class LinkRendition;
75class Page;
76
89class POPPLER_QT6_EXPORT AnnotationAppearance
90{
91 friend class Annotation;
92
93public:
94 explicit AnnotationAppearance(AnnotationAppearancePrivate *annotationAppearancePrivate);
96
97private:
98 AnnotationAppearancePrivate *d;
99 Q_DISABLE_COPY(AnnotationAppearance)
100};
101
175class POPPLER_QT6_EXPORT Annotation
176{
177 friend class LinkMovie;
178 friend class LinkRendition;
179
180public:
181 // enum definitions
187 // WARNING!!! oKular uses that very same values so if you change them notify the author!
189 {
190 AText = 1,
191 ALine = 2,
192 AGeom = 3,
193 AHighlight = 4,
194 AStamp = 5,
195 AInk = 6,
196 ALink = 7,
197 ACaret = 8,
198 AFileAttachment = 9,
199 ASound = 10,
200 AMovie = 11,
201 AScreen = 12,
202 AWidget = 13,
203 ARichMedia = 14
204 };
205
213 // NOTE: Only flags that are known to work are documented
214 enum Flag
215 {
216 Hidden = 1,
217 FixedSize = 2,
218 FixedRotation = 4,
219 DenyPrint = 8,
220 DenyWrite = 16,
221 DenyDelete = 32,
222 ToggleHidingOnMouse = 64,
223 External = 128
224 };
225 Q_DECLARE_FLAGS(Flags, Flag)
226
227 enum LineStyle
228 {
229 Solid = 1,
230 Dashed = 2,
231 Beveled = 4,
232 Inset = 8,
233 Underline = 16
234 };
235 enum LineEffect
236 {
237 NoEffect = 1,
238 Cloudy = 2
239 };
240 enum RevScope
241 {
242 Root = 0,
243 Reply = 1,
244 Group = 2,
245 Delete = 4
246 };
247 enum RevType
248 {
249 None = 1,
250 Marked = 2,
251 Unmarked = 4,
252 Accepted = 8,
253 Rejected = 16,
254 Cancelled = 32,
255 Completed = 64
256 };
257
261 QString author() const;
265 void setAuthor(const QString &author);
266
267 QString contents() const;
268 void setContents(const QString &contents);
269
273 QString uniqueName() const;
279 void setUniqueName(const QString &uniqueName);
280
281 QDateTime modificationDate() const;
282 void setModificationDate(const QDateTime &date);
283
284 QDateTime creationDate() const;
285 void setCreationDate(const QDateTime &date);
286
292 Flags flags() const;
298 void setFlags(Flags flags);
299
305 QRectF boundary() const;
316 void setBoundary(const QRectF &boundary);
317
321 class POPPLER_QT6_EXPORT Style
322 {
323 public:
324 Style();
325 Style(const Style &other);
326 Style &operator=(const Style &other);
327 ~Style();
328
329 // appearance properties
330 QColor color() const; // black
331 void setColor(const QColor &color);
332 double opacity() const; // 1.0
333 void setOpacity(double opacity);
334
335 // pen properties
336 double width() const; // 1.0
337 void setWidth(double width);
338 LineStyle lineStyle() const; // LineStyle::Solid
339 void setLineStyle(LineStyle style);
340 double xCorners() const; // 0.0
341 void setXCorners(double radius);
342 double yCorners() const; // 0.0
343 void setYCorners(double radius);
344 const QVector<double> &dashArray() const; // [ 3 ]
345 void setDashArray(const QVector<double> &array);
346
347 // pen effects
348 LineEffect lineEffect() const; // LineEffect::NoEffect
349 void setLineEffect(LineEffect effect);
350 double effectIntensity() const; // 1.0
351 void setEffectIntensity(double intens);
352
353 private:
354 class Private;
355 QSharedDataPointer<Private> d;
356 };
357
358 Style style() const;
359 void setStyle(const Style &style);
360
364 class POPPLER_QT6_EXPORT Popup
365 {
366 public:
367 Popup();
368 Popup(const Popup &other);
369 Popup &operator=(const Popup &other);
370 ~Popup();
371
372 // window state (Hidden, FixedRotation, Deny* flags allowed)
373 int flags() const; // -1 (never initialized) -> 0 (if inited and shown)
374 void setFlags(int flags);
375
376 // geometric properties
377 QRectF geometry() const; // no default
378 void setGeometry(const QRectF &geom);
379
380 // window contents/override properties
381 QString title() const; // '' text in the titlebar (overrides author)
382 void setTitle(const QString &title);
383 QString summary() const; // '' short description (displayed if not empty)
384 void setSummary(const QString &summary);
385 QString text() const; // '' text for the window (overrides annot->contents)
386 void setText(const QString &text);
387
388 private:
389 class Private;
390 QSharedDataPointer<Private> d;
391 };
392
393 Popup popup() const;
395 void setPopup(const Popup &popup);
396
397 RevScope revisionScope() const; // Root
398
399 RevType revisionType() const; // None
400
404 std::vector<std::unique_ptr<Annotation>> revisions() const;
405
409 virtual SubType subType() const = 0;
410
416 std::unique_ptr<AnnotationAppearance> annotationAppearance() const;
417
423 void setAnnotationAppearance(const AnnotationAppearance &annotationAppearance);
424
428 virtual ~Annotation();
429
449
450protected:
452 explicit Annotation(AnnotationPrivate &dd);
453 Q_DECLARE_PRIVATE(Annotation)
454 QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr;
456
457private:
458 Q_DISABLE_COPY(Annotation)
459};
460
467class POPPLER_QT6_EXPORT TextAnnotation : public Annotation
468{
469 friend class AnnotationPrivate;
470
471public:
472 // local enums
473 enum TextType
474 {
475 Linked,
476 InPlace
477 };
478 enum InplaceIntent
479 {
480 Unknown,
481 Callout,
482 TypeWriter
483 };
484 enum InplaceAlignPosition
485 {
486 InplaceAlignLeft,
487 InplaceAlignCenter,
488 InplaceAlignRight
489 };
490
491 explicit TextAnnotation(TextType type);
492 ~TextAnnotation() override;
493 SubType subType() const override;
494
498 TextType textType() const;
499
512 QString textIcon() const;
513
519 void setTextIcon(const QString &icon);
520
521 QFont textFont() const;
522 void setTextFont(const QFont &font);
524 QColor textColor() const;
525 void setTextColor(const QColor &color);
526
527 InplaceAlignPosition inplaceAlign() const;
528 void setInplaceAlign(InplaceAlignPosition align);
529
530 QPointF calloutPoint(int id) const;
531 QVector<QPointF> calloutPoints() const;
532 void setCalloutPoints(const QVector<QPointF> &points);
533
534 InplaceIntent inplaceIntent() const;
535 void setInplaceIntent(InplaceIntent intent);
536
537private:
538 explicit TextAnnotation(TextAnnotationPrivate &dd);
539 void setTextType(TextType type);
540 Q_DECLARE_PRIVATE(TextAnnotation)
541 Q_DISABLE_COPY(TextAnnotation)
542};
543
549class POPPLER_QT6_EXPORT LineAnnotation : public Annotation
550{
551 friend class AnnotationPrivate;
552
553public:
554 // local enums
555 enum LineType
556 {
557 StraightLine,
558 Polyline
559 };
560 enum TermStyle
561 {
562 Square,
563 Circle,
564 Diamond,
565 OpenArrow,
566 ClosedArrow,
567 None,
568 Butt,
569 ROpenArrow,
570 RClosedArrow,
571 Slash
572 };
573 enum LineIntent
574 {
575 Unknown,
576 Arrow,
577 Dimension,
578 PolygonCloud
579 };
580
581 explicit LineAnnotation(LineType type);
582 ~LineAnnotation() override;
583 SubType subType() const override;
584
585 LineType lineType() const;
586
587 QVector<QPointF> linePoints() const;
588 void setLinePoints(const QVector<QPointF> &points);
589
590 TermStyle lineStartStyle() const;
591 void setLineStartStyle(TermStyle style);
592
593 TermStyle lineEndStyle() const;
594 void setLineEndStyle(TermStyle style);
595
596 bool isLineClosed() const;
597 void setLineClosed(bool closed);
598
599 QColor lineInnerColor() const;
600 void setLineInnerColor(const QColor &color);
601
602 double lineLeadingForwardPoint() const;
603 void setLineLeadingForwardPoint(double point);
604
605 double lineLeadingBackPoint() const;
606 void setLineLeadingBackPoint(double point);
607
608 bool lineShowCaption() const;
609 void setLineShowCaption(bool show);
610
611 LineIntent lineIntent() const;
612 void setLineIntent(LineIntent intent);
613
614private:
615 explicit LineAnnotation(LineAnnotationPrivate &dd);
616 void setLineType(LineType type);
617 Q_DECLARE_PRIVATE(LineAnnotation)
618 Q_DISABLE_COPY(LineAnnotation)
619};
620
627class POPPLER_QT6_EXPORT GeomAnnotation : public Annotation
628{
629 friend class AnnotationPrivate;
630
631public:
633 ~GeomAnnotation() override;
634 SubType subType() const override;
635
636 // common enums
637 enum GeomType
638 {
639 InscribedSquare,
640 InscribedCircle
641 };
642
643 GeomType geomType() const;
644 void setGeomType(GeomType type);
645
646 QColor geomInnerColor() const;
647 void setGeomInnerColor(const QColor &color);
648
649private:
650 explicit GeomAnnotation(GeomAnnotationPrivate &dd);
651 Q_DECLARE_PRIVATE(GeomAnnotation)
652 Q_DISABLE_COPY(GeomAnnotation)
653};
654
660class POPPLER_QT6_EXPORT HighlightAnnotation : public Annotation
661{
662 friend class AnnotationPrivate;
663
664public:
666 ~HighlightAnnotation() override;
667 SubType subType() const override;
668
679
685 struct Quad
686 {
687 QPointF points[4]; // 8 valid coords
688 bool capStart; // false (vtx 1-4) [K]
689 bool capEnd; // false (vtx 2-3) [K]
690 double feather; // 0.1 (in range 0..1) [K]
691 };
692
698
704
708 QList<Quad> highlightQuads() const;
709
713 void setHighlightQuads(const QList<Quad> &quads);
714
715private:
716 explicit HighlightAnnotation(HighlightAnnotationPrivate &dd);
717 Q_DECLARE_PRIVATE(HighlightAnnotation)
718 Q_DISABLE_COPY(HighlightAnnotation)
719};
720
726class POPPLER_QT6_EXPORT StampAnnotation : public Annotation
727{
728 friend class AnnotationPrivate;
729
730public:
732 ~StampAnnotation() override;
733 SubType subType() const override;
734
754 QString stampIconName() const;
755
761 void setStampIconName(const QString &name);
762
768 void setStampCustomImage(const QImage &image);
769
770private:
771 explicit StampAnnotation(StampAnnotationPrivate &dd);
772 Q_DECLARE_PRIVATE(StampAnnotation)
773 Q_DISABLE_COPY(StampAnnotation)
774};
775
786class POPPLER_QT6_EXPORT SignatureAnnotation : public Annotation
787{
788 friend class AnnotationPrivate;
789
790public:
795 {
796 SigningSuccess,
798 GenericSigningError,
799 };
800
802 ~SignatureAnnotation() override;
803 SubType subType() const override;
804
805 void setText(const QString &text);
806 void setLeftText(const QString &text);
807
811 double fontSize() const;
812 void setFontSize(double fontSize);
813
817 double leftFontSize() const;
818 void setLeftFontSize(double fontSize);
819
823 QColor fontColor() const;
824 void setFontColor(const QColor &color);
825
829 QColor borderColor() const;
830 void setBorderColor(const QColor &color);
831
837 double borderWidth() const;
838 void setBorderWidth(double width);
839
843 QColor backgroundColor() const;
844 void setBackgroundColor(const QColor &color);
845
846 QString imagePath() const;
847 void setImagePath(const QString &imagePath);
848
849 QString fieldPartialName() const;
850 void setFieldPartialName(const QString &fieldPartialName);
851
852 [[nodiscard]] SigningResult sign(const QString &outputFileName, const PDFConverter::NewSignatureData &data);
853
854private:
855 explicit SignatureAnnotation(SignatureAnnotationPrivate &dd);
856 Q_DECLARE_PRIVATE(SignatureAnnotation)
857 Q_DISABLE_COPY(SignatureAnnotation)
858};
859
865class POPPLER_QT6_EXPORT InkAnnotation : public Annotation
866{
867 friend class AnnotationPrivate;
868
869public:
871 ~InkAnnotation() override;
872 SubType subType() const override;
873
874 QList<QVector<QPointF>> inkPaths() const;
875 void setInkPaths(const QList<QVector<QPointF>> &paths);
876
877private:
878 explicit InkAnnotation(InkAnnotationPrivate &dd);
879 Q_DECLARE_PRIVATE(InkAnnotation)
880 Q_DISABLE_COPY(InkAnnotation)
881};
882
883class POPPLER_QT6_EXPORT LinkAnnotation : public Annotation
884{
885 friend class AnnotationPrivate;
886
887public:
888 ~LinkAnnotation() override;
889 SubType subType() const override;
890
891 // local enums
892 enum HighlightMode
893 {
894 None,
895 Invert,
896 Outline,
897 Push
898 };
899
900 Link *linkDestination() const;
901 void setLinkDestination(std::unique_ptr<Link> &&link);
902
903 HighlightMode linkHighlightMode() const;
904 void setLinkHighlightMode(HighlightMode mode);
905
906 QPointF linkRegionPoint(int id) const;
907 void setLinkRegionPoint(int id, const QPointF point);
908
909private:
911 explicit LinkAnnotation(LinkAnnotationPrivate &dd);
912 Q_DECLARE_PRIVATE(LinkAnnotation)
913 Q_DISABLE_COPY(LinkAnnotation)
914};
915
921class POPPLER_QT6_EXPORT CaretAnnotation : public Annotation
922{
923 friend class AnnotationPrivate;
924
925public:
927 ~CaretAnnotation() override;
928 SubType subType() const override;
929
934 {
935 None,
936 P
937 };
938
939 CaretSymbol caretSymbol() const;
940 void setCaretSymbol(CaretSymbol symbol);
941
942private:
943 explicit CaretAnnotation(CaretAnnotationPrivate &dd);
944 Q_DECLARE_PRIVATE(CaretAnnotation)
945 Q_DISABLE_COPY(CaretAnnotation)
946};
947
953class POPPLER_QT6_EXPORT FileAttachmentAnnotation : public Annotation
954{
955 friend class AnnotationPrivate;
956
957public:
958 ~FileAttachmentAnnotation() override;
959 SubType subType() const override;
960
964 QString fileIconName() const;
968 void setFileIconName(const QString &icon);
969
980
981private:
983 explicit FileAttachmentAnnotation(FileAttachmentAnnotationPrivate &dd);
984 Q_DECLARE_PRIVATE(FileAttachmentAnnotation)
985 Q_DISABLE_COPY(FileAttachmentAnnotation)
986};
987
993class POPPLER_QT6_EXPORT SoundAnnotation : public Annotation
994{
995 friend class AnnotationPrivate;
996
997public:
998 ~SoundAnnotation() override;
999 SubType subType() const override;
1000
1004 QString soundIconName() const;
1008 void setSoundIconName(const QString &icon);
1009
1020
1021private:
1023 explicit SoundAnnotation(SoundAnnotationPrivate &dd);
1024 Q_DECLARE_PRIVATE(SoundAnnotation)
1025 Q_DISABLE_COPY(SoundAnnotation)
1026};
1027
1033class POPPLER_QT6_EXPORT MovieAnnotation : public Annotation
1034{
1035 friend class AnnotationPrivate;
1036
1037public:
1038 ~MovieAnnotation() override;
1039 SubType subType() const override;
1040
1050 void setMovie(MovieObject *movie);
1051
1055 QString movieTitle() const;
1059 void setMovieTitle(const QString &title);
1060
1061private:
1063 explicit MovieAnnotation(MovieAnnotationPrivate &dd);
1064 Q_DECLARE_PRIVATE(MovieAnnotation)
1065 Q_DISABLE_COPY(MovieAnnotation)
1066};
1067
1073class POPPLER_QT6_EXPORT ScreenAnnotation : public Annotation
1074{
1075 friend class AnnotationPrivate;
1076
1077public:
1078 ~ScreenAnnotation() override;
1079
1080 SubType subType() const override;
1081
1086
1093
1097 QString screenTitle() const;
1098
1102 void setScreenTitle(const QString &title);
1103
1108 std::unique_ptr<Link> additionalAction(AdditionalActionType type) const;
1109
1110private:
1112 explicit ScreenAnnotation(ScreenAnnotationPrivate &dd);
1113 Q_DECLARE_PRIVATE(ScreenAnnotation)
1114 Q_DISABLE_COPY(ScreenAnnotation)
1115};
1116
1125class POPPLER_QT6_EXPORT WidgetAnnotation : public Annotation
1126{
1127 friend class AnnotationPrivate;
1128
1129public:
1130 ~WidgetAnnotation() override;
1131
1132 SubType subType() const override;
1133
1138 std::unique_ptr<Link> additionalAction(AdditionalActionType type) const;
1139
1140private:
1142 explicit WidgetAnnotation(WidgetAnnotationPrivate &dd);
1143 Q_DECLARE_PRIVATE(WidgetAnnotation)
1144 Q_DISABLE_COPY(WidgetAnnotation)
1145};
1146
1152class POPPLER_QT6_EXPORT RichMediaAnnotation : public Annotation
1153{
1154 friend class AnnotationPrivate;
1155
1156public:
1157 ~RichMediaAnnotation() override;
1158
1159 SubType subType() const override;
1160
1169 class POPPLER_QT6_EXPORT Params
1170 {
1171 friend class AnnotationPrivate;
1172
1173 public:
1174 Params();
1175 ~Params();
1176
1180 QString flashVars() const;
1181
1182 private:
1183 void setFlashVars(const QString &flashVars);
1184
1185 class Private;
1186 QScopedPointer<Private> d;
1187 };
1188
1196 class POPPLER_QT6_EXPORT Instance
1197 {
1198 friend class AnnotationPrivate;
1199
1200 public:
1204 enum Type
1205 {
1209 TypeVideo
1211
1212 Instance();
1213 ~Instance();
1214
1218 Type type() const;
1219
1224
1225 private:
1226 void setType(Type type);
1227 void setParams(RichMediaAnnotation::Params *params);
1228
1229 class Private;
1230 QScopedPointer<Private> d;
1231 };
1232
1239 class POPPLER_QT6_EXPORT Configuration
1240 {
1241 friend class AnnotationPrivate;
1242
1243 public:
1247 enum Type
1248 {
1252 TypeVideo
1254
1255 Configuration();
1257
1261 Type type() const;
1262
1266 QString name() const;
1267
1271 QList<RichMediaAnnotation::Instance *> instances() const;
1272
1273 private:
1274 void setType(Type type);
1275 void setName(const QString &name);
1276 void setInstances(const QList<RichMediaAnnotation::Instance *> &instances);
1277
1278 class Private;
1279 QScopedPointer<Private> d;
1280 };
1281
1289 class POPPLER_QT6_EXPORT Asset
1290 {
1291 friend class AnnotationPrivate;
1292
1293 public:
1294 Asset();
1295 ~Asset();
1296
1300 QString name() const;
1301
1306
1307 private:
1308 void setName(const QString &name);
1309 void setEmbeddedFile(EmbeddedFile *embeddedFile);
1310
1311 class Private;
1312 QScopedPointer<Private> d;
1313 };
1314
1321 class POPPLER_QT6_EXPORT Content
1322 {
1323 friend class AnnotationPrivate;
1324
1325 public:
1326 Content();
1327 ~Content();
1328
1332 QList<RichMediaAnnotation::Configuration *> configurations() const;
1333
1337 QList<RichMediaAnnotation::Asset *> assets() const;
1338
1339 private:
1340 void setConfigurations(const QList<RichMediaAnnotation::Configuration *> &configurations);
1341 void setAssets(const QList<RichMediaAnnotation::Asset *> &assets);
1342
1343 class Private;
1344 QScopedPointer<Private> d;
1345 };
1346
1353 class POPPLER_QT6_EXPORT Activation
1354 {
1355 friend class AnnotationPrivate;
1356
1357 public:
1362 {
1365 UserAction
1367
1368 Activation();
1369 ~Activation();
1370
1375
1376 private:
1377 void setCondition(Condition condition);
1378
1379 class Private;
1380 QScopedPointer<Private> d;
1381 };
1382
1389 class POPPLER_QT6_EXPORT Deactivation
1390 {
1391 friend class AnnotationPrivate;
1392
1393 public:
1398 {
1401 UserAction
1403
1404 Deactivation();
1405 ~Deactivation();
1406
1411
1412 private:
1413 void setCondition(Condition condition);
1414
1415 class Private;
1416 QScopedPointer<Private> d;
1417 };
1418
1425 class POPPLER_QT6_EXPORT Settings
1426 {
1427 friend class AnnotationPrivate;
1428
1429 public:
1430 Settings();
1431 ~Settings();
1432
1437
1442
1443 private:
1444 void setActivation(RichMediaAnnotation::Activation *activation);
1445 void setDeactivation(RichMediaAnnotation::Deactivation *deactivation);
1446
1447 class Private;
1448 QScopedPointer<Private> d;
1449 };
1450
1455
1460
1461private:
1462 void setSettings(RichMediaAnnotation::Settings *settings);
1463 void setContent(RichMediaAnnotation::Content *content);
1464
1466 explicit RichMediaAnnotation(RichMediaAnnotationPrivate &dd);
1467 Q_DECLARE_PRIVATE(RichMediaAnnotation)
1468 Q_DISABLE_COPY(RichMediaAnnotation)
1469};
1470
1471}
1472
1473#endif
AnnotationAppearance class wrapping Poppler's AP stream object.
Definition poppler-annotation.h:90
Container class for Annotation pop-up window information.
Definition poppler-annotation.h:365
Container class for Annotation style information.
Definition poppler-annotation.h:322
Annotation class holding properties shared by all annotations.
Definition poppler-annotation.h:176
void setFlags(Flags flags)
Sets this annotation's flags.
std::unique_ptr< AnnotationAppearance > annotationAppearance() const
Returns the current appearance stream of this annotation.
SubType
Annotation subclasses.
Definition poppler-annotation.h:189
void setAuthor(const QString &author)
Sets a new author for the annotation.
void setPopup(const Popup &popup)
QRectF boundary() const
Returns this annotation's boundary rectangle in normalized coordinates.
void setAnnotationAppearance(const AnnotationAppearance &annotationAppearance)
Sets the annotation's appearance stream with the annotationAppearance.
std::vector< std::unique_ptr< Annotation > > revisions() const
Returns the revisions of this annotation.
Flag
Annotation flags.
Definition poppler-annotation.h:215
QString author() const
Returns the author of the annotation.
void setUniqueName(const QString &uniqueName)
Sets a new unique name for the annotation.
Flags flags() const
Returns this annotation's flags.
virtual ~Annotation()
Destructor.
QString uniqueName() const
Returns the unique name (ID) of the annotation.
void setBoundary(const QRectF &boundary)
Sets this annotation's boundary rectangle.
AdditionalActionType
Describes the flags from an annotations 'AA' dictionary.
Definition poppler-annotation.h:437
@ MouseReleasedAction
Performed when the mouse button is released inside the annotation's active area.
Definition poppler-annotation.h:441
@ FocusInAction
Performed when the annotation receives the input focus.
Definition poppler-annotation.h:442
@ PageOpeningAction
Performed when the page containing the annotation is opened.
Definition poppler-annotation.h:444
@ MousePressedAction
Performed when the mouse button is pressed inside the annotation's active area.
Definition poppler-annotation.h:440
@ FocusOutAction
Performed when the annotation loses the input focus.
Definition poppler-annotation.h:443
@ PageClosingAction
Performed when the page containing the annotation is closed.
Definition poppler-annotation.h:445
@ CursorLeavingAction
Performed when the cursor exists the annotation's active area.
Definition poppler-annotation.h:439
@ PageVisibleAction
Performed when the page containing the annotation becomes visible.
Definition poppler-annotation.h:446
@ CursorEnteringAction
Performed when the cursor enters the annotation's active area.
Definition poppler-annotation.h:438
virtual SubType subType() const =0
The type of the annotation.
Caret annotation.
Definition poppler-annotation.h:922
SubType subType() const override
The type of the annotation.
CaretSymbol
The symbols for the caret annotation.
Definition poppler-annotation.h:934
Container class for an embedded file with a PDF document.
Definition poppler-qt6.h:339
File attachment annotation.
Definition poppler-annotation.h:954
void setFileIconName(const QString &icon)
Sets a new name for the icon of this annotation.
QString fileIconName() const
Returns the name of the icon of this annotation.
void setEmbeddedFile(EmbeddedFile *ef)
Sets a new EmbeddedFile for this annotation.
EmbeddedFile * embeddedFile() const
Returns the EmbeddedFile of this annotation.
SubType subType() const override
The type of the annotation.
Geometric annotation.
Definition poppler-annotation.h:628
SubType subType() const override
The type of the annotation.
Text highlight annotation.
Definition poppler-annotation.h:661
void setHighlightQuads(const QList< Quad > &quads)
Set the areas to highlight.
QList< Quad > highlightQuads() const
The list of areas to highlight.
void setHighlightType(HighlightType type)
Set the type of highlighting to use for the given area or areas.
SubType subType() const override
The type of the annotation.
HighlightType highlightType() const
The type (style) of highlighting to use for this area or these areas.
HighlightType
The type of highlight.
Definition poppler-annotation.h:673
@ Squiggly
jagged or squiggly underline
Definition poppler-annotation.h:675
@ Underline
straight line underline
Definition poppler-annotation.h:676
@ Highlight
highlighter pen style annotation
Definition poppler-annotation.h:674
Ink Annotation.
Definition poppler-annotation.h:866
SubType subType() const override
The type of the annotation.
Polygon/polyline annotation.
Definition poppler-annotation.h:550
SubType subType() const override
The type of the annotation.
Definition poppler-annotation.h:884
SubType subType() const override
The type of the annotation.
Movie: a movie to be played.
Definition poppler-link.h:577
Rendition: Rendition link.
Definition poppler-link.h:475
Movie annotation.
Definition poppler-annotation.h:1034
void setMovieTitle(const QString &title)
Sets a new title for the movie of this annotation.
MovieObject * movie() const
Returns the MovieObject of this annotation.
SubType subType() const override
The type of the annotation.
void setMovie(MovieObject *movie)
Sets a new MovieObject for this annotation.
QString movieTitle() const
Returns the title of the movie of this annotation.
Container class for a movie object in a PDF document.
Definition poppler-qt6.h:1875
A page in a document.
Definition poppler-qt6.h:425
The activation object of the RichMediaAnnotation::Settings object.
Definition poppler-annotation.h:1354
Condition
Describes the condition for activating the rich media.
Definition poppler-annotation.h:1362
@ PageVisible
Activate when page becomes visible.
Definition poppler-annotation.h:1364
@ PageOpened
Activate when page is opened.
Definition poppler-annotation.h:1363
Condition condition() const
Returns the activation condition.
The asset object of a RichMediaAnnotation::Content object.
Definition poppler-annotation.h:1290
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:1240
Type
Describes the media type of the configuration.
Definition poppler-annotation.h:1248
@ Type3D
A 3D media file.
Definition poppler-annotation.h:1249
@ TypeSound
A sound media file.
Definition poppler-annotation.h:1251
@ TypeFlash
A Flash media file.
Definition poppler-annotation.h:1250
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:1322
QList< RichMediaAnnotation::Configuration * > configurations() const
Returns the list of configuration objects of the content object.
QList< RichMediaAnnotation::Asset * > assets() const
Returns the list of asset objects of the content object.
The deactivation object of the RichMediaAnnotation::Settings object.
Definition poppler-annotation.h:1390
Condition
Describes the condition for deactivating the rich media.
Definition poppler-annotation.h:1398
@ PageClosed
Deactivate when page is closed.
Definition poppler-annotation.h:1399
@ PageInvisible
Deactivate when page becomes invisible.
Definition poppler-annotation.h:1400
Condition condition() const
Returns the deactivation condition.
The instance object of a RichMediaAnnotation::Configuration object.
Definition poppler-annotation.h:1197
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:1205
@ TypeFlash
A Flash media file.
Definition poppler-annotation.h:1207
@ TypeSound
A sound media file.
Definition poppler-annotation.h:1208
@ Type3D
A 3D media file.
Definition poppler-annotation.h:1206
Type type() const
Returns the media type of the instance.
The params object of a RichMediaAnnotation::Instance object.
Definition poppler-annotation.h:1170
QString flashVars() const
Returns the parameters for the flash player.
The settings object of a RichMediaAnnotation.
Definition poppler-annotation.h:1426
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:1153
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:1074
LinkRendition * action() const
Returns the LinkRendition of this annotation.
SubType subType() const override
The type of the annotation.
void setAction(LinkRendition *action)
Sets a new LinkRendition for this annotation.
std::unique_ptr< Link > additionalAction(AdditionalActionType type) const
Returns the additional action of the given type for the annotation or 0 if no action has been defined...
void setScreenTitle(const QString &title)
Sets a new title for the screen of this annotation.
QString screenTitle() const
Returns the title of the screen of this annotation.
Signature annotation.
Definition poppler-annotation.h:787
double fontSize() const
Default: 10.
QColor borderColor() const
Default: red.
double borderWidth() const
border width in points
double leftFontSize() const
Default: 20.
QColor fontColor() const
Default: red.
QColor backgroundColor() const
Default: QColor(240, 240, 240)
SubType subType() const override
The type of the annotation.
SigningResult
Definition poppler-annotation.h:795
@ FieldAlreadySigned
Trying to sign a field that is already signed.
Definition poppler-annotation.h:797
Sound annotation.
Definition poppler-annotation.h:994
SubType subType() const override
The type of the annotation.
void setSound(SoundObject *s)
Sets a new SoundObject for this annotation.
void setSoundIconName(const QString &icon)
Sets a new name for the icon of this annotation.
QString soundIconName() const
Returns the name of the icon of this annotation.
SoundObject * sound() const
Returns the SoundObject of this annotation.
Container class for a sound file in a PDF document.
Definition poppler-qt6.h:1799
Stamp annotation.
Definition poppler-annotation.h:727
SubType subType() const override
The type of the annotation.
void setStampCustomImage(const QImage &image)
Set a custom icon for this stamp annotation.
void setStampIconName(const QString &name)
Set the icon type for this stamp annotation.
QString stampIconName() const
The name of the icon for this stamp annotation.
Annotation containing text.
Definition poppler-annotation.h:468
QString textIcon() const
The name of the icon for this text annotation.
TextType textType() const
The type of text annotation represented by this object.
void setTextIcon(const QString &icon)
Set the name of the icon to use for this text annotation.
SubType subType() const override
The type of the annotation.
QColor textColor() const
Default text color is black.
Widget annotation.
Definition poppler-annotation.h:1126
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:50
Structure corresponding to a QuadPoints array.
Definition poppler-annotation.h:686