void Legend::setBackgroundBrush(const QBrush &brush) { d->backgroundBrush = brush; // KChart KChart::BackgroundAttributes attributes = d->kdLegend->backgroundAttributes(); attributes.setVisible(true); attributes.setBrush(brush); d->kdLegend->setBackgroundAttributes(attributes); d->pixmapRepaintRequested = true; }
void Legend::setBackgroundColor(const QColor &color) { d->backgroundBrush.setColor(color); // KChart KChart::BackgroundAttributes attributes = d->kdLegend->backgroundAttributes(); attributes.setVisible(true); QBrush brush = attributes.brush(); brush.setColor(color); attributes.setBrush(brush); d->kdLegend->setBackgroundAttributes(attributes); d->pixmapRepaintRequested = true; }