12#include "KDChartAbstractAreaBase_p.h"
13#include "KDChartPainterSaver_p.h"
20#include <KDABLibFakes>
21#include <QPainterPath>
25AbstractAreaBase::Private::Private()
30AbstractAreaBase::Private::~Private()
34void AbstractAreaBase::Private::init()
49void AbstractAreaBase::init()
69 qWarning(
"Sorry, not implemented: void AbstractAreaBase::alignToReferencePoint( const RelativePosition& position )");
74 if (
d->frameAttributes == a)
77 d->frameAttributes = a;
83 return d->frameAttributes;
88 if (
d->backgroundAttributes == a)
91 d->backgroundAttributes = a;
97 return d->backgroundAttributes;
109 KDChart::PainterSaver painterSaver(&painter);
157 const QPen oldPen(painter.
pen());
170 Q_ASSERT_X(
d !=
nullptr,
"AbstractAreaBase::paintBackground()",
171 "Private class was not initialized!");
173 PainterSaver painterSaver(&painter);
175 const qreal radius =
d->frameAttributes.cornerRadius();
185 Q_ASSERT_X(
d !=
nullptr,
"AbstractAreaBase::paintFrame()",
186 "Private class was not initialized!");
193 if (
d &&
d->frameAttributes.isVisible()) {
194 padding = qMax(
d->frameAttributes.padding(), 0);
Base class for AbstractArea and AbstractAreaWidget: An area in the chart with a background,...
void setFrameAttributes(const FrameAttributes &a)
void getFrameLeadings(int &left, int &top, int &right, int &bottom) const
BackgroundAttributes backgroundAttributes() const
void alignToReferencePoint(const RelativePosition &position)
void setBackgroundAttributes(const BackgroundAttributes &a)
static void paintFrameAttributes(QPainter &painter, const QRect &rectangle, const KDChart::FrameAttributes &attributes)
virtual void positionHasChanged()
virtual void paintFrame(QPainter &painter, const QRect &rectangle)
virtual void paintBackground(QPainter &painter, const QRect &rectangle)
bool compare(const AbstractAreaBase *other) const
static void paintBackgroundAttributes(QPainter &painter, const QRect &rectangle, const KDChart::BackgroundAttributes &attributes)
virtual ~AbstractAreaBase()
virtual QRect areaGeometry() const =0
FrameAttributes frameAttributes() const
BackgroundPixmapMode pixmapMode() const
@ BackgroundPixmapModeNone
@ BackgroundPixmapModeStretched
@ BackgroundPixmapModeScaled
@ BackgroundPixmapModeCentered
A set of attributes for frames around items.
qreal cornerRadius() const
static QPen scalePen(const QPen &pen)
Defines relative position information: reference area, position in this area (reference position),...
Qt::BrushStyle style() const const
const QBrush & brush() const const
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
void drawRect(const QRectF &rectangle)
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
const QPen & pen() const const
void setBrush(const QBrush &brush)
void setBrushOrigin(int x, int y)
void setClipPath(const QPainterPath &path, Qt::ClipOperation operation)
void setPen(const QColor &color)
void addRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
bool isNull() const const
QRect adjusted(int dx1, int dy1, int dx2, int dy2) const const
QPoint center() const const
QPoint topLeft() const const