Qwt User's Guide 6.1.0

- Main Page
- Related Pages
- Classes

All Classes Functions Variables Typedefs Enumerations Enumerator Pages
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 dataSize,
90 double value ) const;
91
92 private:
93 class PrivateData;
94 PrivateData *d_data;
95 };
96
97 #endif