IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

PdfPageNavigator QML Type

History of the destinations visited within a PDF Document.

This type was introduced in Qt 5.15.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

PdfPageNavigator QML Type

  • Import Statement: import QtQuick.Pdf

  • Since:: Qt 5.15

  • Group: PdfPageNavigator is part of pdf

Detailed Description

PdfPageNavigator remembers which destinations the user has visited in a PDF document, and provides the ability to traverse backward and forward.

Property Documentation

 

[read-only] backAvailable : bool

Holds true if a back destination is available in the history.

currentLocation : point

This property holds the current location on the page that is being viewed.

currentPage : int

This property holds the current page that is being viewed. If there is no current page, it holds -1.

currentZoom : real

This property holds the magnification scale on the page that is being viewed.

[read-only] forwardAvailable : bool

Holds true if a forward destination is available in the history.

Signal Documentation

 

jumped(int page, point location, qreal zoom)

This signal is emitted when an abrupt jump occurs, to the specified page index, location on the page, and zoom level; but not when simply scrolling through the document one page at a time. That is, forward(), back() and jump() always emit this signal; update() does not.

The corresponding handler is onJumped.

Method Documentation

 

void back()

Pops the stack, updates the currentPage, currentLocation and currentZoom properties to the most-recently-viewed destination, and then emits the jumped() signal.

void forward()

Goes back to the page, location and zoom level that was being viewed before back() was called, and then emits the jumped() signal.

If a new destination was pushed since the last time back() was called, the forward() function does nothing, because there is a branch in the timeline which causes the "future" to be lost.

void jump(int page, point location, qreal zoom, bool emitJumped)

Adds the given destination, consisting of page, location, and zoom, to the history of visited locations. If emitJumped is false, the jumped() signal will not be emitted.

If forwardAvailable is true, calling this function represents a branch in the timeline which causes the "future" to be lost, and therefore forwardAvailable will change to false.

void update(int page, point location, qreal zoom)

Modifies the current destination, consisting of page, location and zoom.

This can be called periodically while the user is manually moving around the document, so that after back() is called, forward() will jump back to the most-recently-viewed destination rather than the destination that was last specified by jump().

The currentZoomChanged, currentPageChanged and currentLocationChanged signals will be emitted if the respective properties are actually changed. The jumped signal is not emitted, because this operation represents smooth movement rather than a navigational jump.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+