~ubuntu-branches/ubuntu/jaunty/poppler/jaunty-security

« back to all changes in this revision

Viewing changes to qt4/src/poppler-annotation.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-01-14 16:57:14 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20090114165714-fc0eniq9604rq6u4
Tags: 0.10.3-0ubuntu1
* New upstream version
* debian/patches/60_manpages-cfg-flag.patch:
  - the change is in the new version
* debian/patches/61_manpages-hyphens.patch:
  - the change is in the new version
* debian/patches/62_pdftops-mandatory-arg.patch:
  - the change is in the new version
* debian/patches/63_do-not-make-ps-arrays-bigger-than-64k-from-big-images-in-patterns.patch:
  - the change is in the new version
* Updated for the libpoppler and libpoppler-glib soname changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* poppler-annotation.h: qt interface to poppler
2
 
 * Copyright (C) 2006, Albert Astals Cid
 
2
 * Copyright (C) 2006-2008, 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>
3
5
 * Adapting code from
4
6
 *   Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
5
7
 *
42
44
class StampAnnotationPrivate;
43
45
class InkAnnotationPrivate;
44
46
class LinkAnnotationPrivate;
 
47
class CaretAnnotationPrivate;
 
48
class FileAttachmentAnnotationPrivate;
 
49
class SoundAnnotationPrivate;
 
50
class MovieAnnotationPrivate;
 
51
class EmbeddedFile;
45
52
class Link;
 
53
class SoundObject;
 
54
class MovieObject;
46
55
 
47
56
/**
48
57
 * \short Helper class for (recursive) Annotation retrieval/storage.
87
96
    // enum definitions
88
97
    // WARNING!!! oKular uses that very same values so if you change them notify the author!
89
98
    enum SubType { AText = 1, ALine = 2, AGeom = 3, AHighlight = 4, AStamp = 5,
90
 
                   AInk = 6, ALink = 7, A_BASE = 0 };
 
99
                   AInk = 6, ALink = 7, ACaret = 8, AFileAttachment = 9, ASound = 10,
 
100
                   AMovie = 11, A_BASE = 0 };
91
101
    enum Flag { Hidden = 1, FixedSize = 2, FixedRotation = 4, DenyPrint = 8,
92
102
                DenyWrite = 16, DenyDelete = 32, ToggleHidingOnMouse = 64, External = 128 };
93
103
    enum LineStyle { Solid = 1, Dashed = 2, Beveled = 4, Inset = 8, Underline = 16 };
95
105
    enum RevScope { Reply = 1, Group = 2, Delete = 4 };
96
106
    enum RevType { None = 1,  Marked = 2, Unmarked = 4,  Accepted = 8, Rejected = 16, Cancelled = 32, Completed = 64 };
97
107
 
 
108
    /**
 
109
     * Returns the author of the annotation.
 
110
     */
98
111
    QString author() const;
 
112
    /**
 
113
     * Sets a new author for the annotation.
 
114
     */
99
115
    void setAuthor( const QString &author );
100
116
 
101
117
    QString contents() const;
102
118
    void setContents( const QString &contents );
103
119
 
 
120
    /**
 
121
     * Returns the unique name (ID) of the annotation.
 
122
     */
104
123
    QString uniqueName() const;
 
124
    /**
 
125
     * Sets a new unique name for the annotation.
 
126
     *
 
127
     * \note no check of the new uniqueName is done
 
128
     */
105
129
    void setUniqueName( const QString &uniqueName );
106
130
 
107
131
    QDateTime modificationDate() const;
168
192
    const QLinkedList< Revision >& revisions() const;
169
193
 
170
194
    // methods: query annotation's type for runtime type identification
 
195
    /**
 
196
     * The type of the annotation.
 
197
     */
171
198
    virtual SubType subType() const = 0;
172
199
 
173
 
    // methods: storage/retrieval from xml nodes
 
200
    /**
 
201
     * Save this annotation as a child of \p parentNode.
 
202
     */
174
203
    virtual void store( QDomNode & parentNode, QDomDocument & document ) const;
175
204
 
176
 
    // destructor
 
205
    /**
 
206
     * Destructor.
 
207
     */
177
208
    virtual ~Annotation();
178
209
 
179
210
  protected:
423
454
 
424
455
       Standard names for stamp annotation icons are:
425
456
       - Approved
426
 
       - Asls
 
457
       - AsIs
427
458
       - Confidential
428
459
       - Departmental
429
460
       - Draft (this is the default icon type)
499
530
    Q_DISABLE_COPY( LinkAnnotation )
500
531
};
501
532
 
 
533
/**
 
534
 * \short Caret annotation.
 
535
 *
 
536
 * The caret annotation represents a symbol to indicate the presence of text.
 
537
 */
 
538
class POPPLER_QT4_EXPORT CaretAnnotation : public Annotation
 
