29 #ifndef _POPPLER_ANNOTATION_H_ 30 #define _POPPLER_ANNOTATION_H_ 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" 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;
83 static Annotation * createAnnotation(
const QDomElement & annElement );
89 static void storeAnnotation(
const Annotation * ann,
90 QDomElement & annElement, QDomDocument & document );
96 static QDomElement findChildElement(
const QDomNode & parentNode,
97 const QString & name );
223 ToggleHidingOnMouse = 64,
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 };
235 QString author()
const;
239 void setAuthor(
const QString &author );
241 QString contents()
const;
242 void setContents(
const QString &contents );
247 QString uniqueName()
const;
253 void setUniqueName(
const QString &uniqueName );
255 QDateTime modificationDate()
const;
256 void setModificationDate(
const QDateTime &date );
258 QDateTime creationDate()
const;
259 void setCreationDate(
const QDateTime &date );
272 void setFlags(
int flags );
279 QRectF boundary()
const;
290 void setBoundary(
const QRectF &boundary );
306 QColor color()
const;
307 void setColor(
const QColor &color);
308 double opacity()
const;
309 void setOpacity(
double opacity);
312 double width()
const;
313 void setWidth(
double width);
314 LineStyle lineStyle()
const;
315 void setLineStyle(LineStyle style);
316 double xCorners()
const;
317 void setXCorners(
double radius);
318 double yCorners()
const;
319 void setYCorners(
double radius);
320 const QVector<double>& dashArray()
const;
321 void setDashArray(
const QVector<double> &array);
324 LineEffect lineEffect()
const;
325 void setLineEffect(LineEffect effect);
326 double effectIntensity()
const;
327 void setEffectIntensity(
double intens);
331 QSharedDataPointer<Private> d;
337 void setStyle(
const Style& style );
354 void setFlags(
int flags );
357 QRectF geometry()
const;
358 void setGeometry(
const QRectF &geom );
361 QString title()
const;
362 void setTitle(
const QString &title );
363 QString summary()
const;
364 void setSummary(
const QString &summary );
365 QString text()
const;
366 void setText(
const QString &text );
370 QSharedDataPointer<Private> d;
376 void setPopup(
const Popup& popup );
379 RevScope revisionScope()
const;
382 RevType revisionType()
const;
392 QList<Annotation*> revisions()
const;
397 virtual SubType subType()
const = 0;
429 Annotation( AnnotationPrivate &dd,
const QDomNode &description );
430 void storeBaseAnnotationProperties( QDomNode & parentNode, QDomDocument & document )
const;
432 QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr;
436 virtual void store( QDomNode & parentNode, QDomDocument & document )
const = 0;
449 friend class AnnotationPrivate;
453 enum TextType { Linked, InPlace };
454 enum InplaceIntent { Unknown, Callout, TypeWriter };
458 SubType subType()
const override;
463 TextType textType()
const;
477 QString textIcon()
const;
484 void setTextIcon(
const QString &icon );
486 QFont textFont()
const;
487 void setTextFont(
const QFont &font );
489 QColor textColor()
const;
491 void setTextColor(
const QColor &color );
493 int inplaceAlign()
const;
494 void setInplaceAlign(
int align );
496 QPointF calloutPoint(
int id )
const;
498 QVector<QPointF> calloutPoints()
const;
500 void setCalloutPoints(
const QVector<QPointF> &points );
502 InplaceIntent inplaceIntent()
const;
503 void setInplaceIntent( InplaceIntent intent );
508 void store( QDomNode &parentNode, QDomDocument &document )
const override;
509 void setTextType( TextType type );
522 friend class AnnotationPrivate;
528 enum TermStyle { Square, Circle, Diamond, OpenArrow, ClosedArrow, None,
529 Butt, ROpenArrow, RClosedArrow, Slash };
530 enum LineIntent { Unknown, Arrow, Dimension, PolygonCloud };
533 LineAnnotation( LineType type );
535 SubType subType()
const override;
538 LineType lineType()
const;
540 QLinkedList<QPointF> linePoints()
const;
541 void setLinePoints(
const QLinkedList<QPointF> &points );
543 TermStyle lineStartStyle()
const;
544 void setLineStartStyle( TermStyle style );
546 TermStyle lineEndStyle()
const;
547 void setLineEndStyle( TermStyle style );
549 bool isLineClosed()
const;
550 void setLineClosed(
bool closed );
552 QColor lineInnerColor()
const;
553 void setLineInnerColor(
const QColor &color );
555 double lineLeadingForwardPoint()
const;
556 void setLineLeadingForwardPoint(
double point );
558 double lineLeadingBackPoint()
const;
559 void setLineLeadingBackPoint(
double point );
561 bool lineShowCaption()
const;
562 void setLineShowCaption(
bool show );
564 LineIntent lineIntent()
const;
565 void setLineIntent( LineIntent intent );
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 )
585 friend class AnnotationPrivate;
590 SubType subType()
const override;
593 enum GeomType { InscribedSquare, InscribedCircle };
595 GeomType geomType()
const;
596 void setGeomType( GeomType style );
598 QColor geomInnerColor()
const;
599 void setGeomInnerColor(
const QColor &color );
604 void store( QDomNode &parentNode, QDomDocument &document )
const override;
617 friend class AnnotationPrivate;
622 SubType subType()
const override;
661 QList< Quad > highlightQuads()
const;
666 void setHighlightQuads(
const QList< Quad > &quads );
671 void store( QDomNode &parentNode, QDomDocument &document )
const override;
684 friend class AnnotationPrivate;
689 SubType subType()
const override;
710 QString stampIconName()
const;
717 void setStampIconName(
const QString &name );
722 void store( QDomNode &parentNode, QDomDocument &document )
const override;
735 friend class AnnotationPrivate;
740 SubType subType()
const override;
742 QList< QLinkedList<QPointF> > inkPaths()
const;
743 void setInkPaths(
const QList< QLinkedList<QPointF> > &paths );
747 void store( QDomNode &parentNode, QDomDocument &document )
const override;
756 friend class AnnotationPrivate;
760 SubType subType()
const override;
763 enum HighlightMode { None, Invert, Outline, Push };
766 Link* linkDestination()
const;
767 void setLinkDestination(
Link *link );
769 HighlightMode linkHighlightMode()
const;
770 void setLinkHighlightMode( HighlightMode mode );
772 QPointF linkRegionPoint(
int id )
const;
774 void setLinkRegionPoint(
int id,
const QPointF &point );
780 void store( QDomNode &parentNode, QDomDocument &document )
const override;
793 friend class AnnotationPrivate;
798 SubType subType()
const override;
805 CaretSymbol caretSymbol()
const;
806 void setCaretSymbol( CaretSymbol symbol );
811 void store( QDomNode &parentNode, QDomDocument &document )
const override;
825 friend class AnnotationPrivate;
829 SubType subType()
const override;
834 QString fileIconName()
const;
838 void setFileIconName(
const QString &icon );
855 void store( QDomNode &parentNode, QDomDocument &document )
const override;
869 friend class AnnotationPrivate;
873 SubType subType()
const override;
878 QString soundIconName()
const;
882 void setSoundIconName(
const QString &icon );
899 void store( QDomNode &parentNode, QDomDocument &document )
const override;
913 friend class AnnotationPrivate;
917 SubType subType()
const override;
933 QString movieTitle()
const;
937 void setMovieTitle(
const QString &title );
943 void store( QDomNode &parentNode, QDomDocument &document )
const override;
957 friend class AnnotationPrivate;
962 SubType subType()
const override;
979 QString screenTitle()
const;
984 void setScreenTitle(
const QString &title );
997 void store( QDomNode &parentNode, QDomDocument &document )
const override;
1014 friend class AnnotationPrivate;
1019 SubType subType()
const override;
1032 void store( QDomNode &parentNode, QDomDocument &document )
const override;
1046 friend class AnnotationPrivate;
1051 SubType subType()
const override;
1063 friend class AnnotationPrivate;
1072 QString flashVars()
const;
1075 void setFlashVars(
const QString &flashVars );
1078 QScopedPointer<Private> d;
1090 friend class AnnotationPrivate;
1118 void setType( Type type );
1122 QScopedPointer<Private> d;
1133 friend class AnnotationPrivate;
1158 QString name()
const;
1163 QList< RichMediaAnnotation::Instance* > instances()
const;
1166 void setType( Type type );
1167 void setName(
const QString &name );
1168 void setInstances(
const QList< RichMediaAnnotation::Instance* > &instances );
1171 QScopedPointer<Private> d;
1183 friend class AnnotationPrivate;
1192 QString name()
const;
1200 void setName(
const QString &name );
1204 QScopedPointer<Private> d;
1215 friend class AnnotationPrivate;
1224 QList< RichMediaAnnotation::Configuration* > configurations()
const;
1229 QList< RichMediaAnnotation::Asset* > assets()
const;
1232 void setConfigurations(
const QList< RichMediaAnnotation::Configuration* > &configurations );
1233 void setAssets(
const QList< RichMediaAnnotation::Asset* > &assets );
1236 QScopedPointer<Private> d;
1247 friend class AnnotationPrivate;
1265 Condition condition()
const;
1268 void setCondition( Condition condition );
1271 QScopedPointer<Private> d;
1282 friend class AnnotationPrivate;
1300 Condition condition()
const;
1303 void setCondition( Condition condition );
1306 QScopedPointer<Private> d;
1317 friend class AnnotationPrivate;
1338 QScopedPointer<Private> d;
1358 void store( QDomNode &parentNode, QDomDocument &document )
const override;
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
Ink Annotation.
Definition: poppler-annotation.h:732
LineType
Definition: poppler-annotation.h:527
Rendition: Rendition link.
Definition: poppler-link.h:473
Encapsulates data that describes a link.
Definition: poppler-link.h:178
Movie: a movie to be played.
Definition: poppler-link.h:577
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
Container class for a sound file in a PDF document.
Definition: poppler-qt5.h:2101
Geometric annotation.
Definition: poppler-annotation.h:582
The content object of a RichMediaAnnotation.
Definition: poppler-annotation.h:1213
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
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
Performed when the page containing the annotation is closed.
Definition: poppler-annotation.h:421
Stamp annotation.
Definition: poppler-annotation.h:681
Performed when the cursor enters the annotation's active area.
Definition: poppler-annotation.h:414
straight line underline
Definition: poppler-annotation.h:629
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