139 setPen( QPen( color, width, style ) );
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() ) );
static bool qwtIsCombinable(const QwtInterval &d1, const QwtInterval &d2)
virtual void legendChanged()
Qt::Orientation orientation() const
enum MQTTPropertyCodes value
virtual void drawSeries(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const QWT_OVERRIDE
QwtInterval vInterval
Interval for the vertical coordinates.
void setStyle(HistogramStyle style)
virtual QRectF boundingRect() const =0
static void drawLine(QPainter *, qreal x1, qreal y1, qreal x2, qreal y2)
Wrapper for QPainter::drawLine()
A class representing an interval.
virtual QwtGraphic legendIcon(int index, const QSizeF &) const QWT_OVERRIDE
void setPen(const QColor &, qreal width=0.0, Qt::PenStyle=Qt::SolidLine)
void setBaseline(double)
Set the value of the baseline.
Max value is not included in the interval.
virtual void drawColumn(QPainter *, const QwtColumnRect &, const QwtIntervalSample &) const
A drawing primitive for columns.
void drawLines(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
void setData(QwtSeriesData< QwtIntervalSample > *series)
const QwtColumnSymbol * symbol
Direction direction
Direction.
void setSamples(const QVector< QwtIntervalSample > &)
virtual ~QwtPlotHistogram()
Destructor.
QwtSeriesData< QwtIntervalSample > * data()
QwtGraphic defaultIcon(const QBrush &, const QSizeF &) const
Return a default icon from a brush.
No Style, the symbol draws nothing.
void drawColumns(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
HistogramStyle style() const
void init()
Initialize data members.
The item is represented on the legend.
const QwtColumnSymbol * symbol() const
static void drawPolygon(QPainter *, const QPolygonF &)
Wrapper for QPainter::drawPolygon()
void setInterval(double minValue, double maxValue, BorderFlags=IncludeBorders)
A sample of the types (x1-x2, y) or (x, y1-y2)
A class representing a text.
void setZ(double z)
Set the z value.
Min value is not included in the interval.
A paint device for scalable graphics.
QwtPlotHistogram::HistogramStyle style
BorderFlags borderFlags() const
QwtIntervalSample sample(int index) const
virtual void itemChanged()
virtual QRectF boundingRect() const QWT_OVERRIDE
QwtPlotHistogram(const QString &title=QString())
void setBrush(const QBrush &)
Interface for iterating over an array of intervals.
static void drawRect(QPainter *, qreal x, qreal y, qreal w, qreal h)
Wrapper for QPainter::drawRect()
static void drawPolyline(QPainter *, const QPolygonF &)
Wrapper for QPainter::drawPolyline()
void drawOutline(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
Directed rectangle representing bounding rectangle and orientation of a column.
virtual void draw(QPainter *, const QwtColumnRect &) const
virtual QwtColumnRect columnRect(const QwtIntervalSample &, const QwtScaleMap &, const QwtScaleMap &) const
QwtInterval hInterval
Interval for the horizontal coordinates.
virtual T sample(size_t i) const =0
const QBrush & brush() const
virtual size_t dataSize() const QWT_OVERRIDE
virtual int rtti() const QWT_OVERRIDE
Base class for plot items representing a series of samples.
void setItemAttribute(ItemAttribute, bool on=true)
double transform(double s) const
void setSymbol(const QwtColumnSymbol *)
Assign a symbol.
void flushPolygon(QPainter *, double baseLine, QPolygonF &) const
Internal, used by the Outline style.
static bool roundingAlignment()
const QwtText & title() const
QwtInterval interval
Interval.