539
{
 
540
  public:
 
541
    CaretAnnotation();
 
542
    CaretAnnotation( const QDomNode &node );
 
543
    virtual ~CaretAnnotation();
 
544
    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
 
545
    virtual SubType subType() const;
 
546
 
 
547
    /**
 
548
     * The symbols for the caret annotation.
 
549
     */
 
550
    enum CaretSymbol { None, P };
 
551
 
 
552
    CaretSymbol caretSymbol() const;
 
553
    void setCaretSymbol( CaretSymbol symbol );
 
554
 
 
555
  private:
 
556
    Q_DECLARE_PRIVATE( CaretAnnotation )
 
557
    Q_DISABLE_COPY( CaretAnnotation )
 
558
};
 
559
 
 
560
/**
 
561
 * \short File attachment annotation.
 
562
 *
 
563
 * The file attachment annotation represents a file embedded in the document.
 
564
 *
 
565
 * \since 0.10
 
566
 */
 
567
class POPPLER_QT4_EXPORT FileAttachmentAnnotation : public Annotation
 
568
{
 
569
  public:
 
570
    FileAttachmentAnnotation();
 
571
    FileAttachmentAnnotation( const QDomNode &node );
 
572
    virtual ~FileAttachmentAnnotation();
 
573
    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
 
574
    virtual SubType subType() const;
 
575
 
 
576
    /**
 
577
     * Returns the name of the icon of this annotation.
 
578
     */
 
579
    QString fileIconName() const;
 
580
    /**
 
581
     * Sets a new name for the icon of this annotation.
 
582
     */
 
583
    void setFileIconName( const QString &icon );
 
584
 
 
585
    /**
 
586
     * Returns the EmbeddedFile of this annotation.
 
587
     */
 
588
    EmbeddedFile* embeddedFile() const;
 
589
    /**
 
590
     * Sets a new EmbeddedFile for this annotation.
 
591
     *
 
592
     * \note FileAttachmentAnnotation takes ownership of the object
 
593
     */
 
594
    void setEmbeddedFile( EmbeddedFile *ef );
 
595
 
 
596
  private:
 
597
    Q_DECLARE_PRIVATE( FileAttachmentAnnotation )
 
598
    Q_DISABLE_COPY( FileAttachmentAnnotation )
 
599
};
 
600
 
 
601
/**
 
602
 * \short Sound annotation.
 
603
 *
 
604
 * The sound annotation represents a sound to be played when activated.
 
605
 *
 
606
 * \since 0.10
 
607
 */
 
608
class POPPLER_QT4_EXPORT SoundAnnotation : public Annotation
 
609
{
 
610
  public:
 
611
    SoundAnnotation();
 
612
    SoundAnnotation( const QDomNode &node );
 
613
    virtual ~SoundAnnotation();
 
614
    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
 
615
    virtual SubType subType() const;
 
616
 
 
617
    /**
 
618
     * Returns the name of the icon of this annotation.
 
619
     */
 
620
    QString soundIconName() const;
 
621
    /**
 
622
     * Sets a new name for the icon of this annotation.
 
623
     */
 
624
    void setSoundIconName( const QString &icon );
 
625
 
 
626
    /**
 
627
     * Returns the SoundObject of this annotation.
 
628
     */
 
629
    SoundObject* sound() const;
 
630
    /**
 
631
     * Sets a new SoundObject for this annotation.
 
632
     *
 
633
     * \note SoundAnnotation takes ownership of the object
 
634
     */
 
635
    void setSound( SoundObject *ef );
 
636
 
 
637
  private:
 
638
    Q_DECLARE_PRIVATE( SoundAnnotation )
 
639
    Q_DISABLE_COPY( SoundAnnotation )
 
640
};
 
641
 
 
642
/**
 
643
 * \short Movie annotation.
 
644
 *
 
645
 * The movie annotation represents a movie to be played when activated.
 
646
 *
 
647
 * \since 0.10
 
648
 */
 
649
class POPPLER_QT4_EXPORT MovieAnnotation : public Annotation
 
650
{
 
651
  public:
 
652
    MovieAnnotation();
 
653
    MovieAnnotation( const QDomNode &node );
 
654
    virtual ~MovieAnnotation();
 
655
    virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
 
656
    virtual SubType subType() const;
 
657
 
 
658
    /**
 
659
     * Returns the MovieObject of this annotation.
 
660
     */
 
661
    MovieObject* movie() const;
 
662
    /**
 
663
     * Sets a new MovieObject for this annotation.
 
664
     *
 
665
     * \note MovieAnnotation takes ownership of the object
 
666
     */
 
667
    void setMovie( MovieObject *movie );
 
668
 
 
669
    /**
 
670
     * Returns the title of the movie of this annotation.
 
671
     */
 
672
    QString movieTitle() const;
 
673
    /**
 
674
     * Sets a new title for the movie of this annotation.
 
675
     */
 
676
    void setMovieTitle( const QString &title );
 
677
 
 
678
  private:
 
679
    Q_DECLARE_PRIVATE( MovieAnnotation )
 
680
    Q_DISABLE_COPY( MovieAnnotation )
 
681
};
 
682
 
502
683
}
503
684
 
504
685
#endif