summaryrefslogtreecommitdiffstats
path: root/src/printsupport/widgets/qprintpreviewwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/printsupport/widgets/qprintpreviewwidget.cpp')
-rw-r--r--src/printsupport/widgets/qprintpreviewwidget.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/printsupport/widgets/qprintpreviewwidget.cpp b/src/printsupport/widgets/qprintpreviewwidget.cpp
index bd22d5a6a5..46d93c315e 100644
--- a/src/printsupport/widgets/qprintpreviewwidget.cpp
+++ b/src/printsupport/widgets/qprintpreviewwidget.cpp
@@ -590,22 +590,20 @@ void QPrintPreviewWidget::setViewMode(ViewMode mode)
Returns the current orientation of the preview. This value is
obtained from the QPrinter object associated with the preview.
*/
-QPrinter::Orientation QPrintPreviewWidget::orientation() const
+QPageLayout::Orientation QPrintPreviewWidget::orientation() const
{
Q_D(const QPrintPreviewWidget);
- return d->printer->pageLayout().orientation() == QPageLayout::Portrait
- ? QPrinter::Portrait : QPrinter::Landscape;
+ return d->printer->pageLayout().orientation();
}
/*!
Sets the current orientation to \a orientation. This value will be
set on the QPrinter object associated with the preview.
*/
-void QPrintPreviewWidget::setOrientation(QPrinter::Orientation orientation)
+void QPrintPreviewWidget::setOrientation(QPageLayout::Orientation orientation)
{
Q_D(QPrintPreviewWidget);
- d->printer->setPageOrientation(orientation == QPrinter::Portrait
- ? QPageLayout::Portrait : QPageLayout::Landscape);
+ d->printer->setPageOrientation(orientation);
d->generatePreview();
}
@@ -744,20 +742,20 @@ QPrintPreviewWidget::ZoomMode QPrintPreviewWidget::zoomMode() const
/*!
This is a convenience function and is the same as calling \c
- {setOrientation(QPrinter::Landscape)}.
+ {setOrientation(QPageLayout::Landscape)}.
*/
void QPrintPreviewWidget::setLandscapeOrientation()
{
- setOrientation(QPrinter::Landscape);
+ setOrientation(QPageLayout::Landscape);
}
/*!
This is a convenience function and is the same as calling \c
- {setOrientation(QPrinter::Portrait)}.
+ {setOrientation(QPageLayout::Portrait)}.
*/
void QPrintPreviewWidget::setPortraitOrientation()
{
- setOrientation(QPrinter::Portrait);
+ setOrientation(QPageLayout::Portrait);
}
/*!