KD Reports API Documentation
2.2
|
#include <KDReportsPreviewWidget.h>
Signals | |
void | linkActivated (const QUrl &url) |
void | orientationChanged (QPageLayout::Orientation orientation) |
Emitted when the user changes the page orientation. More... | |
void | pageSizeChanged (const QPageSize &pageSize) |
Emitted when the user changes the page size. More... | |
void | tableSettingsClicked () |
Emitted when the table settings button has been clicked. More... | |
Public Member Functions | |
PreviewWidget (QWidget *parent=nullptr) | |
~PreviewWidget () override | |
bool | isSelected (int pageNumber) const |
bool | printWithDialog () |
void | repaint () |
KDReports::Report * | report () const |
void | setPageSizeChangeAllowed (bool b) |
void | setReport (KDReports::Report *report) |
void | setShowPageListWidget (bool show) |
void | setShowTableSettingsDialog (bool b) |
void | setWidthForEndlessPrinter (qreal widthMM) |
QSize | sizeHint () const override |
Protected Member Functions | |
bool | eventFilter (QObject *, QEvent *) override |
Reimplemented for internal purposes. . More... | |
void | resizeEvent (QResizeEvent *) override |
Reimplemented for internal purposes. . More... | |
The PreviewWidget class provides a widget showing the report to the user, typically used for "print preview" functionality.
Definition at line 29 of file KDReportsPreviewWidget.h.
|
explicit |
Constructs a preview widget.
Definition at line 594 of file KDReportsPreviewWidget.cpp.
|
override |
Definition at line 601 of file KDReportsPreviewWidget.cpp.
|
overrideprotected |
Reimplemented for internal purposes.
.
Definition at line 631 of file KDReportsPreviewWidget.cpp.
bool KDReports::PreviewWidget::isSelected | ( | int | pageNumber | ) | const |
Return true if the page has been selected (checked) by the user.
Definition at line 605 of file KDReportsPreviewWidget.cpp.
|
signal |
Emitted when the user clicked on a hyperlink
Referenced by KDReports::PreviewDialog::PreviewDialog().
|
signal |
Emitted when the user changes the page orientation.
|
signal |
Emitted when the user changes the page size.
bool KDReports::PreviewWidget::printWithDialog | ( | ) |
Show the print dialog and print the selected pages
Definition at line 666 of file KDReportsPreviewWidget.cpp.
References KDReports::AllPages.
void KDReports::PreviewWidget::repaint | ( | ) |
Updates the preview. Call this after the report has changed.
Definition at line 733 of file KDReportsPreviewWidget.cpp.
KDReports::Report * KDReports::PreviewWidget::report | ( | ) | const |
Definition at line 661 of file KDReportsPreviewWidget.cpp.
|
overrideprotected |
Reimplemented for internal purposes.
.
Definition at line 613 of file KDReportsPreviewWidget.cpp.
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.
Definition at line 618 of file KDReportsPreviewWidget.cpp.
void KDReports::PreviewWidget::setReport | ( | KDReports::Report * | report | ) |
Show a different report in the preview widget
Definition at line 697 of file KDReportsPreviewWidget.cpp.
void KDReports::PreviewWidget::setShowPageListWidget | ( | bool | show | ) |
Show/hide the page list widget (with small previews) on the left.
Definition at line 728 of file KDReportsPreviewWidget.cpp.
void KDReports::PreviewWidget::setShowTableSettingsDialog | ( | bool | b | ) |
Show or hide the button for configuring table settings and font scaling. The button is shown by default.
Definition at line 626 of file KDReportsPreviewWidget.cpp.
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.
Definition at line 656 of file KDReportsPreviewWidget.cpp.
|
override |
Reimplemented for internal purposes.
Definition at line 739 of file KDReportsPreviewWidget.cpp.
|
signal |
Emitted when the table settings button has been clicked.
Referenced by KDReports::PreviewDialog::PreviewDialog().