28#ifndef _POPPLER_LINK_H_
29#define _POPPLER_LINK_H_
31#include <QtCore/QString>
32#include <QtCore/QRectF>
33#include <QtCore/QSharedDataPointer>
34#include <QtCore/QVector>
35#include "poppler-export.h"
46class LinkExecutePrivate;
47class LinkBrowsePrivate;
48class LinkActionPrivate;
49class LinkSoundPrivate;
50class LinkJavaScriptPrivate;
51class LinkMoviePrivate;
52class LinkDestinationData;
53class LinkDestinationPrivate;
54class LinkRenditionPrivate;
55class LinkOCGStatePrivate;
57class LinkResetFormPrivate;
58class LinkSubmitFormPrivate;
61class ScreenAnnotation;
127 double bottom()
const;
128 double right()
const;
174 QSharedDataPointer<LinkDestinationPrivate> d;
188 explicit Link(
const QRectF &linkArea);
240 explicit Link(LinkPrivate &dd);
241 Q_DECLARE_PRIVATE(
Link)
323 LinkExecute(
const QRectF &linkArea,
const QString &file,
const QString ¶ms);
432 LinkSound(
const QRectF &linkArea,
double volume,
bool sync,
bool repeat,
bool mix,
SoundObject *sound);
509 [[deprecated]]
LinkRendition(
const QRectF &linkArea, ::MediaRendition *rendition,
int operation,
const QString &script,
const Ref &annotationReference);
520 LinkRendition(
const QRectF &linkArea, std::unique_ptr<::MediaRendition> &&rendition,
int operation,
const QString &script,
const Ref annotationReference);
622 LinkMovie(
const QRectF &linkArea,
Operation operation,
const QString &annotationTitle,
const Ref &annotationReference);
740 IncludeNoValueFieldsFlag = 1 << 1,
741 ExportFormatFlag = 1 << 2,
742 GetMethodFlag = 1 << 3,
743 SubmitCoordinatesFlag = 1 << 4,
745 IncludeAppendSavesFlag = 1 << 6,
746 IncludeAnnotationsFlag = 1 << 7,
747 SubmitPDFFlag = 1 << 8,
748 CanonicalFormatFlag = 1 << 9,
749 ExclNonUserAnnotsFlag = 1 << 10,
750 ExclFKeyFlag = 1 << 11,
752 EmbedFormFlag = 1 << 13,
754 Q_DECLARE_FLAGS(SubmitFormFlags, SubmitFormFlag)
770 QVector<
int> getFieldIds() const;
775 QString getUrl() const;
780 SubmitFormFlags getFlags() const;
PDF document.
Definition poppler-qt5.h:1146
"Standard" action request.
Definition poppler-link.h:376
ActionType actionType() const
The action of the current LinkAction.
LinkAction(const QRectF &linkArea, ActionType actionType)
Create a new Action link, that executes a specified action on the document.
LinkType linkType() const override
The type of this link.
~LinkAction() override
Destructor.
ActionType
The possible types of actions.
Definition poppler-link.h:382
An URL to browse.
Definition poppler-link.h:344
LinkBrowse(const QRectF &linkArea, const QString &url)
Create a new browse link.
QString url() const
The URL to open.
~LinkBrowse() override
Destructor.
LinkType linkType() const override
The type of this link.
A destination.
Definition poppler-link.h:74
Kind kind() const
The kind of destination.
LinkDestination & operator=(const LinkDestination &other)
Assignment operator.
LinkDestination(const LinkDestination &other)
Copy constructor.
double left() const
The new left for the viewport of the target page, in case it is specified to be changed (see isChange...
bool isChangeTop() const
Whether the top of the viewport on the target page should be changed.
bool isChangeLeft() const
Whether the left of the viewport on the target page should be changed.
QString destinationName() const
Return the name of this destination.
int pageNumber() const
Which page is the target of this destination.
QString toString() const
Return a string repesentation of this destination.
Kind
The possible kind of "viewport destination".
Definition poppler-link.h:80
double top() const
The new top for the viewport of the target page, in case it is specified to be changed (see isChangeT...
bool isChangeZoom() const
Whether the zoom level should be changed.
~LinkDestination()
Destructor.
Generic execution request.
Definition poppler-link.h:305
QString parameters() const
The parameters for the command.
LinkType linkType() const override
The type of this link.
QString fileName() const
The file name to be executed.
LinkExecute(const QRectF &linkArea, const QString &file, const QString ¶ms)
Create a new Execute link.
~LinkExecute() override
Destructor.
Viewport reaching request.
Definition poppler-link.h:258
LinkType linkType() const override
The type of this link.
QString fileName() const
The file name of the document the destination() refers to, or an empty string in case it refers to th...
~LinkGoto() override
Destructor.
LinkGoto(const QRectF &linkArea, QString extFileName, const LinkDestination &destination)
Create a new Goto link.
bool isExternal() const
Whether the destination is in an external document (i.e.
LinkDestination destination() const
The destination to reach.
Hide: an action to show / hide a field.
Definition poppler-link.h:674
LinkHide(LinkHidePrivate *lhidep)
Create a new Hide link.
LinkType linkType() const override
The type of this link.
~LinkHide() override
Destructor.
QVector< QString > targets() const
The fully qualified target names of the action.
bool isShowAction() const
Should this action change the visibility of the target to true.
JavaScript: a JavaScript code to be interpreted.
Definition poppler-link.h:566
~LinkJavaScript() override
Destructor.
QString script() const
The JS code.
LinkJavaScript(const QRectF &linkArea, const QString &js)
Create a new JavaScript link.
LinkType linkType() const override
The type of this link.
Movie: a movie to be played.
Definition poppler-link.h:598
~LinkMovie() override
Destructor.
Operation operation() const
Returns the operation to be performed on the movie.
Operation
Describes the operation to be performed on the movie.
Definition poppler-link.h:604
LinkType linkType() const override
The type of this link.
LinkMovie(const QRectF &linkArea, Operation operation, const QString &annotationTitle, const Ref &annotationReference)
Create a new Movie link.
bool isReferencedAnnotation(const MovieAnnotation *annotation) const
Returns whether the given annotation is the referenced movie annotation for this movie link.
OCGState: an optional content group state change.
Definition poppler-link.h:648
LinkType linkType() const override
The type of this link.
~LinkOCGState() override
Destructor.
LinkOCGState(LinkOCGStatePrivate *ocgp)
Create a new OCGState link.
Rendition: Rendition link.
Definition poppler-link.h:482
LinkType linkType() const override
The type of this link.
LinkRendition(const QRectF &linkArea, ::MediaRendition *rendition, int operation, const QString &script, const Ref &annotationReference)
Create a new rendition link.
MediaRendition * rendition() const
Returns the media rendition object if the redition provides one, 0 otherwise.
bool isReferencedAnnotation(const ScreenAnnotation *annotation) const
Returns whether the given annotation is the referenced screen annotation for this rendition link.
RenditionAction action() const
Returns the action that should be executed if a rendition object is provided.
~LinkRendition() override
Destructor.
QString script() const
The JS code that shall be executed or an empty string.
LinkRendition(const QRectF &linkArea, std::unique_ptr<::MediaRendition > &&rendition, int operation, const QString &script, const Ref annotationReference)
Create a new rendition link.
RenditionAction
Describes the possible rendition actions.
Definition poppler-link.h:490
Sound: a sound to be played.
Definition poppler-link.h:429
LinkType linkType() const override
The type of this link.
SoundObject * sound() const
The sound object to be played.
bool synchronous() const
Whether the playback of the sound should be synchronous (thus blocking, waiting for the end of the so...
~LinkSound() override
Destructor.
bool mix() const
Whether the playback of this sound can be mixed with playbacks with other sounds of the same document...
bool repeat() const
Whether the sound should be played continuously (that is, started again when it ends)
double volume() const
The volume to be used when playing the sound.
Encapsulates data that describes a link.
Definition poppler-link.h:185
virtual LinkType linkType() const
The type of this link.
QRectF linkArea() const
The area of a Page where the link should be active.
virtual ~Link()
Destructor.
QVector< Link * > nextLinks() const
Get the next links to be activated / executed after this link.
LinkType
The possible kinds of link.
Definition poppler-link.h:197
@ Browse
An URL to be browsed (eg "http://poppler.freedesktop.org")
Definition poppler-link.h:201
@ Action
A "standard" action to be executed in the viewer.
Definition poppler-link.h:202
@ JavaScript
A JavaScript code to be interpreted.
Definition poppler-link.h:206
@ Hide
An action to hide a field.
Definition poppler-link.h:208
@ ResetForm
An action to reset the form.
Definition poppler-link.h:209
@ Goto
A "Go To" link.
Definition poppler-link.h:199
@ OCGState
An Optional Content Group state change.
Definition poppler-link.h:207
@ Rendition
A rendition link.
Definition poppler-link.h:205
@ SubmitForm
An action to submit a form.
Definition poppler-link.h:210
@ Movie
An action to be executed on a movie.
Definition poppler-link.h:204
@ Sound
A link representing a sound to be played.
Definition poppler-link.h:203
@ None
Unknown link.
Definition poppler-link.h:198
@ Execute
A command to be executed.
Definition poppler-link.h:200
Movie annotation.
Definition poppler-annotation.h:1034
Model for optional content.
Definition poppler-optcontent.h:49
Screen annotation.
Definition poppler-annotation.h:1078
Container class for a sound file in a PDF document.
Definition poppler-qt5.h:2433
The Poppler Qt5 binding.
Definition poppler-annotation.h:50