| 56 | BarPlot::~BarPlot() = default; |
| 57 | |
| 58 | void BarPlot::init() { |
| 59 | Q_D(BarPlot); |
| 60 | |
| 61 | KConfig config; |
| 62 | const auto& group = config.group(QStringLiteral("BarPlot")); |
| 63 | |
| 64 | // general |
| 65 | d->type = (BarPlot::Type)group.readEntry(QStringLiteral("Type"), (int)BarPlot::Type::Grouped); |
| 66 | d->orientation = (BarPlot::Orientation)group.readEntry(QStringLiteral("Orientation"), (int)BarPlot::Orientation::Vertical); |
| 67 | d->widthFactor = group.readEntry(QStringLiteral("WidthFactor"), 1.0); |
| 68 | |
| 69 | // initial property objects that will be available even if no data column was set yet |
| 70 | d->addBackground(group); |
| 71 | d->addBorderLine(group); |
| 72 | d->addValue(group); |
| 73 | d->addErrorBar(group); |
| 74 | } |
| 75 | |
| 76 | /*! |
| 77 | Returns an icon to be used in the project explorer. |
no test coverage detected