24 #include "KDChartAbstractAreaWidget_p.h" 26 #include <KDABLibFakes> 32 AbstractAreaWidget::Private::Private()
37 AbstractAreaWidget::Private::~Private()
43 void AbstractAreaWidget::Private::resizeLayout(
46 if ( size == currentLayoutSize )
return;
48 currentLayoutSize = size;
56 const QSize innerSize( size.width() - left - right,
57 size.height() - top - bottom );
77 void AbstractAreaWidget::init()
98 QPainter painter(
this );
99 if ( size() !=
d->currentLayoutSize ) {
100 d->resizeLayout(
this, size() );
107 if ( rect.isEmpty() )
return;
109 d->resizeLayout(
this, rect.size() );
111 const QPoint translation( rect.topLeft() );
112 painter.translate( translation );
114 painter.translate( -translation.x(), -translation.y() );
143 paintFrame( painter, QRect(QPoint(0, 0), size() ) );
173 const QPoint translation( left, top );
174 painter.translate( translation );
176 painter.translate( -translation.x(), -translation.y() );
virtual void paintFrame(QPainter &painter, const QRect &rectangle)
Base class for AbstractArea and AbstractAreaWidget: An area in the chart with a background, a frame, etc.
void getFrameLeadings(int &left, int &top, int &right, int &bottom) const
virtual void paintBackground(QPainter &painter, const QRect &rectangle)