API Documentation
Loading...
Searching...
No Matches
PrintPreview Class Reference

A dialog that shows a PrintPreview of a given widgets, reports, or images. User can modify print settings and print directly from this dialog. More...

#include <PrintPreview.h>

Inheritance diagram for PrintPreview:
[legend]
Collaboration diagram for PrintPreview:
[legend]

Signals

void finishedSignal ()
 
void pageResolutionChangedSignal (Vector< 2, uint04 > pixel_size)
 
void printedSignal ()
 
void zoomModeChangedSignal ()
 

Public Member Functions

void clearImages ()
 
Vector< 2, fltp08customPercent () const
 
bool event (QEvent *event) override
 
bool isCustomPercent () const
 
bool isZoomMode () const
 
Vector< 2, uint04pageResolution () const
 
QPageSetupDialog * pageSetupDialog ()
 
QPalette printPalette () const
 
 PrintPreview (QWidget *parent=nullptr)
 
QPrintDialog * printSetupDialog ()
 
void printWidget (QWidget *widget, const Buffer< QWidget * > &custom_print_options=Buffer< QWidget * >())
 
void printWidgets (const Buffer< QWidget * > &widgets, const Buffer< QWidget * > &custom_print_options=Buffer< QWidget * >())
 
void printWidgets (const DynamicPointer< WidgetIterator > &reports, const Buffer< QWidget * > &custom_print_options=Buffer< QWidget * >())
 
void resetPreferredSize ()
 
Vector< 2, uint04scaledPageResolution () const
 
void setCustomPrintSettingsWidgets (const Buffer< QWidget * > &widgets)
 
void setImage (uint04 index, const QImage &image, const Buffer< QWidget * > &custom_print_options=Buffer< QWidget * >())
 
void setImages (const Buffer< QImage, uint04, ObjectAllocator< false > > &images, const Buffer< QWidget * > &custom_print_options=Buffer< QWidget * >())
 
void setPreferredSize (QSize prefered_size)
 
void setPrintFont (const QFont &font)
 
virtual QSize sizeHint () const override
 
 ~PrintPreview ()
 

Static Public Member Functions

static PrintPreviewPrintPreviewWidget ()
 
static PrintPreviewPrintPreviewWidget (const Buffer< QImage > &images)
 
static bool SystemHasPrinters ()
 

Protected Slots

void choosePrinterAccepted (QPrinter *printer)
 
void fitComboChanged ()
 
void fontChanged ()
 
void pageChanged ()
 
void Print (QPrinter *printer)
 
void settingsChanged ()
 

Protected Member Functions

void printImages (QPrinter *printer)
 
void printWidget (QWidget *widget, QPainter &painter, QPoint offset)
 
void printWidgets (QPrinter *printer)
 
void setToDefaultPrinter ()
 

Protected Attributes

Buffer< QWidget * > m_custom_print_settings_widgets
 
Buffer< QImage, uint04, ObjectAllocator< false > > m_images
 
bool m_is_setting_font
 
bool m_is_virtual_printer = false
 
bool m_last_is_zoom
 
Vector< 2, uint04m_last_resolution
 
Buttonm_page_settings_button
 
QPageSetupDialog * m_page_setup_dialog
 
Buttonm_print_button
 
QFont m_print_font
 
QPrintPreviewWidget * m_print_preview
 
Buttonm_print_settings_button
 
QPrintDialog * m_print_setup_dialog
 
QPrinter * m_printer
 
DynamicPointer< WidgetIteratorm_widgets
 
Ui::PrintPreviewUI * ui
 

Detailed Description

A dialog that shows a PrintPreview of a given widgets, reports, or images. User can modify print settings and print directly from this dialog.


Constructor & Destructor Documentation

◆ PrintPreview()

PrintPreview ( QWidget * parent = nullptr)

◆ ~PrintPreview()

Member Function Documentation

◆ choosePrinterAccepted

void choosePrinterAccepted ( QPrinter * printer)
protectedslot

◆ clearImages()

void clearImages ( )

◆ customPercent()

Vector< 2, fltp08 > customPercent ( ) const

◆ event()

bool event ( QEvent * event)
override

◆ finishedSignal

void finishedSignal ( )
signal

◆ fitComboChanged

void fitComboChanged ( )
protectedslot

◆ fontChanged

void fontChanged ( )
protectedslot

