Changeset View
Changeset View
Standalone View
Standalone View
src/renderer/KReportPage.cpp
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU Lesser General Public | 14 | * You should have received a copy of the GNU Lesser General Public | ||
15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | #include "KReportPage.h" | 18 | #include "KReportPage.h" | ||
19 | 19 | | |||
20 | #include "KReportRendererBase.h" | 20 | #include "KReportRendererBase.h" | ||
21 | #include "KReportPageFormat.h" | | |||
22 | #include "KReportUnit.h" | 21 | #include "KReportUnit.h" | ||
23 | #include "KReportRenderObjects.h" | 22 | #include "KReportRenderObjects.h" | ||
24 | #include "kreport_debug.h" | 23 | #include "kreport_debug.h" | ||
25 | 24 | | |||
26 | #include <QWidget> | 25 | #include <QWidget> | ||
27 | #include <QPixmap> | 26 | #include <QPixmap> | ||
28 | #include <QPainter> | 27 | #include <QPainter> | ||
29 | #include <QTimer> | 28 | #include <QTimer> | ||
Show All 36 Lines | 63 | if (d->reportDocument) { | |||
66 | 65 | | |||
67 | 66 | | |||
68 | if (pageSize == QLatin1String("Custom")) { | 67 | if (pageSize == QLatin1String("Custom")) { | ||
69 | // if this is custom sized sheet of paper we will just use those values | 68 | // if this is custom sized sheet of paper we will just use those values | ||
70 | pageWidth = (int)(d->reportDocument->pageOptions().getCustomWidth()); | 69 | pageWidth = (int)(d->reportDocument->pageOptions().getCustomWidth()); | ||
71 | pageHeight = (int)(d->reportDocument->pageOptions().getCustomHeight()); | 70 | pageHeight = (int)(d->reportDocument->pageOptions().getCustomHeight()); | ||
72 | } else { | 71 | } else { | ||
73 | // lookup the correct size information for the specified size paper | 72 | // lookup the correct size information for the specified size paper | ||
74 | pageWidth = d->reportDocument->pageOptions().widthPx(); | 73 | pageWidth = d->reportDocument->pageOptions().pixelSize().width(); | ||
75 | pageHeight = d->reportDocument->pageOptions().heightPx(); | 74 | pageHeight = d->reportDocument->pageOptions().pixelSize().height(); | ||
76 | } | 75 | } | ||
77 | } | 76 | } | ||
78 | setRect(0,0,pageWidth, pageHeight); | 77 | setRect(0,0,pageWidth, pageHeight); | ||
79 | //kreportDebug() << "PAGE IS " << pageWidth << "x" << pageHeight; | 78 | //kreportDebug() << "PAGE IS " << pageWidth << "x" << pageHeight; | ||
80 | d->pixmap = QPixmap(pageWidth, pageHeight); | 79 | d->pixmap = QPixmap(pageWidth, pageHeight); | ||
81 | d->renderer = d->factory.createInstance(QLatin1String("screen")); | 80 | d->renderer = d->factory.createInstance(QLatin1String("screen")); | ||
82 | connect(d->reportDocument, SIGNAL(updated(int)), this, SLOT(pageUpdated(int))); | 81 | connect(d->reportDocument, SIGNAL(updated(int)), this, SLOT(pageUpdated(int))); | ||
83 | 82 | | |||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |