qwt_plot_barchart.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_PLOT_BAR_CHART_H
11 #define QWT_PLOT_BAR_CHART_H
12 
13 #include "qwt_global.h"
15 
16 class QwtColumnRect;
17 class QwtColumnSymbol;
18 template< typename T > class QwtSeriesData;
19 
43  , public QwtSeriesStore< QPointF >
44 {
45  public:
53  {
61 
68  LegendBarTitles
69  };
70 
71  explicit QwtPlotBarChart( const QString& title = QString() );
72  explicit QwtPlotBarChart( const QwtText& title );
73 
74  virtual ~QwtPlotBarChart();
75 
76  virtual int rtti() const QWT_OVERRIDE;
77 
78  void setSamples( const QVector< QPointF >& );
79  void setSamples( const QVector< double >& );
80  void setSamples( QwtSeriesData< QPointF >* );
81 
82  void setSymbol( QwtColumnSymbol* );
83  const QwtColumnSymbol* symbol() const;
84 
85  void setLegendMode( LegendMode );
86  LegendMode legendMode() const;
87 
88  virtual void drawSeries( QPainter*,
89  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
90  const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
91 
92  virtual QRectF boundingRect() const QWT_OVERRIDE;
93 
94  virtual QwtColumnSymbol* specialSymbol(
95  int sampleIndex, const QPointF& ) const;
96 
97  virtual QwtText barTitle( int sampleIndex ) const;
98 
99  protected:
100  virtual void drawSample( QPainter* painter,
101  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
102  const QRectF& canvasRect, const QwtInterval& boundingInterval,
103  int index, const QPointF& sample ) const;
104 
105  virtual void drawBar( QPainter*,
106  int sampleIndex, const QPointF& sample,
107  const QwtColumnRect& ) const;
108 
109  QwtColumnRect columnRect(
110  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
111  const QRectF& canvasRect, const QwtInterval& boundingInterval,
112  const QPointF& sample ) const;
113 
114  QList< QwtLegendData > legendData() const QWT_OVERRIDE;
115  QwtGraphic legendIcon( int index, const QSizeF& ) const QWT_OVERRIDE;
116 
117  private:
118  void init();
119 
120  class PrivateData;
121  PrivateData* m_data;
122 };
123 
124 #endif
A class representing an interval.
Definition: qwt_interval.h:22
#define QWT_EXPORT
Definition: qwt_global.h:38
Abstract interface for iterating over samples.
A drawing primitive for columns.
Abstract base class for bar chart items.
QwtPlotBarChart displays a series of a values as bars.
Class storing a QwtSeriesData object.
A class representing a text.
Definition: qwt_text.h:51
A paint device for scalable graphics.
Definition: qwt_graphic.h:75
A scale map.
Definition: qwt_scale_map.h:26
Directed rectangle representing bounding rectangle and orientation of a column.
LegendMode
Legend modes.
virtual int rtti() const
Attributes of an entry on a legend.
#define QWT_OVERRIDE
Definition: qwt_global.h:53


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:38