summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qprintpreviewwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/qprintpreviewwidget.cpp')
-rw-r--r--src/gui/widgets/qprintpreviewwidget.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/widgets/qprintpreviewwidget.cpp b/src/gui/widgets/qprintpreviewwidget.cpp
index d92b1ea..0074c91 100644
--- a/src/gui/widgets/qprintpreviewwidget.cpp
+++ b/src/gui/widgets/qprintpreviewwidget.cpp
@@ -663,7 +663,9 @@ void QPrintPreviewWidget::setZoomFactor(qreal factor)
}
/*!
+ \obsolete
Returns the number of pages in the preview.
+ \sa pageCount()
*/
int QPrintPreviewWidget::numPages() const
{
@@ -672,6 +674,16 @@ int QPrintPreviewWidget::numPages() const
}
/*!
+ \since 4.6
+ Returns the number of pages in the preview.
+*/
+int QPrintPreviewWidget::pageCount() const
+{
+ Q_D(const QPrintPreviewWidget);
+ return d->pages.size();
+}
+
+/*!
Returns the currently viewed page in the preview.
*/
int QPrintPreviewWidget::currentPage() const