CCIMXDesktop
 
Loading...
Searching...
No Matches
CCPdfViewer Class Reference

Provides a widget to view PDF documents at the page level. More...

#include <ccpdfviewer.h>

Inheritance diagram for CCPdfViewer:

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.
 

Detailed Description

Provides a widget to view PDF documents at the page level.

This class interacts with ccpdf_tools::page_renderer to render PDF pages.

Member Enumeration Documentation

◆ ZoomDirection

enum class CCPdfViewer::ZoomDirection
strong

Specifies the direction of zooming.

Enumerator
ZOOM_IN 

Zoom in

ZOOM_OUT 

Zoom out

Constructor & Destructor Documentation

◆ CCPdfViewer()

CCPdfViewer::CCPdfViewer ( QWidget *  parent = nullptr)
explicit

Constructs a new CCPdfViewer widget.

Parameters
parentThe parent widget.

Member Function Documentation

◆ bindDocument()

bool CCPdfViewer::bindDocument ( CCPdfDocument bindDocument)

Binds a PDF document to the viewer.

Parameters
bindDocumentPointer to the CCPdfDocument to bind.
Returns
true if the document is successfully bound, false otherwise.

◆ current_zoom()

float CCPdfViewer::current_zoom ( ) const
inline

Returns the current zoom level.

Returns
The current zoom factor.

◆ fresh_zoom

void CCPdfViewer::fresh_zoom ( const ZoomDirection  direction)
inlineslot

Zooms and refreshes the rendered view.

Parameters
directionThe direction to zoom.

◆ set_zoom_step()

void CCPdfViewer::set_zoom_step ( const float  zoom_step)
inline

Sets the zoom step value.

Parameters
zoom_stepThe zoom increment or decrement per zoom action.

◆ zoom

void CCPdfViewer::zoom ( const ZoomDirection  direction)
inlineslot

Applies zoom in the specified direction.

Parameters
directionThe direction of zoom (in or out).

The documentation for this class was generated from the following files: