Poppler Qt5  0.74.0
poppler-annotation.h
1 /* poppler-annotation.h: qt interface to poppler
2  * Copyright (C) 2006-2008, 2012, 2013, 2018 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  * Adapting code from
12  * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
13  *
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
27  */
28 
29 #ifndef _POPPLER_ANNOTATION_H_
30 #define _POPPLER_ANNOTATION_H_
31 
32 #include <QtCore/QDateTime>
33 #include <QtCore/QSharedDataPointer>
34 #include <QtCore/QLinkedList>
35 #include <QtCore/QList>
36 #include <QtCore/QPointF>
37 #include <QtCore/QRectF>
38 #include <QtCore/QScopedPointer>
39 #include <QtCore/QVector>
40 #include <QtGui/QColor>
41 #include <QtGui/QFont>
42 #include <QtXml/QDomDocument>
43 #include "poppler-export.h"
44 
45 namespace Poppler {
46 
47 class Annotation;
48 class AnnotationPrivate;
49 class TextAnnotationPrivate;
50 class LineAnnotationPrivate;
51 class GeomAnnotationPrivate;
52 class HighlightAnnotationPrivate;
53 class StampAnnotationPrivate;
54 class InkAnnotationPrivate;
55 class LinkAnnotationPrivate;
56 class CaretAnnotationPrivate;
57 class FileAttachmentAnnotationPrivate;
58 class SoundAnnotationPrivate;
59 class MovieAnnotationPrivate;
60 class ScreenAnnotationPrivate;
61 class WidgetAnnotationPrivate;
62 class RichMediaAnnotationPrivate;
63 class EmbeddedFile;
64 class Link;
65 class SoundObject;
66 class MovieObject;
67 class LinkRendition;
68 class Page;
69 
74 class POPPLER_QT5_EXPORT AnnotationUtils
75 {
76  public:
83  static Annotation * createAnnotation( const QDomElement & annElement );
84 
89  static void storeAnnotation( const Annotation * ann,
90  QDomElement & annElement, QDomDocument & document );
91 
96  static QDomElement findChildElement( const QDomNode & parentNode,
97  const QString & name );
98 };
99 
100 
174 class POPPLER_QT5_EXPORT Annotation
175 {
176  friend class AnnotationUtils;
177  friend class LinkMovie;
178  friend class LinkRendition;
179 
180  public:
181  // enum definitions
187  // WARNING!!! oKular uses that very same values so if you change them notify the author!
188  enum SubType
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  A_BASE = 0
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 
227  enum LineStyle { Solid = 1, Dashed = 2, Beveled = 4, Inset = 8, Underline = 16 };
228  enum LineEffect { NoEffect = 1, Cloudy = 2};
229  enum RevScope { Root = 0 , Reply = 1, Group = 2, Delete = 4 };
230  enum RevType { None = 1, Marked = 2, Unmarked = 4, Accepted = 8, Rejected = 16, Cancelled = 32, Completed = 64 };
231 
235  QString author() const;
239  void setAuthor( const QString &author );
240 
241  QString contents() const;
242  void setContents( const QString &contents );
243 
247  QString uniqueName() const;
253  void setUniqueName( const QString &uniqueName );
254 
255  QDateTime modificationDate() const;
256  void setModificationDate( const QDateTime &date );
257 
258  QDateTime creationDate() const;
259  void setCreationDate( const QDateTime &date );
260 
266  int flags() const;
272  void setFlags( int flags );
273 
279  QRectF boundary() const;
290  void setBoundary( const QRectF &boundary );
291 
297  class POPPLER_QT5_EXPORT Style
298  {
299  public:
300  Style();
301  Style( const Style &other );
302  Style& operator=( const Style &other );
303  ~Style();
304 
305  // appearance properties
306  QColor color() const; // black
307  void setColor(const QColor &color);
308  double opacity() const; // 1.0
309  void setOpacity(double opacity);
310 
311  // pen properties
312  double width() const; // 1.0
313  void setWidth(double width);
314  LineStyle lineStyle() const; // LineStyle::Solid
315  void setLineStyle(LineStyle style);
316  double xCorners() const; // 0.0
317  void setXCorners(double radius);
318  double yCorners() const; // 0.0
319  void setYCorners(double radius);
320  const QVector<double>& dashArray() const; // [ 3 ]
321  void setDashArray(const QVector<double> &array);
322 
323  // pen effects
324  LineEffect lineEffect() const; // LineEffect::NoEffect
325  void setLineEffect(LineEffect effect);
326  double effectIntensity() const; // 1.0
327  void setEffectIntensity(double intens);
328 
329  private:
330  class Private;
331  QSharedDataPointer<Private> d;
332  };
333 
335  Style style() const;
337  void setStyle( const Style& style );
338 
344  class POPPLER_QT5_EXPORT Popup
345  {
346  public:
347  Popup();
348  Popup( const Popup &other );
349  Popup& operator=( const Popup &other );
350  ~Popup();
351 
352  // window state (Hidden, FixedRotation, Deny* flags allowed)
353  int flags() const; // -1 (never initialized) -> 0 (if inited and shown)
354  void setFlags( int flags );
355 
356  // geometric properties
357  QRectF geometry() const; // no default
358  void setGeometry( const QRectF &geom );
359 
360  // window contents/override properties
361  QString title() const; // '' text in the titlebar (overrides author)
362  void setTitle( const QString &title );
363  QString summary() const; // '' short description (displayed if not empty)
364  void setSummary( const QString &summary );
365  QString text() const; // '' text for the window (overrides annot->contents)
366  void setText( const QString &text );
367 
368  private:
369  class Private;
370  QSharedDataPointer<Private> d;
371  };
372 
374  Popup popup() const;
376  void setPopup( const Popup& popup );
377 
379  RevScope revisionScope() const; // Root
380 
382  RevType revisionType() const; // None
383 
392  QList<Annotation*> revisions() const;
393 
397  virtual SubType subType() const = 0;
398 
402  virtual ~Annotation();
403 
413  {
423  PageInvisibleAction
424  };
425 
426  protected:
428  Annotation( AnnotationPrivate &dd );
429  Annotation( AnnotationPrivate &dd, const QDomNode &description );
430  void storeBaseAnnotationProperties( QDomNode & parentNode, QDomDocument & document ) const;
431  Q_DECLARE_PRIVATE( Annotation )
432  QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr;
434 
435  private:
436  virtual void store( QDomNode & parentNode, QDomDocument & document ) const = 0;
437  Q_DISABLE_COPY( Annotation )
438 };
439 
446 class POPPLER_QT5_EXPORT TextAnnotation : public Annotation
447 {
448  friend class AnnotationUtils;
449  friend class AnnotationPrivate;
450 
451  public:
452  // local enums
453  enum TextType { Linked, InPlace };
454  enum InplaceIntent { Unknown, Callout, TypeWriter };
455 
456  TextAnnotation( TextType type );
457  ~TextAnnotation();
458  SubType subType() const override;
459 
463  TextType textType() const;
464 
477  QString textIcon() const;
478 
484  void setTextIcon( const QString &icon );
485 
486  QFont textFont() const;
487  void setTextFont( const QFont &font );
489  QColor textColor() const;
491  void setTextColor( const QColor &color );
492 
493  int inplaceAlign() const;
494  void setInplaceAlign( int align );
495 
496  QPointF calloutPoint( int id ) const;
498  QVector<QPointF> calloutPoints() const;
500  void setCalloutPoints( const QVector<QPointF> &points );
501 
502  InplaceIntent inplaceIntent() const;
503  void setInplaceIntent( InplaceIntent intent );
504 
505  private:
506  TextAnnotation( const QDomNode &node );
507  TextAnnotation( TextAnnotationPrivate &dd );
508  void store( QDomNode &parentNode, QDomDocument &document ) const override;
509  void setTextType( TextType type );
510  Q_DECLARE_PRIVATE( TextAnnotation )
511  Q_DISABLE_COPY( TextAnnotation )
512 };
513 
519 class POPPLER_QT5_EXPORT LineAnnotation : public Annotation
520 {
521  friend class AnnotationUtils;
522  friend class AnnotationPrivate;
523 
524  public:
525  // local enums
527  enum LineType { StraightLine, Polyline };
528  enum TermStyle { Square, Circle, Diamond, OpenArrow, ClosedArrow, None,
529  Butt, ROpenArrow, RClosedArrow, Slash };
530  enum LineIntent { Unknown, Arrow, Dimension, PolygonCloud };
531 
533  LineAnnotation( LineType type );
534  ~LineAnnotation();
535  SubType subType() const override;
536 
538  LineType lineType() const;
539 
540  QLinkedList<QPointF> linePoints() const;
541  void setLinePoints( const QLinkedList<QPointF> &points );
542 
543  TermStyle lineStartStyle() const;
544  void setLineStartStyle( TermStyle style );
545 
546  TermStyle lineEndStyle() const;
547  void setLineEndStyle( TermStyle style );
548 
549  bool isLineClosed() const;
550  void setLineClosed( bool closed );
551 
552  QColor lineInnerColor() const;
553  void setLineInnerColor( const QColor &color );
554 
555  double lineLeadingForwardPoint() const;
556  void setLineLeadingForwardPoint( double point );
557 
558  double lineLeadingBackPoint() const;
559  void setLineLeadingBackPoint( double point );
560 
561  bool lineShowCaption() const;
562  void setLineShowCaption( bool show );
563 
564  LineIntent lineIntent() const;
565  void setLineIntent( LineIntent intent );
566 
567  private:
568  LineAnnotation( const QDomNode &node );
569  LineAnnotation( LineAnnotationPrivate &dd );
570  void store( QDomNode &parentNode, QDomDocument &document ) const override;
571  void setLineType( LineType type );
572  Q_DECLARE_PRIVATE( LineAnnotation )
573  Q_DISABLE_COPY( LineAnnotation )
574 };
575 
582 class POPPLER_QT5_EXPORT GeomAnnotation : public Annotation
583 {
584  friend class AnnotationUtils;
585  friend class AnnotationPrivate;
586 
587  public:
588  GeomAnnotation();
589  ~GeomAnnotation();
590  SubType subType() const override;
591 
592  // common enums
593  enum GeomType { InscribedSquare, InscribedCircle };
594 
595  GeomType geomType() const;
596  void setGeomType( GeomType style );
597 
598  QColor geomInnerColor() const;
599  void setGeomInnerColor( const QColor &color );
600 
601  private:
602  GeomAnnotation( const QDomNode &node );
603  GeomAnnotation( GeomAnnotationPrivate &dd );
604  void store( QDomNode &parentNode, QDomDocument &document ) const override;
605  Q_DECLARE_PRIVATE( GeomAnnotation )
606  Q_DISABLE_COPY( GeomAnnotation )
607 };
608 
614 class POPPLER_QT5_EXPORT HighlightAnnotation : public Annotation
615 {
616  friend class AnnotationUtils;
617  friend class AnnotationPrivate;
618 
619  public:
622  SubType subType() const override;
623 
627  enum HighlightType { Highlight,
630  StrikeOut
631  };
632 
638  struct Quad
639  {
640  QPointF points[4]; // 8 valid coords
641  bool capStart; // false (vtx 1-4) [K]
642  bool capEnd; // false (vtx 2-3) [K]
643  double feather; // 0.1 (in range 0..1) [K]
644  };
645 
650  HighlightType highlightType() const;
651 
656  void setHighlightType( HighlightType type );
657 
661  QList< Quad > highlightQuads() const;
662 
666  void setHighlightQuads( const QList< Quad > &quads );
667 
668  private:
669  HighlightAnnotation( const QDomNode &node );
670  HighlightAnnotation( HighlightAnnotationPrivate &dd );
671  void store( QDomNode &parentNode, QDomDocument &document ) const override;
672  Q_DECLARE_PRIVATE( HighlightAnnotation )
673  Q_DISABLE_COPY( HighlightAnnotation )
674 };
675 
681 class POPPLER_QT5_EXPORT StampAnnotation : public Annotation
682 {
683  friend class AnnotationUtils;
684  friend class AnnotationPrivate;
685 
686  public:
687  StampAnnotation();
688  ~StampAnnotation();
689  SubType subType() const override;
690 
710  QString stampIconName() const;
711 
717  void setStampIconName( const QString &name );
718 
719  private:
720  StampAnnotation( const QDomNode &node );
721  StampAnnotation( StampAnnotationPrivate &dd );
722  void store( QDomNode &parentNode, QDomDocument &document ) const override;
723  Q_DECLARE_PRIVATE( StampAnnotation )
724  Q_DISABLE_COPY( StampAnnotation )
725 };
726 
732 class POPPLER_QT5_EXPORT InkAnnotation : public Annotation
733 {
734  friend class AnnotationUtils;
735  friend class AnnotationPrivate;
736 
737  public:
738  InkAnnotation();
739  ~InkAnnotation();
740  SubType subType() const override;
741 
742  QList< QLinkedList<QPointF> > inkPaths() const;
743  void setInkPaths( const QList< QLinkedList<QPointF> > &paths );
744 
745  private:
746  InkAnnotation( const QDomNode &node );
747  void store( QDomNode &parentNode, QDomDocument &document ) const override;
748  InkAnnotation(InkAnnotationPrivate &dd);
749  Q_DECLARE_PRIVATE( InkAnnotation )
750  Q_DISABLE_COPY( InkAnnotation )
751 };
752 
753 class POPPLER_QT5_EXPORT LinkAnnotation : public Annotation
754 {
755  friend class AnnotationUtils;
756  friend class AnnotationPrivate;
757 
758  public:
759  ~LinkAnnotation();
760  SubType subType() const override;
761 
762  // local enums
763  enum HighlightMode { None, Invert, Outline, Push };
764 
766  Link* linkDestination() const;
767  void setLinkDestination( Link *link );
768 
769  HighlightMode linkHighlightMode() const;
770  void setLinkHighlightMode( HighlightMode mode );
771 
772  QPointF linkRegionPoint( int id ) const;
773  // TODO Next ABI break, remove ref from point
774  void setLinkRegionPoint( int id, const QPointF &point );
775 
776  private:
777  LinkAnnotation();
778  LinkAnnotation( const QDomNode &node );
779  LinkAnnotation( LinkAnnotationPrivate &dd );
780  void store( QDomNode &parentNode, QDomDocument &document ) const override;
781  Q_DECLARE_PRIVATE( LinkAnnotation )
782  Q_DISABLE_COPY( LinkAnnotation )
783 };
784 
790 class POPPLER_QT5_EXPORT CaretAnnotation : public Annotation
791 {
792  friend class AnnotationUtils;
793  friend class AnnotationPrivate;
794 
795  public:
796  CaretAnnotation();
797  ~CaretAnnotation();
798  SubType subType() const override;
799 
803  enum CaretSymbol { None, P };
804 
805  CaretSymbol caretSymbol() const;
806  void setCaretSymbol( CaretSymbol symbol );
807 
808  private:
809  CaretAnnotation( const QDomNode &node );
810  CaretAnnotation( CaretAnnotationPrivate &dd );
811  void store( QDomNode &parentNode, QDomDocument &document ) const override;
812  Q_DECLARE_PRIVATE( CaretAnnotation )
813  Q_DISABLE_COPY( CaretAnnotation )
814 };
815 
823 class POPPLER_QT5_EXPORT FileAttachmentAnnotation : public Annotation
824 {
825  friend class AnnotationPrivate;
826 
827  public:
829  SubType subType() const override;
830 
834  QString fileIconName() const;
838  void setFileIconName( const QString &icon );
839 
843  EmbeddedFile* embeddedFile() const;
849  void setEmbeddedFile( EmbeddedFile *ef );
850 
851  private:
853  FileAttachmentAnnotation( const QDomNode &node );
854  FileAttachmentAnnotation( FileAttachmentAnnotationPrivate &dd );
855  void store( QDomNode &parentNode, QDomDocument &document ) const override;
856  Q_DECLARE_PRIVATE( FileAttachmentAnnotation )
857  Q_DISABLE_COPY( FileAttachmentAnnotation )
858 };
859 
867 class POPPLER_QT5_EXPORT SoundAnnotation : public Annotation
868 {
869  friend class AnnotationPrivate;
870 
871  public:
872  ~SoundAnnotation();
873  SubType subType() const override;
874 
878  QString soundIconName() const;
882  void setSoundIconName( const QString &icon );
883 
887  SoundObject* sound() const;
893  void setSound( SoundObject *ef );
894 
895  private:
896  SoundAnnotation();
897  SoundAnnotation( const QDomNode &node );
898  SoundAnnotation( SoundAnnotationPrivate &dd );
899  void store( QDomNode &parentNode, QDomDocument &document ) const override;
900  Q_DECLARE_PRIVATE( SoundAnnotation )
901  Q_DISABLE_COPY( SoundAnnotation )
902 };
903 
911 class POPPLER_QT5_EXPORT MovieAnnotation : public Annotation
912 {
913  friend class AnnotationPrivate;
914 
915  public:
916  ~MovieAnnotation();
917  SubType subType() const override;
918 
922  MovieObject* movie() const;
928  void setMovie( MovieObject *movie );
929 
933  QString movieTitle() const;
937  void setMovieTitle( const QString &title );
938 
939  private:
940  MovieAnnotation();
941  MovieAnnotation( const QDomNode &node );
942  MovieAnnotation( MovieAnnotationPrivate &dd );
943  void store( QDomNode &parentNode, QDomDocument &document ) const override;
944  Q_DECLARE_PRIVATE( MovieAnnotation )
945  Q_DISABLE_COPY( MovieAnnotation )
946 };
947 
955 class POPPLER_QT5_EXPORT ScreenAnnotation : public Annotation
956 {
957  friend class AnnotationPrivate;
958 
959  public:
960  ~ScreenAnnotation();
961 
962  SubType subType() const override;
963 
967  LinkRendition* action() const;
968 
974  void setAction( LinkRendition *action );
975 
979  QString screenTitle() const;
980 
984  void setScreenTitle( const QString &title );
985 
992  Link* additionalAction( AdditionalActionType type ) const;
993 
994  private:
996  ScreenAnnotation( ScreenAnnotationPrivate &dd );
997  void store( QDomNode &parentNode, QDomDocument &document ) const override; // stub
998  Q_DECLARE_PRIVATE( ScreenAnnotation )
999  Q_DISABLE_COPY( ScreenAnnotation )
1000 };
1001 
1012 class POPPLER_QT5_EXPORT WidgetAnnotation : public Annotation
1013 {
1014  friend class AnnotationPrivate;
1015 
1016  public:
1017  ~WidgetAnnotation();
1018 
1019  SubType subType() const override;
1020 
1027  Link* additionalAction( AdditionalActionType type ) const;
1028 
1029  private:
1030  WidgetAnnotation();
1031  WidgetAnnotation( WidgetAnnotationPrivate &dd );
1032  void store( QDomNode &parentNode, QDomDocument &document ) const override; // stub
1033  Q_DECLARE_PRIVATE( WidgetAnnotation )
1034  Q_DISABLE_COPY( WidgetAnnotation )
1035 };
1036 
1044 class POPPLER_QT5_EXPORT RichMediaAnnotation : public Annotation
1045 {
1046  friend class AnnotationPrivate;
1047 
1048  public:
1050 
1051  SubType subType() const override;
1052 
1061  class POPPLER_QT5_EXPORT Params
1062  {
1063  friend class AnnotationPrivate;
1064 
1065  public:
1066  Params();
1067  ~Params();
1068 
1072  QString flashVars() const;
1073 
1074  private:
1075  void setFlashVars( const QString &flashVars );
1076 
1077  class Private;
1078  QScopedPointer<Private> d;
1079  };
1080 
1088  class POPPLER_QT5_EXPORT Instance
1089  {
1090  friend class AnnotationPrivate;
1091 
1092  public:
1096  enum Type
1097  {
1101  TypeVideo
1102  };
1103 
1104  Instance();
1105  ~Instance();
1106 
1110  Type type() const;
1111 
1115  RichMediaAnnotation::Params* params() const;
1116 
1117  private:
1118  void setType( Type type );
1119  void setParams( RichMediaAnnotation::Params *params );
1120 
1121  class Private;
1122  QScopedPointer<Private> d;
1123  };
1124 
1131  class POPPLER_QT5_EXPORT Configuration
1132  {
1133  friend class AnnotationPrivate;
1134 
1135  public:
1139  enum Type
1140  {
1144  TypeVideo
1145  };
1146 
1147  Configuration();
1148  ~Configuration();
1149 
1153  Type type() const;
1154 
1158  QString name() const;
1159 
1163  QList< RichMediaAnnotation::Instance* > instances() const;
1164 
1165  private:
1166  void setType( Type type );
1167  void setName( const QString &name );
1168  void setInstances( const QList< RichMediaAnnotation::Instance* > &instances );
1169 
1170  class Private;
1171  QScopedPointer<Private> d;
1172  };
1173 
1181  class POPPLER_QT5_EXPORT Asset
1182  {
1183  friend class AnnotationPrivate;
1184 
1185  public:
1186  Asset();
1187  ~Asset();
1188 
1192  QString name() const;
1193 
1197  EmbeddedFile* embeddedFile() const;
1198 
1199  private:
1200  void setName( const QString &name );
1201  void setEmbeddedFile( EmbeddedFile *embeddedFile );
1202 
1203  class Private;
1204  QScopedPointer<Private> d;
1205  };
1206 
1213  class POPPLER_QT5_EXPORT Content
1214  {
1215  friend class AnnotationPrivate;
1216 
1217  public:
1218  Content();
1219  ~Content();
1220 
1224  QList< RichMediaAnnotation::Configuration* > configurations() const;
1225 
1229  QList< RichMediaAnnotation::Asset* > assets() const;
1230 
1231  private:
1232  void setConfigurations( const QList< RichMediaAnnotation::Configuration* > &configurations );
1233  void setAssets( const QList< RichMediaAnnotation::Asset* > &assets );
1234 
1235  class Private;
1236  QScopedPointer<Private> d;
1237  };
1238 
1245  class POPPLER_QT5_EXPORT Activation
1246  {
1247  friend class AnnotationPrivate;
1248 
1249  public:
1253  enum Condition {
1256  UserAction
1257  };
1258 
1259  Activation();
1260  ~Activation();
1261 
1265  Condition condition() const;
1266 
1267  private:
1268  void setCondition( Condition condition );
1269 
1270  class Private;
1271  QScopedPointer<Private> d;
1272  };
1273 
1280  class POPPLER_QT5_EXPORT Deactivation
1281  {
1282  friend class AnnotationPrivate;
1283 
1284  public:
1288  enum Condition {
1291  UserAction
1292  };
1293 
1294  Deactivation();
1295  ~Deactivation();
1296 
1300  Condition condition() const;
1301 
1302  private:
1303  void setCondition( Condition condition );
1304 
1305  class Private;
1306  QScopedPointer<Private> d;
1307  };
1308 
1315  class POPPLER_QT5_EXPORT Settings
1316  {
1317  friend class AnnotationPrivate;
1318 
1319  public:
1320  Settings();
1321  ~Settings();
1322 
1326  RichMediaAnnotation::Activation* activation() const;
1327 
1331  RichMediaAnnotation::Deactivation* deactivation() const;
1332 
1333  private:
1334  void setActivation( RichMediaAnnotation::Activation *activation );
1335  void setDeactivation( RichMediaAnnotation::Deactivation *deactivation );
1336 
1337  class Private;
1338  QScopedPointer<Private> d;
1339  };
1340 
1344  RichMediaAnnotation::Settings* settings() const;
1345 
1349  RichMediaAnnotation::Content* content() const;
1350 
1351  private:
1352  void setSettings( RichMediaAnnotation::Settings *settings );
1353  void setContent( RichMediaAnnotation::Content *content );
1354 
1356  RichMediaAnnotation( const QDomNode &node );
1357  RichMediaAnnotation( RichMediaAnnotationPrivate &dd );
1358  void store( QDomNode &parentNode, QDomDocument &document ) const override;
1359  Q_DECLARE_PRIVATE( RichMediaAnnotation )
1360  Q_DISABLE_COPY( RichMediaAnnotation )
1361 };
1362 
1363 }
1364 
1365 #endif
Performed when the mouse button is released inside the annotation's active area.
Definition: poppler-annotation.h:417
Definition: poppler-annotation.h:753
Performed when the cursor exists the annotation's active area.
Definition: poppler-annotation.h:415
Condition
Describes the condition for deactivating the rich media.
Definition: poppler-annotation.h:1288
Ink Annotation.
Definition: poppler-annotation.h:732
LineType
Definition: poppler-annotation.h:527
Rendition: Rendition link.
Definition: poppler-link.h:473
Movie: a movie to be played.
Definition: poppler-link.h:577
Type
Describes the media type of the configuration.
Definition: poppler-annotation.h:1139
Annotation class holding properties shared by all annotations.
Definition: poppler-annotation.h:174
File attachment annotation.
Definition: poppler-annotation.h:823
Movie annotation.
Definition: poppler-annotation.h:911
Polygon/polyline annotation.
Definition: poppler-annotation.h:519
Performed when the annotation loses the input focus.
Definition: poppler-annotation.h:419
Container class for Annotation style information.
Definition: poppler-annotation.h:297
A sound media file.
Definition: poppler-annotation.h:1143
The deactivation object of the RichMediaAnnotation::Settings object.
Definition: poppler-annotation.h:1280
Container class for a sound file in a PDF document.
Definition: poppler-qt5.h:2101
The asset object of a RichMediaAnnotation::Content object.
Definition: poppler-annotation.h:1181
Condition
Describes the condition for activating the rich media.
Definition: poppler-annotation.h:1253
A Flash media file.
Definition: poppler-annotation.h:1142
RichMedia annotation.
Definition: poppler-annotation.h:1044
Geometric annotation.
Definition: poppler-annotation.h:582
The content object of a RichMediaAnnotation.
Definition: poppler-annotation.h:1213
Deactivate when page is closed.
Definition: poppler-annotation.h:1289
Widget annotation.
Definition: poppler-annotation.h:1012
A page in a document.
Definition: poppler-qt5.h:409
Container class for an embedded file with a PDF document.
Definition: poppler-qt5.h:320
Performed when the page containing the annotation is opened.
Definition: poppler-annotation.h:420
Helper class for (recursive) Annotation retrieval/storage.
Definition: poppler-annotation.h:74
Container class for a movie object in a PDF document.
Definition: poppler-qt5.h:2174
Annotation containing text.
Definition: poppler-annotation.h:446
jagged or squiggly underline
Definition: poppler-annotation.h:628
Performed when the annotation receives the input focus.
Definition: poppler-annotation.h:418
The instance object of a RichMediaAnnotation::Configuration object.
Definition: poppler-annotation.h:1088
A sound media file.
Definition: poppler-annotation.h:1100
Caret annotation.
Definition: poppler-annotation.h:790
Performed when the mouse button is pressed inside the annotation's active area.
Definition: poppler-annotation.h:416
CaretSymbol
The symbols for the caret annotation.
Definition: poppler-annotation.h:803
Performed when the page containing the annotation becomes visible.
Definition: poppler-annotation.h:422
SubType
Annotation subclasses.
Definition: poppler-annotation.h:188
AdditionalActionType
Describes the flags from an annotations 'AA' dictionary.
Definition: poppler-annotation.h:412
Text highlight annotation.
Definition: poppler-annotation.h:614
Screen annotation.
Definition: poppler-annotation.h:955
Sound annotation.
Definition: poppler-annotation.h:867
The params object of a RichMediaAnnotation::Instance object.
Definition: poppler-annotation.h:1061
Performed when the page containing the annotation is closed.
Definition: poppler-annotation.h:421
Activate when page becomes visible.
Definition: poppler-annotation.h:1255
The configuration object of a RichMediaAnnotation::Content object.
Definition: poppler-annotation.h:1131
Deactivate when page becomes invisible.
Definition: poppler-annotation.h:1290
Stamp annotation.
Definition: poppler-annotation.h:681
Performed when the cursor enters the annotation's active area.
Definition: poppler-annotation.h:414
A Flash media file.
Definition: poppler-annotation.h:1099
straight line underline
Definition: poppler-annotation.h:629
A 3D media file.
Definition: poppler-annotation.h:1098
Structure corresponding to a QuadPoints array.
Definition: poppler-annotation.h:638
Flag
Annotation flags.
Definition: poppler-annotation.h:215
HighlightType
The type of highlight.
Definition: poppler-annotation.h:627
The Poppler Qt5 binding.
Definition: poppler-annotation.h:45
Container class for Annotation pop-up window information.
Definition: poppler-annotation.h:344
Activate when page is opened.
Definition: poppler-annotation.h:1254
The activation object of the RichMediaAnnotation::Settings object.
Definition: poppler-annotation.h:1245
The settings object of a RichMediaAnnotation.
Definition: poppler-annotation.h:1315
A 3D media file.
Definition: poppler-annotation.h:1141
Type
Describes the media type of the instance.
Definition: poppler-annotation.h:1096