14 const QwtScaleMap &map,
double value,
double width )
16 const double w2 = 0.5 * width;
18 const double v1 = map.
transform( value - w2 );
19 const double v2 = map.
transform( value + w2 );
21 return qAbs( v2 - v1 );
103 hint = qMax( 0.0, hint );
133 spacing = qMax( spacing, 0 );
161 margin = qMax( margin, 0 );
225 double canvasSize,
double boundingSize,
double value )
const 249 const size_t numSamples =
dataSize();
252 if ( numSamples > 1 )
254 w = qAbs( boundingSize / ( numSamples - 1 ) );
290 double &left,
double &top,
double &right,
double &bottom )
const 314 const size_t numSamples =
dataSize();
315 if ( numSamples <= 0 )
322 double sampleWidthS = 1.0;
332 if ( numSamples > 1 )
334 sampleWidthS = qAbs( br.width() / ( numSamples - 1 ) );
341 ds = qAbs( xMap.
sDist() );
342 w = canvasRect.width();
346 ds = qAbs( yMap.
sDist() );
347 w = canvasRect.height();
350 const double sampleWidthP = ( w - spacing * ( numSamples - 1 ) )
351 * sampleWidthS / ( ds + sampleWidthS );
353 hint = 0.5 * sampleWidthP;
Qt::Orientation orientation() const
QwtPlotAbstractBarChart(const QwtText &title)
static double qwtTransformWidth(const QwtScaleMap &map, double value, double width)
virtual ~QwtPlotAbstractBarChart()
Destructor.
void setLayoutPolicy(LayoutPolicy)
virtual void getCanvasMarginHint(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const
Calculate a hint for the canvas margin.
Abstract base class for bar chart items.
QwtPlotAbstractBarChart::LayoutPolicy layoutPolicy
void setMargin(int)
Set the margin.
void setSpacing(int)
Set the spacing.
LayoutPolicy
Mode how to calculate the bar width.
The item is represented on the legend.
LayoutPolicy layoutPolicy() const
void setLayoutHint(double)
A class representing a text.
void setZ(double z)
Set the z value.
virtual void itemChanged()
TFSIMD_FORCE_INLINE const tfScalar & w() const
virtual size_t dataSize() const =0
void setBaseline(double)
Set the baseline.
double sampleWidth(const QwtScaleMap &map, double canvasSize, double dataSize, double value) const
Base class for plot items representing a series of samples.
void setItemAttribute(ItemAttribute, bool on=true)
double transform(double s) const
virtual QRectF dataRect() const =0
const QwtText & title() const
double layoutHint() const