24 #include "KDChartAbstractAreaWidget_p.h"
26 #include <KDABLibFakes>
29 using namespace KDChart;
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 );
78 void AbstractAreaWidget::init()
99 QPainter painter(
this );
100 if ( size() !=
d->currentLayoutSize ) {
101 d->resizeLayout(
this, size() );
108 if ( rect.isEmpty() )
return;
110 d->resizeLayout(
this, rect.size() );
112 const QPoint translation( rect.topLeft() );
113 painter.translate( translation );
115 painter.translate( -translation.x(), -translation.y() );
144 paintFrame( painter, QRect(QPoint(0, 0), size() ) );
172 const QPoint translation( left, top );
173 painter.translate( translation );
175 painter.translate( -translation.x(), -translation.y() );