Go to the documentation of this file.
265 if ( !rect.isValid() )
270 rect = QRectF( rect.y(), rect.x(),
271 rect.height(), rect.width() );
336 const QRectF& canvasRect,
int from,
int to )
const
338 Q_UNUSED( canvasRect )
352 drawLines( painter, xMap, yMap, from, to );
378 int from,
int to )
const
390 for (
int i = from; i <= to; i++ )
419 if ( polygon.size() == 0 )
420 polygon += QPointF( x1, v0 );
422 polygon += QPointF( x1,
y );
423 polygon += QPointF( x2,
y );
437 if ( polygon.size() == 0 )
438 polygon += QPointF( v0, y1 );
440 polygon += QPointF(
x, y1 );
441 polygon += QPointF(
x, y2 );
463 int from,
int to )
const
470 for (
int i = from; i <= to; i++ )
495 int from,
int to )
const
500 painter->setBrush( Qt::NoBrush );
504 for (
int i = from; i <= to; i++ )
514 r.setLeft( qRound( r.left() ) );
515 r.setRight( qRound( r.right() ) );
516 r.setTop( qRound( r.top() ) );
517 r.setBottom( qRound( r.bottom() ) );
525 r.topRight(), r.bottomRight() );
531 r.topLeft(), r.bottomLeft() );
537 r.bottomRight(), r.bottomLeft() );
543 r.topRight(), r.topLeft() );
553 double baseLine, QPolygonF& polygon )
const
555 if ( polygon.size() == 0 )
559 polygon += QPointF( baseLine, polygon.last().y() );
561 polygon += QPointF( polygon.last().x(), baseLine );
565 painter->setPen( Qt::NoPen );
570 polygon += QPointF( polygon.last().x(), baseLine );
571 polygon += QPointF( polygon.first().x(), baseLine );
575 polygon += QPointF( baseLine, polygon.last().y() );
576 polygon += QPointF( baseLine, polygon.first().y() );
586 painter->setBrush( Qt::NoBrush );
668 r.setLeft( qRound( r.left() ) );
669 r.setRight( qRound( r.right() ) );
670 r.setTop( qRound( r.top() ) );
671 r.setBottom( qRound( r.bottom() ) );
virtual int rtti() const QWT_OVERRIDE
QwtInterval interval
Interval.
virtual QwtColumnRect columnRect(const QwtIntervalSample &, const QwtScaleMap &, const QwtScaleMap &) const
static void drawRect(QPainter *, qreal x, qreal y, qreal w, qreal h)
Wrapper for QPainter::drawRect()
QwtArraySeriesData< QwtIntervalSample > QwtIntervalSeriesData
Interface for iterating over an array of intervals.
const QBrush & brush() const
QwtInterval vInterval
Interval for the vertical coordinates.
QwtIntervalSample sample(int index) const
virtual void legendChanged()
Base class for plot items representing a series of samples.
const QwtColumnSymbol * symbol
A paint device for scalable graphics.
static void drawPolyline(QPainter *, const QPolygonF &)
Wrapper for QPainter::drawPolyline()
Qt::Orientation orientation() const
virtual void drawColumn(QPainter *, const QwtColumnRect &, const QwtIntervalSample &) const
@ LeftToRight
From left to right.
@ ExcludeMaximum
Max value is not included in the interval.
@ NoStyle
No Style, the symbol draws nothing.
QwtGraphic defaultIcon(const QBrush &, const QSizeF &) const
Return a default icon from a brush.
void setData(QwtSeriesData< QwtIntervalSample > *series)
A drawing primitive for columns.
QwtPlotHistogram::HistogramStyle style
@ Legend
The item is represented on the legend.
virtual void drawSeries(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const QWT_OVERRIDE
Direction direction
Direction.
static bool roundingAlignment()
BorderFlags borderFlags() const
span_constexpr std::size_t size(span< T, Extent > const &spn)
void setInterval(double minValue, double maxValue, BorderFlags=IncludeBorders)
void setStyle(HistogramStyle style)
A class representing an interval.
A class representing a text.
@ BottomToTop
From bottom to top.
@ TopToBottom
From top to bottom.
virtual QwtGraphic legendIcon(int index, const QSizeF &) const QWT_OVERRIDE
virtual QRectF boundingRect() const
void setZ(double z)
Set the z value.
static void drawLine(QPainter *, qreal x1, qreal y1, qreal x2, qreal y2)
Wrapper for QPainter::drawLine()
void setBaseline(double)
Set the value of the baseline.
virtual ~QwtPlotHistogram()
Destructor.
@ Rtti_PlotHistogram
For QwtPlotHistogram.
QwtInterval hInterval
Interval for the horizontal coordinates.
void drawLines(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
virtual T sample(size_t i) const =0
@ ExcludeMinimum
Min value is not included in the interval.
A sample of the types (x1-x2, y) or (x, y1-y2)
QwtSeriesData< QwtIntervalSample > * data()
double transform(double s) const
virtual void itemChanged()
virtual size_t dataSize() const QWT_OVERRIDE
void setPen(const QColor &, qreal width=0.0, Qt::PenStyle=Qt::SolidLine)
Directed rectangle representing bounding rectangle and orientation of a column.
void drawColumns(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
void setSymbol(const QwtColumnSymbol *)
Assign a symbol.
void setItemAttribute(ItemAttribute, bool on=true)
HistogramStyle style() const
void setSamples(const QVector< QwtIntervalSample > &)
static void drawPolygon(QPainter *, const QPolygonF &)
Wrapper for QPainter::drawPolygon()
void flushPolygon(QPainter *, double baseLine, QPolygonF &) const
Internal, used by the Outline style.
static bool qwtIsCombinable(const QwtInterval &d1, const QwtInterval &d2)
@ RightToLeft
From right to left.
const QwtColumnSymbol * symbol() const
virtual QRectF boundingRect() const QWT_OVERRIDE
virtual void draw(QPainter *, const QwtColumnRect &) const
QwtPlotHistogram(const QString &title=QString())
void setBrush(const QBrush &)
void init()
Initialize data members.
void drawOutline(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45