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
QwtLegendData
Attributes of an entry on a legend.
Definition: qwt_legend_data.h:36
QwtGraphic
A paint device for scalable graphics.
Definition: qwt_graphic.h:75
QVector
Definition: qwt_clipper.h:23
QwtPlotBarChart::PrivateData
Definition: qwt_plot_barchart.cpp:19
qwt_global.h
QwtColumnSymbol
A drawing primitive for columns.
Definition: qwt_column_symbol.h:74
QwtPlotBarChart::LegendChartTitle
@ LegendChartTitle
Definition: qwt_plot_barchart.h:60
QList
Definition: qwt_abstract_legend.h:17
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:22
QwtPlotBarChart
QwtPlotBarChart displays a series of a values as bars.
Definition: qwt_plot_barchart.h:41
QwtText
A class representing a text.
Definition: qwt_text.h:51
QwtSeriesData
Abstract interface for iterating over samples.
Definition: qwt_plot_barchart.h:18
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:26
QwtColumnRect
Directed rectangle representing bounding rectangle and orientation of a column.
Definition: qwt_column_symbol.h:26
QwtPlotAbstractBarChart
Abstract base class for bar chart items.
Definition: qwt_plot_abstract_barchart.h:24
QwtPlotBarChart::LegendMode
LegendMode
Legend modes.
Definition: qwt_plot_barchart.h:52
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
qwt_plot_abstract_barchart.h
QwtSeriesStore
Class storing a QwtSeriesData object.
Definition: qwt_series_store.h:66
QwtPlotItem::rtti
virtual int rtti() const
Definition: qwt_plot_item.cpp:136


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45