void ThemeDialog::apply() { QBrush b = _fillTab->brush(); QPen p = _strokeTab->pen(); QStringList typesWithFill; QStringList typesWithStroke; typesWithFill.append(PlotItem::staticDefaultsGroupName()); typesWithStroke.append(PlotItem::staticDefaultsGroupName()); typesWithFill.append(BoxItem::staticDefaultsGroupName()); typesWithStroke.append(BoxItem::staticDefaultsGroupName()); typesWithFill.append(CircleItem::staticDefaultsGroupName()); typesWithStroke.append(CircleItem::staticDefaultsGroupName()); typesWithFill.append(EllipseItem::staticDefaultsGroupName()); typesWithStroke.append(EllipseItem::staticDefaultsGroupName()); typesWithFill.append(LegendItem::staticDefaultsGroupName()); typesWithStroke.append(LegendItem::staticDefaultsGroupName()); typesWithStroke.append(LineItem::staticDefaultsGroupName()); typesWithStroke.append(ArrowItem::staticDefaultsGroupName()); typesWithFill.append(View::staticDefaultsGroupName()); if (_saveAsDefault->isChecked()) { foreach(const QString &type, typesWithFill) { saveDialogDefaultsBrush(type,b); }
void LegendItem::saveAsDialogDefaults() const { dialogDefaults().setValue(defaultsGroupName()+"/auto",_auto); dialogDefaults().setValue(defaultsGroupName()+"/title", _title); dialogDefaults().setValue(defaultsGroupName()+"/verticalDisplay", _verticalDisplay); QFont F = _font; F.setPointSize(_fontScale); saveDialogDefaultsFont(F, _color); saveDialogDefaultsPen(defaultsGroupName(), pen()); saveDialogDefaultsBrush(defaultsGroupName(), brush()); }