Esempio n. 1
0
void Legend::setTitleFontSize(qreal size)
{
    d->titleFont.setPointSizeF(size);

    // KChart
    KChart::TextAttributes attributes = d->kdLegend->titleTextAttributes();
    attributes.setFontSize(KChart::Measure(size, KChartEnums::MeasureCalculationModeAbsolute));
    d->kdLegend->setTitleTextAttributes(attributes);

    d->pixmapRepaintRequested = true;
}
Esempio n. 2
0
void Legend::setFontSize(qreal size)
{
    d->font.setPointSizeF(size);

    // KChart
    KChart::TextAttributes attributes = d->kdLegend->textAttributes();
    KChart::Measure m = attributes.fontSize();
    m.setValue(size);
    attributes.setFontSize(m);
    d->kdLegend->setTextAttributes(attributes);

    d->pixmapRepaintRequested = true;
    emit updateConfigWidget();
}