Go to the documentation of this file.
101 points.reserve( samples.size() );
103 for (
int i = 0; i < samples.size(); i++ )
104 points += QPointF( i, samples[ i ] );
188 const size_t numSamples =
dataSize();
189 if ( numSamples == 0 )
193 if ( rect.height() >= 0 )
197 if ( rect.bottom() < baseLine )
198 rect.setBottom( baseLine );
200 if ( rect.top() > baseLine )
201 rect.setTop( baseLine );
205 rect.setRect( rect.y(), rect.x(), rect.height(), rect.width() );
225 const QRectF& canvasRect,
int from,
int to )
const
238 const QwtInterval interval( br.left(), br.right() );
242 for (
int i = from; i <= to; i++ )
245 canvasRect, interval, i,
sample( i ) );
264 const QRectF& canvasRect,
const QwtInterval& boundingInterval,
265 const QPointF& sample )
const
271 const double barHeight =
sampleWidth( yMap, canvasRect.height(),
278 const double y1 =
y - 0.5 * barHeight;
279 const double y2 =
y + 0.5 * barHeight;
289 const double barWidth =
sampleWidth( xMap, canvasRect.width(),
293 const double x1 =
x - 0.5 * barWidth;
294 const double x2 =
x + 0.5 * barWidth;
324 const QRectF& canvasRect,
const QwtInterval& boundingInterval,
325 int index,
const QPointF& sample )
const
328 canvasRect, boundingInterval,
sample );
342 int sampleIndex,
const QPointF& sample,
354 sym->
draw( painter, rect );
362 columnSymbol.
draw( painter, rect );
378 int sampleIndex,
const QPointF& sample )
const
380 Q_UNUSED( sampleIndex );
401 Q_UNUSED( sampleIndex );
422 const size_t numSamples =
dataSize();
423 list.reserve( numSamples );
425 for (
size_t i = 0; i < numSamples; i++ )
430 QVariant::fromValue(
barTitle( i ) ) );
463 int index,
const QSizeF&
size )
const
473 QPainter painter( &icon );
474 painter.setRenderHint( QPainter::Antialiasing,
481 drawBar( &painter, barIndex, QPointF(), column );
Attributes of an entry on a legend.
QwtPlotBarChart(const QString &title=QString())
virtual QwtColumnSymbol * specialSymbol(int sampleIndex, const QPointF &) const
QwtInterval vInterval
Interval for the vertical coordinates.
QPointF sample(int index) const
virtual void legendChanged()
A paint device for scalable graphics.
Qt::Orientation orientation() const
virtual void drawSeries(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const QWT_OVERRIDE
virtual ~QwtPlotBarChart()
Destructor.
@ LeftToRight
From left to right.
const QwtColumnSymbol * symbol() const
void setRenderHint(RenderHint, bool on=true)
void setData(QwtSeriesData< QPointF > *series)
A drawing primitive for columns.
@ Plain
A plain frame style.
Direction direction
Direction.
virtual void drawSample(QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, const QwtInterval &boundingInterval, int index, const QPointF &sample) const
void setLegendMode(LegendMode)
span_constexpr std::size_t size(span< T, Extent > const &spn)
A class representing an interval.
A class representing a text.
double width() const
Return the width of an interval.
@ BottomToTop
From bottom to top.
QwtGraphic legendIcon(int index, const QSizeF &) const QWT_OVERRIDE
@ TopToBottom
From top to bottom.
virtual QRectF boundingRect() const
virtual QList< QwtLegendData > legendData() const
Return all information, that is needed to represent the item on the legend.
QwtInterval hInterval
Interval for the horizontal coordinates.
QwtSeriesData< QPointF > * data()
double transform(double s) const
virtual void itemChanged()
virtual size_t dataSize() const QWT_OVERRIDE
void setFrameStyle(FrameStyle)
void setSamples(const QVector< QPointF > &)
void setSymbol(QwtColumnSymbol *)
Assign a symbol.
Directed rectangle representing bounding rectangle and orientation of a column.
virtual QwtText barTitle(int sampleIndex) const
Return the title of a bar.
virtual QRectF boundingRect() const QWT_OVERRIDE
QwtInterval normalized() const
Normalize the limits of the interval.
Abstract base class for bar chart items.
virtual QRectF boundingRect() const QWT_OVERRIDE
virtual void drawBar(QPainter *, int sampleIndex, const QPointF &sample, const QwtColumnRect &) const
QList< QwtLegendData > legendData() const QWT_OVERRIDE
Return all information, that is needed to represent the item on the legend.
QwtPlotBarChart::LegendMode legendMode
@ RightToLeft
From right to left.
double sampleWidth(const QwtScaleMap &map, double canvasSize, double boundingSize, double value) const
bool testRenderHint(RenderHint) const
QwtArraySeriesData< QPointF > QwtPointSeriesData
Interface for iterating over an array of points.
@ RenderAntialiased
Enable antialiasing.
virtual void draw(QPainter *, const QwtColumnRect &) const
void setDefaultSize(const QSizeF &)
Set a default size.
void setLineWidth(int width)
QwtColumnRect columnRect(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, const QwtInterval &boundingInterval, const QPointF &sample) const
QSize legendIconSize() const
virtual int rtti() const QWT_OVERRIDE
@ Rtti_PlotBarChart
For QwtPlotBarChart.
LegendMode legendMode() const
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45