Changeset View
Changeset View
Standalone View
Standalone View
src/renderer/KReportPrintRenderer_p.cpp
Show All 14 Lines | |||||
15 | * You should have received a copy of the GNU Lesser General Public | 15 | * You should have received a copy of the GNU Lesser General Public | ||
16 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 16 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #include "KReportPrintRenderer_p.h" | 19 | #include "KReportPrintRenderer_p.h" | ||
20 | #include "kreport_debug.h" | 20 | #include "kreport_debug.h" | ||
21 | #include "KReportRenderObjects.h" | 21 | #include "KReportRenderObjects.h" | ||
22 | #include "KReportPageSize.h" | 22 | #include "KReportPageSize.h" | ||
23 | #include "KReportDpi.h" | 23 | #include "KReportUtils_p.h" | ||
24 | 24 | | |||
25 | #include <QApplication> | 25 | #include <QApplication> | ||
26 | #include <QPainter> | 26 | #include <QPainter> | ||
27 | #include <QPrinter> | 27 | #include <QPrinter> | ||
28 | 28 | | |||
29 | namespace KReportPrivate { | 29 | namespace KReportPrivate { | ||
30 | 30 | | |||
31 | PrintRenderer::PrintRenderer() | 31 | PrintRenderer::PrintRenderer() | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 60 | { | |||
75 | 75 | | |||
76 | int fromPage = context.printer()->fromPage(); | 76 | int fromPage = context.printer()->fromPage(); | ||
77 | if (fromPage > 0) | 77 | if (fromPage > 0) | ||
78 | fromPage -= 1; | 78 | fromPage -= 1; | ||
79 | int toPage = context.printer()->toPage(); | 79 | int toPage = context.printer()->toPage(); | ||
80 | if (toPage == 0 || toPage > document->pageCount()) | 80 | if (toPage == 0 || toPage > document->pageCount()) | ||
81 | toPage = document->pageCount(); | 81 | toPage = document->pageCount(); | ||
82 | 82 | | |||
83 | qreal scaleX = context.printer()->resolution() / qreal(KReportDpi::dpiX()); | 83 | qreal scaleX = context.printer()->resolution() / qreal(KReportPrivate::dpiX()); | ||
84 | qreal scaleY = context.printer()->resolution() / qreal(KReportDpi::dpiY()); | 84 | qreal scaleY = context.printer()->resolution() / qreal(KReportPrivate::dpiY()); | ||
85 | 85 | | |||
86 | 86 | | |||
87 | for (int copy = 0; copy < context.printer()->numCopies(); copy++) { | 87 | for (int copy = 0; copy < context.printer()->numCopies(); copy++) { | ||
88 | for (int page = fromPage; page < toPage; page++) { | 88 | for (int page = fromPage; page < toPage; page++) { | ||
89 | if (page > fromPage) | 89 | if (page > fromPage) | ||
90 | context.printer()->newPage(); | 90 | context.printer()->newPage(); | ||
91 | 91 | | |||
92 | OROPage * p = document->page(page); | 92 | OROPage * p = document->page(page); | ||
▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines |