Finishing of outline, zoom actions

This commit is contained in:
Jakub Melka
2019-12-01 13:02:25 +01:00
parent 5954b7f409
commit 939a011ca6
14 changed files with 786 additions and 11 deletions

View File

@ -105,6 +105,11 @@ public:
/// Returns optional content activity
const PDFOptionalContentActivity* getOptionalContentActivity() const { return m_optionalContentActivity; }
/// Returns reference bounding box for correct calculation of zoom fit/fit vertical/fit horizontal.
/// If zoom is set in a way to display this bounding box on a screen, then it is assured that
/// any page on the screen will fit this bounding box, regardless of mode (single/two columns, etc.).
QSizeF getReferenceBoundingBox() const;
signals:
void drawSpaceChanged();
void repaintNeeded();
@ -175,6 +180,9 @@ public:
{
ZoomIn,
ZoomOut,
ZoomFit,
ZoomFitWidth,
ZoomFitHeight,
NavigateDocumentStart,
NavigateDocumentEnd,
NavigateNextPage,
@ -197,6 +205,18 @@ public:
/// \param zoom New zoom
void zoom(PDFReal zoom);
enum class ZoomHint
{
Fit,
FitWidth,
FitHeight
};
/// Calculates zoom using given hint (i.e. to fill whole space, fill vertical,
/// or fill horizontal).
/// \param hint Zoom hint type
PDFReal getZoomHint(ZoomHint hint) const;
/// Go to the specified page
/// \param pageIndex Page to scroll to
void goToPage(PDFInteger pageIndex);