| 772 | } |
| 773 | |
| 774 | void WorksheetView::drawBackground(QPainter* painter, const QRectF& rect) { |
| 775 | painter->save(); |
| 776 | |
| 777 | // painter->setRenderHint(QPainter::Antialiasing); |
| 778 | QRectF scene_rect = sceneRect(); |
| 779 | |
| 780 | if (!m_worksheet->useViewSize()) { |
| 781 | // background |
| 782 | KColorScheme scheme(QPalette::Active, KColorScheme::Window); |
| 783 | const QColor color = scheme.background().color(); |
| 784 | if (!scene_rect.contains(rect)) |
| 785 | painter->fillRect(rect, color); |
| 786 | |
| 787 | // shadow |
| 788 | // int shadowSize = scene_rect.width()*0.02; |
| 789 | // QRectF rightShadowRect(scene_rect.right(), scene_rect.top() + shadowSize, shadowSize, scene_rect.height()); |
| 790 | // QRectF bottomShadowRect(scene_rect.left() + shadowSize, scene_rect.bottom(), scene_rect.width(), shadowSize); |
| 791 | // |
| 792 | // const QColor& shadeColor = scheme.shade(color, KColorScheme::MidShade); |
| 793 | // painter->fillRect(rightShadowRect.intersected(rect), shadeColor); |
| 794 | // painter->fillRect(bottomShadowRect.intersected(rect), shadeColor); |
| 795 | } |
| 796 | |
| 797 | drawBackgroundItems(painter, scene_rect); |
| 798 | |
| 799 | invalidateScene(rect, QGraphicsScene::BackgroundLayer); |
| 800 | painter->restore(); |
| 801 | } |
| 802 | |
| 803 | CartesianPlot* WorksheetView::plotAt(QPoint pos) const { |
| 804 | QGraphicsItem* item = itemAt(pos); |
nothing calls this directly
no test coverage detected