Provides a widget to view PDF documents at the page level. More...
#include <ccpdfviewer.h>
Public Types | |
| enum class | ZoomDirection { ZOOM_IN , ZOOM_OUT } |
| Specifies the direction of zooming. More... | |
Public Slots | |
| void | zoom (const ZoomDirection direction) |
| Applies zoom in the specified direction. | |
| void | fresh_zoom (const ZoomDirection direction) |
| Zooms and refreshes the rendered view. | |
| void | fresh_render () |
| Refreshes the rendered page view. | |
Public Member Functions | |
| CCPdfViewer (QWidget *parent=nullptr) | |
| Constructs a new CCPdfViewer widget. | |
| Q_DISABLE_COPY (CCPdfViewer) | |
| disable copy object | |
| ~CCPdfViewer () | |
| Destructor. | |
| bool | bindDocument (CCPdfDocument *bindDocument) |
| Binds a PDF document to the viewer. | |
| void | unbindDocument () |
| Unbinds the currently bound document. | |
| float | current_zoom () const |
| Returns the current zoom level. | |
| void | set_zoom_step (const float zoom_step) |
| Sets the zoom step value. | |
Provides a widget to view PDF documents at the page level.
This class interacts with ccpdf_tools::page_renderer to render PDF pages.
|
strong |
|
explicit |
Constructs a new CCPdfViewer widget.
| parent | The parent widget. |
| bool CCPdfViewer::bindDocument | ( | CCPdfDocument * | bindDocument | ) |
Binds a PDF document to the viewer.
| bindDocument | Pointer to the CCPdfDocument to bind. |
|
inline |
Returns the current zoom level.
|
inlineslot |
Zooms and refreshes the rendered view.
| direction | The direction to zoom. |
|
inline |
Sets the zoom step value.
| zoom_step | The zoom increment or decrement per zoom action. |
|
inlineslot |
Applies zoom in the specified direction.
| direction | The direction of zoom (in or out). |