Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesigner.cpp
Show All 23 Lines | |||||
24 | #include "KReportDesignerSectionDetailGroup.h" | 24 | #include "KReportDesignerSectionDetailGroup.h" | ||
25 | #include "KReportPropertiesButton.h" | 25 | #include "KReportPropertiesButton.h" | ||
26 | #include "KReportSectionEditor.h" | 26 | #include "KReportSectionEditor.h" | ||
27 | #include "KReportDesignerSectionDetail.h" | 27 | #include "KReportDesignerSectionDetail.h" | ||
28 | #include "KReportDesignerItemLine.h" | 28 | #include "KReportDesignerItemLine.h" | ||
29 | #include "KReportRuler_p.h" | 29 | #include "KReportRuler_p.h" | ||
30 | #include "KReportZoomHandler.h" | 30 | #include "KReportZoomHandler.h" | ||
31 | #include "KReportPageSize.h" | 31 | #include "KReportPageSize.h" | ||
32 | #include "KReportDpi.h" | 32 | #include "KReportUtils_p.h" | ||
33 | #include "KReportUtils.h" | 33 | #include "KReportUtils.h" | ||
34 | #include "KReportPluginInterface.h" | 34 | #include "KReportPluginInterface.h" | ||
35 | #include "KReportPluginManager.h" | 35 | #include "KReportPluginManager.h" | ||
36 | #include "KReportSection.h" | 36 | #include "KReportSection.h" | ||
37 | #include "KReportPluginMetaData.h" | 37 | #include "KReportPluginMetaData.h" | ||
38 | #include "kreport_debug.h" | 38 | #include "kreport_debug.h" | ||
39 | 39 | | |||
40 | #include <KStandardShortcut> | 40 | #include <KStandardShortcut> | ||
▲ Show 20 Lines • Show All 822 Lines • ▼ Show 20 Line(s) | 826 | { | |||
863 | return QSize(w, h); | 863 | return QSize(w, h); | ||
864 | } | 864 | } | ||
865 | 865 | | |||
866 | int KReportDesigner::pageWidthPx() const | 866 | int KReportDesigner::pageWidthPx() const | ||
867 | { | 867 | { | ||
868 | QPageLayout layout; | 868 | QPageLayout layout; | ||
869 | layout.setPageSize(QPageSize(KReportPageSize::pageSize(d->set->property("page-size").value().toString()))); | 869 | layout.setPageSize(QPageSize(KReportPageSize::pageSize(d->set->property("page-size").value().toString()))); | ||
870 | layout.setOrientation(d->set->property("print-orientation").value().toString() == QLatin1String("portrait") ? QPageLayout::Portrait : QPageLayout::Landscape); | 870 | layout.setOrientation(d->set->property("print-orientation").value().toString() == QLatin1String("portrait") ? QPageLayout::Portrait : QPageLayout::Landscape); | ||
871 | QSize pageSizePx = layout.fullRectPixels(KReportDpi::dpiX()).size(); | 871 | QSize pageSizePx = layout.fullRectPixels(KReportPrivate::dpiX()).size(); | ||
872 | 872 | | |||
873 | int width = pageSizePx.width(); | 873 | int width = pageSizePx.width(); | ||
874 | width = width - POINT_TO_INCH(d->set->property("margin-left").value().toDouble()) * KReportDpi::dpiX(); | 874 | width = width - POINT_TO_INCH(d->set->property("margin-left").value().toDouble()) * KReportPrivate::dpiX(); | ||
875 | width = width - POINT_TO_INCH(d->set->property("margin-right").value().toDouble()) * KReportDpi::dpiX(); | 875 | width = width - POINT_TO_INCH(d->set->property("margin-right").value().toDouble()) * KReportPrivate::dpiX(); | ||
876 | 876 | | |||
877 | return width; | 877 | return width; | ||
878 | } | 878 | } | ||
879 | 879 | | |||
880 | void KReportDesigner::resizeEvent(QResizeEvent * event) | 880 | void KReportDesigner::resizeEvent(QResizeEvent * event) | ||
881 | { | 881 | { | ||
882 | Q_UNUSED(event); | 882 | Q_UNUSED(event); | ||
883 | d->hruler->setRulerLength(pageWidthPx()); | 883 | d->hruler->setRulerLength(pageWidthPx()); | ||
▲ Show 20 Lines • Show All 670 Lines • Show Last 20 Lines |