BPS C++ API  2.24.4
bpsreportpreviewwidget.h
Go to the documentation of this file.
1 
4 #ifndef BPSREPORTPREVIEWWIDGET_H
5 #define BPSREPORTPREVIEWWIDGET_H
6 
7 #include "bpsgui_global.h"
8 #include <QScrollArea>
9 
10 class BpsReport;
11 class BpsSettings;
12 
18 {
19  Q_OBJECT
21 
22 public:
27  BpsReportPreviewWidget(QWidget* aParent = nullptr);
28 
30  virtual ~BpsReportPreviewWidget();
31  virtual QSize sizeHint() const;
33 
40  void setReport(BpsReport* aReport);
41 
45  BpsReport* report() const;
46 
50  int currentPage() const;
51 
55  int pageCount() const;
56 
60  bool hasPreviousPage() const;
61 
65  bool hasNextPage() const;
66 
70  bool isFitPage() const;
71 
75  bool isFitWidth() const;
76 
82  qreal zoom() const;
83 
87  void scalePage();
88 
89 public slots:
90 
95  void showPage(int aPageNo);
96 
101 
106 
110  void showNextPage();
111 
115  void showLastPage();
116 
122  void setFitPage(bool aEnable);
123 
129  void setFitWidth(bool aEnable);
130 
136  void setZoom(qreal aZoom);
137 
141  void emitStatus();
142 
143 signals:
144 
149  void fitPageEnabled(bool aEnabled);
150 
155  void fitWidthEnabled(bool aEnabled);
156 
161  void zoomChanged(qreal aZoom);
162 
167  void pageChanged(int aPageNo);
168 
173  void previousPageEnabled(bool aEnable);
174 
179  void nextPageEnabled(bool aEnable);
180 };
181 
182 #endif // BPSREPORTPREVIEWWIDGET_H
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
Public include file for BPS GUI library macros.
#define BPSGUI_EXPORT
Declare class an import from the shared library.
Definition: bpsgui_global.h:22
BPS Report Object.
Definition: bpsreport.h:29
Preview widget for BPS reports.
Definition: bpsreportpreviewwidget.h:18
void showNextPage()
Show the next page (if report has any pages).
void previousPageEnabled(bool aEnable)
This signal gets emitted when the displayed page has changed.
void showPreviousPage()
Show the previous page (if report has any pages).
void pageChanged(int aPageNo)
This signal gets emitted when the displayed page has changed.
bool hasPreviousPage() const
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.
bool hasNextPage() const
void setReport(BpsReport *aReport)
Set the report to be displayed.
BpsReportPreviewWidget(QWidget *aParent=nullptr)
Default constructor.
qreal zoom() const
Get the current zoom factor.
void nextPageEnabled(bool aEnable)
This signal gets emitted when the displayed page has changed.
void scalePage()
Rescale the page, for example after resizing, maximizing and restoring.
void zoomChanged(qreal aZoom)
This signal is emitted when the zoom factor changes.
BpsReport * report() const
void fitPageEnabled(bool aEnabled)
This signal is emitted when page fitting is enabled or disabled.
bool isFitPage() const
void fitWidthEnabled(bool aEnabled)
This signal is emitted when width fitting is enabled or disabled.
bool isFitWidth() const
void emitStatus()
Emit all status signals.
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 showPage(int aPageNo)
Show a certain page number.
void showLastPage()
Show the last page (if report has any pages).
Query and edit settings.
Definition: bpssettings.h:17
virtual QSize sizeHint() const const override