Documents > BPS V2 C++ API
BpsReportPreviewWidget Class Reference

Preview widget for BPS reports. More...

#include <bpsreportpreviewwidget.h>

List of all members.

Public Slots

void emitStatus ()
 Emit all status signals.
void setFitPage (bool aEnable)
 Enable/disable fitting the whole page into the widget.
void setFitWidth (bool aEnable)
 Enable/disable fitting the page width into the widget.
void setZoom (qreal aZoom)
 Set the zoom factor, where 1.0 equals 100%.
void showFirstPage ()
 Show the first page (if report has any pages).
void showLastPage ()
 Show the last page (if report has any pages).
void showNextPage ()
 Show the next page (if report has any pages).
void showPage (int aPageNo)
 Show a certain page number.
void showPreviousPage ()
 Show the previous page (if report has any pages).

Signals

void fitPageEnabled (bool aEnabled)
 This signal is emitted when page fitting is enabled or disabled.
void fitWidthEnabled (bool aEnabled)
 This signal is emitted when width fitting is enabled or disabled.
void nextPageEnabled (bool aEnable)
 This signal gets emitted when the displayed page has changed.
void pageChanged (int aPageNo)
 This signal gets emitted when the displayed page has changed.
void previousPageEnabled (bool aEnable)
 This signal gets emitted when the displayed page has changed.
void zoomChanged (qreal aZoom)
 This signal is emitted when the zoom factor changes.

Public Member Functions

 BpsReportPreviewWidget (QWidget *aParent=0)
 Default constructor.
int currentPage () const
bool hasNextPage () const
bool hasPreviousPage () const
bool isFitPage () const
bool isFitWidth () const
int pageCount () const
BpsReportreport () const
void scalePage ()
 Rescale the page, for example after resizing, maximizing and restoring.
void setReport (BpsReport *aReport)
 Set the report to be displayed.
qreal zoom () const
 Get the current zoom factor.

Detailed Description

Preview widget for BPS reports.

This is the naked preview window without controls. Use BpsReportPreview for a dialog with controls.


Constructor & Destructor Documentation

BpsReportPreviewWidget::BpsReportPreviewWidget ( QWidget *  aParent = 0)

Default constructor.

Parameters:
[in]aParentThe parent widget.

Member Function Documentation

int BpsReportPreviewWidget::currentPage ( ) const
Returns:
The current page number, or -1 if report has no pages.
void BpsReportPreviewWidget::fitPageEnabled ( bool  aEnabled) [signal]

This signal is emitted when page fitting is enabled or disabled.

Parameters:
[in]aEnabledThe new state.
void BpsReportPreviewWidget::fitWidthEnabled ( bool  aEnabled) [signal]

This signal is emitted when width fitting is enabled or disabled.

Parameters:
[in]aEnabledThe new state.
bool BpsReportPreviewWidget::hasNextPage ( ) const
Returns:
True if there are next pages.
bool BpsReportPreviewWidget::hasPreviousPage ( ) const
Returns:
True if there are previous pages.
bool BpsReportPreviewWidget::isFitPage ( ) const
Returns:
True if mode is fit whole page.
bool BpsReportPreviewWidget::isFitWidth ( ) const
Returns:
True if mode is fit page width.
void BpsReportPreviewWidget::nextPageEnabled ( bool  aEnable) [signal]

This signal gets emitted when the displayed page has changed.

Parameters:
[in]aEnableTrue if there is one or more next pages.
void BpsReportPreviewWidget::pageChanged ( int  aPageNo) [signal]

This signal gets emitted when the displayed page has changed.

Parameters:
[in]aPageNoThe new page number.
int BpsReportPreviewWidget::pageCount ( ) const
Returns:
The number of pages in the report.
void BpsReportPreviewWidget::previousPageEnabled ( bool  aEnable) [signal]

This signal gets emitted when the displayed page has changed.

Parameters:
[in]aEnableTrue if there is one or more previous pages.
BpsReport* BpsReportPreviewWidget::report ( ) const
Returns:
The currently displayed report.
void BpsReportPreviewWidget::setFitPage ( bool  aEnable) [slot]

Enable/disable fitting the whole page into the widget.

Enabling page fitting automatically disables width fitting.

Parameters:
[in]aEnableTrue to enable, false to disable page fitting.
void BpsReportPreviewWidget::setFitWidth ( bool  aEnable) [slot]

Enable/disable fitting the page width into the widget.

Enabling width fitting automatically disables page fitting.

Parameters:
[in]aEnableTrue to enable, false to disable width fitting.
void BpsReportPreviewWidget::setReport ( BpsReport aReport)

Set the report to be displayed.

The report must have been loaded in advance. If the report contains any pages, the first page will be displayed by default.

Parameters:
[in]aReportThe report to display.
void BpsReportPreviewWidget::setZoom ( qreal  aZoom) [slot]

Set the zoom factor, where 1.0 equals 100%.

This function does nothing if page or width fitting is enabled.

Parameters:
[in]aZoomThe new zoom factor to set.
void BpsReportPreviewWidget::showPage ( int  aPageNo) [slot]

Show a certain page number.

Parameters:
[in]aPageNoThe page to show.
qreal BpsReportPreviewWidget::zoom ( ) const

Get the current zoom factor.

If neither isFitPage() nor isFitWidth() is true, the zoom factor stays constant when resizing the widget.

Returns:
The current zoom factor.
void BpsReportPreviewWidget::zoomChanged ( qreal  aZoom) [signal]

This signal is emitted when the zoom factor changes.

Parameters:
[in]aZoomThe new zoom factor.

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