9#include "KChartBarAttributes.h"
11#include "KChartMath_p.h"
28 bool useFixedDatasetGap;
30 bool useFixedValueBlockGap;
32 bool useFixedBarWidth;
33 bool drawSolidExcessArrows;
39BarAttributes::Private::Private()
41 useFixedDatasetGap( false ),
43 useFixedValueBlockGap( false ),
45 useFixedBarWidth( false ),
46 drawSolidExcessArrows( false ),
47 groupGapFactor( 2.0 ),
53BarAttributes::BarAttributes()
59 : _d( new Private( *r.d ) )
73BarAttributes::~BarAttributes()
75 delete _d; _d =
nullptr;
81 if ( fixedDataValueGap() == r.fixedDataValueGap() &&
82 useFixedDataValueGap() == r.useFixedDataValueGap() &&
83 fixedValueBlockGap() == r.fixedValueBlockGap() &&
84 useFixedValueBlockGap() == r.useFixedValueBlockGap() &&
85 fixedBarWidth() == r.fixedBarWidth() &&
86 useFixedBarWidth() == r.useFixedBarWidth() &&
87 groupGapFactor() == r.groupGapFactor() &&
88 barGapFactor() == r.barGapFactor() &&
89 drawSolidExcessArrows() == r.drawSolidExcessArrows() )
96void BarAttributes::setFixedDataValueGap( qreal gap )
101qreal BarAttributes::fixedDataValueGap()
const
103 return d->datasetGap;
106void BarAttributes::setUseFixedDataValueGap(
bool gapIsFixed )
108 d->useFixedDatasetGap = gapIsFixed;
111bool BarAttributes::useFixedDataValueGap()
const
113 return d->useFixedDatasetGap;
116void BarAttributes::setFixedValueBlockGap( qreal gap )
118 d->valueBlockGap = gap;
121qreal BarAttributes::fixedValueBlockGap()
const
123 return d->valueBlockGap;
126void BarAttributes::setUseFixedValueBlockGap(
bool gapIsFixed )
128 d->useFixedValueBlockGap = gapIsFixed;
131bool BarAttributes::useFixedValueBlockGap()
const
133 return d->useFixedValueBlockGap;
136void BarAttributes::setFixedBarWidth( qreal width )
141qreal BarAttributes::fixedBarWidth()
const
147void BarAttributes::setUseFixedBarWidth(
bool useFixedBarWidth )
149 d->useFixedBarWidth = useFixedBarWidth;
152bool BarAttributes::useFixedBarWidth()
const
154 return d->useFixedBarWidth;
157void BarAttributes::setGroupGapFactor( qreal gapFactor )
159 d->groupGapFactor = gapFactor;
162qreal BarAttributes::groupGapFactor()
const
164 return d->groupGapFactor;
167void BarAttributes::setBarGapFactor( qreal gapFactor )
169 d->barGapFactor = gapFactor;
172qreal BarAttributes::barGapFactor()
const
174 return d->barGapFactor;
177void BarAttributes::setDrawSolidExcessArrows(
bool solidArrows )
179 d->drawSolidExcessArrows = solidArrows;
182bool BarAttributes::drawSolidExcessArrows()
const
184 return d->drawSolidExcessArrows;
Set of attributes for changing the appearance of bar charts.