◆ isCustomPercent()

bool isCustomPercent ( ) const

◆ isZoomMode()

bool isZoomMode ( ) const

◆ pageChanged

void pageChanged ( )
protectedslot

◆ pageResolution()

Vector< 2, uint04 > pageResolution ( ) const

◆ pageResolutionChangedSignal

void pageResolutionChangedSignal ( Vector< 2, uint04 > pixel_size)
signal

◆ pageSetupDialog()

QPageSetupDialog * pageSetupDialog ( )

◆ Print

void Print ( QPrinter * printer)
protectedslot

◆ printedSignal

void printedSignal ( )
signal

◆ printImages()

void printImages ( QPrinter * printer)
protected

◆ printPalette()

QPalette printPalette ( ) const

◆ PrintPreviewWidget() [1/2]

static PrintPreview * PrintPreviewWidget ( )
static

◆ PrintPreviewWidget() [2/2]

static PrintPreview * PrintPreviewWidget ( const Buffer< QImage > & images)
static

◆ printSetupDialog()

QPrintDialog * printSetupDialog ( )

◆ printWidget() [1/2]

void printWidget ( QWidget * widget,
const Buffer< QWidget * > & custom_print_options = Buffer< QWidget * >() )

◆ printWidget() [2/2]

void printWidget ( QWidget * widget,
QPainter & painter,
QPoint offset )
protected

◆ printWidgets() [1/3]

void printWidgets ( const Buffer< QWidget * > & widgets,
const Buffer< QWidget * > & custom_print_options = Buffer< QWidget * >() )

◆ printWidgets() [2/3]

void printWidgets ( const DynamicPointer< WidgetIterator > & reports,
const Buffer< QWidget * > & custom_print_options = Buffer< QWidget * >() )

◆ printWidgets() [3/3]

void printWidgets ( QPrinter * printer)
protected

◆ resetPreferredSize()

void resetPreferredSize ( )

◆ scaledPageResolution()

Vector< 2, uint04 > scaledPageResolution ( ) const

◆ setCustomPrintSettingsWidgets()

void setCustomPrintSettingsWidgets ( const Buffer< QWidget * > & widgets)

◆ setImage()

void setImage ( uint04 index,
const QImage & image,
const Buffer< QWidget * > & custom_print_options = Buffer< QWidget * >() )

◆ setImages()

void setImages ( const Buffer< QImage, uint04, ObjectAllocator< false > > & images,
const Buffer< QWidget * > & custom_print_options = Buffer< QWidget * >() )

◆ setPreferredSize()

void setPreferredSize ( QSize prefered_size)

◆ setPrintFont()

void setPrintFont ( const QFont & font)

◆ settingsChanged

void settingsChanged ( )
protectedslot

◆ setToDefaultPrinter()

void setToDefaultPrinter ( )
protected

◆ sizeHint()

virtual QSize sizeHint ( ) const
overridevirtual

◆ SystemHasPrinters()

static bool SystemHasPrinters ( )
static

◆ zoomModeChangedSignal

void zoomModeChangedSignal ( )
signal

Member Data Documentation

◆ m_custom_print_settings_widgets

Buffer<QWidget*> m_custom_print_settings_widgets
protected

◆ m_images

Buffer<QImage, uint04, ObjectAllocator<false> > m_images
protected

◆ m_is_setting_font

bool m_is_setting_font
protected

◆ m_is_virtual_printer

bool m_is_virtual_printer = false
protected

◆ m_last_is_zoom

bool m_last_is_zoom
protected

◆ m_last_resolution

Vector<2, uint04> m_last_resolution
protected

◆ m_page_settings_button

Button* m_page_settings_button
protected

◆ m_page_setup_dialog

QPageSetupDialog* m_page_setup_dialog
protected

◆ m_print_button

Button* m_print_button
protected

◆ m_print_font

QFont m_print_font
protected

◆ m_print_preview

QPrintPreviewWidget* m_print_preview
protected

◆ m_print_settings_button

Button* m_print_settings_button
protected

◆ m_print_setup_dialog

QPrintDialog* m_print_setup_dialog
protected

◆ m_printer

QPrinter* m_printer
protected

◆ m_widgets

DynamicPointer<WidgetIterator> m_widgets
protected

◆ ui

Ui::PrintPreviewUI* ui
protected

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