| 891 | } |
| 892 | |
| 893 | void DatapickerImageView::exportPaint(QPainter* painter, const QRectF& targetRect, const QRectF& sourceRect) { |
| 894 | bool magnificationActive = false; |
| 895 | if (m_image->m_magnificationWindow && m_image->m_magnificationWindow->isVisible()) { |
| 896 | magnificationActive = true; |
| 897 | m_image->m_magnificationWindow->setVisible(false); |
| 898 | } |
| 899 | |
| 900 | painter->save(); |
| 901 | painter->scale(targetRect.width() / sourceRect.width(), targetRect.height() / sourceRect.height()); |
| 902 | drawBackground(painter, sourceRect); |
| 903 | painter->restore(); |
| 904 | m_image->setPrinting(true); |
| 905 | scene()->render(painter, QRectF(), sourceRect); |
| 906 | m_image->setPrinting(false); |
| 907 | |
| 908 | if (magnificationActive) |
| 909 | m_image->m_magnificationWindow->setVisible(true); |
| 910 | } |
| 911 | |
| 912 | void DatapickerImageView::print(QPrinter* printer) { |
| 913 | const QRectF& scene_rect = sceneRect(); |
nothing calls this directly
no test coverage detected