File indexing completed on 2025-03-09 03:33:53
0001 /* 0002 File : PlotAreaPrivate.h 0003 Project : LabPlot 0004 Description : Private members of PlotArea. 0005 -------------------------------------------------------------------- 0006 SPDX-FileCopyrightText: 2011-2022 Alexander Semke <alexander.semke@web.de> 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #ifndef PLOTAREAPRIVATE_H 0011 #define PLOTAREAPRIVATE_H 0012 0013 #include "backend/worksheet/WorksheetElementPrivate.h" 0014 #include <QPen> 0015 0016 class Background; 0017 class PlotArea; 0018 class QBrush; 0019 0020 class PlotAreaPrivate : public WorksheetElementPrivate { 0021 public: 0022 explicit PlotAreaPrivate(PlotArea* owner); 0023 0024 bool toggleClipping(bool on); 0025 bool clippingEnabled() const; 0026 void setRect(const QRectF&); 0027 void update(); 0028 void retransform() override { 0029 } 0030 0031 // QGraphicsItem's virtual functions 0032 void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override; 0033 void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) override; 0034 QRectF boundingRect() const override; 0035 QPainterPath shape() const override; 0036 virtual void recalcShapeAndBoundingRect() override { 0037 } 0038 0039 QRectF rect; 0040 Background* background{nullptr}; 0041 0042 PlotArea::BorderType borderType; 0043 Line* borderLine{nullptr}; 0044 qreal borderCornerRadius{0.0}; 0045 0046 PlotArea* const q; 0047 }; 0048 0049 #endif