static void updateCommonBrush( QBrush& commonBrush, bool& bStart, const KDChart::AbstractArea& area ) { const KDChart::BackgroundAttributes ba( area.backgroundAttributes() ); const bool hasSimpleBrush = ( ! area.frameAttributes().isVisible() && ba.isVisible() && ba.pixmapMode() == KDChart::BackgroundAttributes::BackgroundPixmapModeNone && ba.brush().gradient() == 0 ); if( bStart ){ bStart = false; commonBrush = hasSimpleBrush ? ba.brush() : QBrush(); }else{ if( ! hasSimpleBrush || ba.brush() != commonBrush ) { commonBrush = QBrush(); } } }
QDebug operator<<(QDebug dbg, const KDChart::BackgroundAttributes& ba) { dbg << "KDChart::BackgroundAttributes(" << "visible="<<ba.isVisible() << "brush="<<ba.brush() << "pixmapmode="<<ba.pixmapMode() << "pixmap="<<QVariant(ba.pixmap()) << ")"; return dbg; }