Qwt User's Guide 6.1.5

qwt_plot_abstract_barchart.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
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_ABSTRACT_BAR_CHART_H
11 #define QWT_PLOT_ABSTRACT_BAR_CHART_H
12
13 #include "qwt_global.h"
14 #include "qwt_plot_seriesitem.h"
15 #include "qwt_series_data.h"
16
25 class QWT_EXPORT QwtPlotAbstractBarChart: public QwtPlotSeriesItem
26 {
27 public:
33 enum LayoutPolicy
34 {
42 AutoAdjustSamples,
43
47 ScaleSamplesToAxes,
48
55 ScaleSampleToCanvas,
56
60 FixedSampleSize
61 };
62
63 explicit QwtPlotAbstractBarChart( const QwtText &title );
64 virtual ~QwtPlotAbstractBarChart();
65
66 void setLayoutPolicy( LayoutPolicy );
67 LayoutPolicy layoutPolicy() const;
68
69 void setLayoutHint( double );
70 double layoutHint() const;
71
72 void setSpacing( int );
73 int spacing() const;
74
75 void setMargin( int );
76 int margin() const;
77
78 void setBaseline( double );
79 double baseline() const;
80
81 virtual void getCanvasMarginHint(
82 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
83 const QRectF &canvasRect,
84 double &left, double &top, double &right, double &bottom) const;
85
86
87 protected:
88 double sampleWidth( const QwtScaleMap &map,
89 double canvasSize, double boundingSize,
90 double value ) const;
91
92 private:
93 class PrivateData;
94 PrivateData *d_data;
95 };
96
97 #endif
QwtPlotAbstractBarChart::ScaleSampleToCanvas
Definition: qwt_plot_abstract_barchart.h:55
QwtPlotSeriesItem
Base class for plot items representing a series of samples.
Definition: qwt_plot_seriesitem.h:22
QwtPlotAbstractBarChart
Abstract base class for bar chart items.
Definition: qwt_plot_abstract_barchart.h:25
QwtText
A class representing a text.
Definition: qwt_text.h:51
QwtPlotAbstractBarChart::LayoutPolicy
LayoutPolicy
Mode how to calculate the bar width.
Definition: qwt_plot_abstract_barchart.h:33
QwtPlotAbstractBarChart::ScaleSamplesToAxes
Definition: qwt_plot_abstract_barchart.h:47
QwtPlotAbstractBarChart::AutoAdjustSamples
Definition: qwt_plot_abstract_barchart.h:42
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:30
QwtPlotItem::getCanvasMarginHint
virtual void getCanvasMarginHint(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const
Calculate a hint for the canvas margin.
Definition: qwt_plot_item.cpp:564