#include <QicsPrintPreviewWidget.h>
Public Attributes | |
| PageLayoutDirection | m_ld |
| Direction policy. | |
| PageLayoutOrdering | m_lo |
| Ordering policy. | |
| PageLayoutScaling | m_ls |
| Scaling policy. | |
| PageLayoutCounting | m_lc |
| Counting policy. | |
| int | m_fitX |
| Columns of pages to set. | |
| int | m_fitY |
| Rows of pages to set. | |
| double | m_zoomP |
| Scale of pages to set. | |
There are enumerations for setting current layout policy: PageLayoutDirection, PageLayoutOrdering, PageLayoutScaling and PageLayoutCounting. Their combination will inform QicsPrintPreviewWidget about the way how to layout the pages.
PageLayoutDirection is used to set up the direction in which pages will be layed out. This can be set via PageLayoutData::m_ld member. There are two variants: LD_HORIZONTAL and LD_VERTICAL. LD_HORIZONTAL assumes that pages will be layed out from left to right, fitting the height of the preview area (viewport). The number of pages to fit is set via PageLayoutData::m_fitY member. LD_VERTICAL assumes laying out from top to bottom, fitting the width of the viewport. The number of pages to fit is set via PageLayoutData::m_fitX member.
PageLayoutOrdering sets the direction of pages numeration. This can be set via PageLayoutData::m_lo member. There are two variants: LO_HORIZONTAL and LO_VERTICAL. LO_HORIZONTAL will enumerate pages from left to right, and LO_VERTICAL will enumerate pages from top to bottom, respectively.
PageLayoutScaling sets scaling policy. This can be set via PageLayoutData::m_ls member. It can be one of LS_FIXED or LS_FIT. LS_FIXED means that the current scale always be fixed, and can be changed via PageLayoutData::m_zoomP member method. LS_FIT allows the QicsPrintPreviewWidget to set the scale automatically, depending of current viewport size and fixed pages count.
PageLayoutCounting sets layout counting policy. This can be set via PageLayoutData::m_lc member. It can be one of LC_FIXED or LC_FIT. LC_FIXED means that the fixed number of pages will be placed horizontally or vertically (depending of current PageLayoutDirection and corresponding number of pages set). LC_FIT allows the QicsPrintPreviewWidget to count the number of pages able to fit into the current viewport and lay pages out correspondingly to this amount.
The images below illustrating how these policies impact on pages layout.
| Assuming that we have totally 23 pages. Direction is set to LD_HORIZONTAL, and Counting is LC_FIXED, so the value of fitY is used to tell QicsPrintPreviewWidget how many horizontal rows of pages to create. Ordering is LO_HORIZONTAL, so pages are placed and enumerated from left to right. Scaling is set to LS_FIXED, so all the pages have fixed scale.
|
| Assuming that we have totally 23 pages. Direction is set to LD_HORIZONTAL, and Counting is LC_FIXED again, so the value of fitY is used to tell QicsPrintPreviewWidget how many horizontal rows of pages to create. Ordering is LO_VERTICAL however, so pages are placed and enumerated from top to bottom. Scaling is set to LS_FIXED, so all the pages have fixed scale.
|
| Assuming that we have totally 23 pages. Direction is set to LD_VERTICAL, and Ordering is LO_VERTICAL. But Counting is LC_FIT, so the value used to tell QicsPrintPreviewWidget how many vertical rows of pages to create is calculated depending of viewport size. Resizing the viewport will result in recalculation of number of pages to fit and layouting them again. Scaling is set to LS_FIXED, so all the pages have fixed scale.
|
| Direction is set to LD_VERTICAL, and Ordering is LO_HORIZONTAL. Counting is LC_FIXED, so the value of fitX is used to tell QicsPrintPreviewWidget how many vertical rows of pages to create. Scaling is set to LS_FIT, so the scale of the pages is calculated automatically to fit the viewport size.
|
Direction policy.
Ordering policy.
Scaling policy.
Counting policy.
Columns of pages to set.
Rows of pages to set.
| double PageLayoutData::m_zoomP |
Scale of pages to set.