KD Reports  1.5
 All Classes Namespaces Functions Enumerations Enumerator Pages
Signals | Public Member Functions | Protected Member Functions | List of all members
KDReports::PreviewWidget Class Reference

#include <KDReportsPreviewWidget.h>

Inheritance diagram for KDReports::PreviewWidget:
Inheritance graph
[legend]
Collaboration diagram for KDReports::PreviewWidget:
Collaboration graph
[legend]

Signals

void pageSizeChanged (QPrinter::PageSize pageSize)
 Emitted when the user changes the page size.
 
void orientationChanged (QPrinter::Orientation orientation)
 Emitted when the user changes the page orientation.
 
void tableSettingsClicked ()
 Emitted when the table settings button has been clicked.
 

Public Member Functions

 PreviewWidget (QWidget *parent=0)
 
void setReport (KDReports::Report *report)
 
bool isSelected (int pageNumber) const
 
void setPageSizeChangeAllowed (bool b)
 
void setShowTableSettingsDialog (bool b)
 
void setWidthForEndlessPrinter (qreal widthMM)
 
KDReports::Reportreport () const
 
bool printWithDialog ()
 
void setShowPageListWidget (bool show)
 
void repaint ()
 
QSize sizeHint () const
 

Protected Member Functions

void resizeEvent (QResizeEvent *)
 Reimplemented for internal purposes.
 
bool eventFilter (QObject *, QEvent *)
 Reimplemented for internal purposes.
 

Detailed Description

The PreviewWidget class provides a widget showing the report to the user, typically used for "print preview" functionality.

Since
1.2

Constructor & Destructor Documentation

KDReports::PreviewWidget::PreviewWidget ( QWidget *  parent = 0)
explicit

Constructs a preview widget.

Member Function Documentation

bool KDReports::PreviewWidget::isSelected ( int  pageNumber) const

Return true if the page has been selected (checked) by the user.

bool KDReports::PreviewWidget::printWithDialog ( )

Show the print dialog and print the selected pages

Returns
false if the dialog was cancelled
void KDReports::PreviewWidget::repaint ( )

Updates the preview. Call this after the report has changed.

KDReports::Report* KDReports::PreviewWidget::report ( ) const
Returns
the report passed to the constructor or to setReport.
void KDReports::PreviewWidget::setPageSizeChangeAllowed ( bool  b)

Set to false if you want to prevent the user from changing the page size in the preview widget. Set to true if you want to allow the user to change the page size; note that this leads to a call to Report::setPageSize(). Changing the page size is allowed by default.

void KDReports::PreviewWidget::setReport ( KDReports::Report report)

Show a different report in the preview widget

void KDReports::PreviewWidget::setShowPageListWidget ( bool  show)

Show/hide the page list widget (with small previews) on the left.

void KDReports::PreviewWidget::setShowTableSettingsDialog ( bool  b)

Show or hide the button for configuring table settings and font scaling. The button is shown by default.

Since
1.1
void KDReports::PreviewWidget::setWidthForEndlessPrinter ( qreal  widthMM)

Sets the width of the endless printer, in case the user selects that item from the page selection combobox.

QSize KDReports::PreviewWidget::sizeHint ( ) const

Reimplemented for internal purposes.


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

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-reports/