| 916 | } |
| 917 | |
| 918 | void MapPrinter::takePrinterSettings(const QPrinter* printer) |
| 919 | { |
| 920 | if (!printer) return; |
| 921 | |
| 922 | MapPrinterPageFormat f(*printer); |
| 923 | if (target == pdfTarget() || target == imageTarget() || target == kmzTarget()) |
| 924 | { |
| 925 | f.page_rect = QRectF(QPointF(0.0, 0.0), f.paper_dimensions); |
| 926 | } |
| 927 | |
| 928 | if (f != page_format) |
| 929 | { |
| 930 | page_format.page_size = f.page_size; |
| 931 | page_format.orientation = f.orientation; |
| 932 | page_format.paper_dimensions = f.paper_dimensions; |
| 933 | page_format.page_rect = f.page_rect; |
| 934 | updatePageBreaks(); |
| 935 | emit pageFormatChanged(page_format); |
| 936 | } |
| 937 | |
| 938 | setResolution(printer->resolution()); |
| 939 | |
| 940 | if (printer->outputFormat() == QPrinter::NativeFormat) |
| 941 | { |
| 942 | PlatformPrinterProperties::save(printer, native_data); |
| 943 | } |
| 944 | } |
| 945 | |
| 946 | |
| 947 | void MapPrinter::drawPage(QPainter* device_painter, const QRectF& page_extent, QImage* page_buffer) const |
no test coverage detected