File: QwtPlotAbstractBarChart.3

package info (click to toggle)
qwt 6.1.2-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,848 kB
  • ctags: 15,811
  • sloc: cpp: 57,382; makefile: 41
file content (342 lines) | stat: -rw-r--r-- 8,413 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
.TH "QwtPlotAbstractBarChart" 3 "Thu Dec 11 2014" "Version 6.1.2" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtPlotAbstractBarChart \- 
.PP
Abstract base class for bar chart items\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_plot_abstract_barchart\&.h>\fP
.PP
Inherits \fBQwtPlotSeriesItem\fP\&.
.PP
Inherited by \fBQwtPlotBarChart\fP, and \fBQwtPlotMultiBarChart\fP\&.
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBLayoutPolicy\fP { \fBAutoAdjustSamples\fP, \fBScaleSamplesToAxes\fP, \fBScaleSampleToCanvas\fP, \fBFixedSampleSize\fP }"
.br
.RI "\fIMode how to calculate the bar width\&. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtPlotAbstractBarChart\fP (const \fBQwtText\fP &\fBtitle\fP)"
.br
.ti -1c
.RI "virtual \fB~QwtPlotAbstractBarChart\fP ()"
.br
.RI "\fIDestructor\&. \fP"
.ti -1c
.RI "void \fBsetLayoutPolicy\fP (\fBLayoutPolicy\fP)"
.br
.ti -1c
.RI "\fBLayoutPolicy\fP \fBlayoutPolicy\fP () const "
.br
.ti -1c
.RI "void \fBsetLayoutHint\fP (double)"
.br
.ti -1c
.RI "double \fBlayoutHint\fP () const "
.br
.ti -1c
.RI "void \fBsetSpacing\fP (int)"
.br
.RI "\fISet the spacing\&. \fP"
.ti -1c
.RI "int \fBspacing\fP () const "
.br
.ti -1c
.RI "void \fBsetMargin\fP (int)"
.br
.RI "\fISet the margin\&. \fP"
.ti -1c
.RI "int \fBmargin\fP () const "
.br
.ti -1c
.RI "void \fBsetBaseline\fP (double)"
.br
.RI "\fISet the baseline\&. \fP"
.ti -1c
.RI "double \fBbaseline\fP () const "
.br
.ti -1c
.RI "virtual void \fBgetCanvasMarginHint\fP (const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const "
.br
.RI "\fICalculate a hint for the canvas margin\&. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "double \fBsampleWidth\fP (const \fBQwtScaleMap\fP &map, double canvasSize, double \fBdataSize\fP, double value) const "
.br
.in -1c
.SH "Detailed Description"
.PP 
Abstract base class for bar chart items\&. 

In opposite to almost all other plot items bar charts can't be displayed inside of their bounding rectangle and need a special API how to calculate the width of the bars and how they affect the layout of the attached plot\&. 
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBQwtPlotAbstractBarChart::LayoutPolicy\fP"

.PP
Mode how to calculate the bar width\&. \fBsetLayoutPolicy()\fP, \fBsetLayoutHint()\fP, barWidthHint() 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIAutoAdjustSamples \fP\fP
The sample width is calculated by dividing the bounding rectangle by the number of samples\&. The \fBlayoutHint()\fP is used as a minimum width in paint device coordinates\&.
.PP
\fBSee Also:\fP
.RS 4
boundingRectangle() 
.RE
.PP

.TP
\fB\fIScaleSamplesToAxes \fP\fP
\fBlayoutHint()\fP defines an interval in axis coordinates 
.TP
\fB\fIScaleSampleToCanvas \fP\fP
The bar width is calculated by multiplying \fBlayoutHint()\fP with the height or width of the canvas\&.
.PP
\fBSee Also:\fP
.RS 4
boundingRectangle() 
.RE
.PP

.TP
\fB\fIFixedSampleSize \fP\fP
\fBlayoutHint()\fP defines a fixed width in paint device coordinates\&. 
.SH "Constructor & Destructor Documentation"
.PP 
.SS "QwtPlotAbstractBarChart::QwtPlotAbstractBarChart (const \fBQwtText\fP &title)\fC [explicit]\fP"
Constructor 
.PP
\fBParameters:\fP
.RS 4
\fItitle\fP Title of the chart 
.RE
.PP

.SH "Member Function Documentation"
.PP 
.SS "double QwtPlotAbstractBarChart::baseline () const"

.PP
\fBReturns:\fP
.RS 4
Value for the origin of the bar chart 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetBaseline()\fP, \fBQwtPlotSeriesItem::orientation()\fP 
.RE
.PP

.SS "void QwtPlotAbstractBarChart::getCanvasMarginHint (const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const\fC [virtual]\fP"

.PP
Calculate a hint for the canvas margin\&. Bar charts need to reserve some space for displaying the bars for the first and the last sample\&. The hint is calculated from the \fBlayoutHint()\fP depending on the \fBlayoutPolicy()\fP\&.
.PP
The margins are in target device coordinates ( pixels on screen )
.PP
\fBParameters:\fP
.RS 4
\fIxMap\fP Maps x-values into pixel coordinates\&. 
.br
\fIyMap\fP Maps y-values into pixel coordinates\&. 
.br
\fIcanvasRect\fP Contents rectangle of the canvas in painter coordinates 
.br
\fIleft\fP Returns the left margin 
.br
\fItop\fP Returns the top margin 
.br
\fIright\fP Returns the right margin 
.br
\fIbottom\fP Returns the bottom margin
.RE
.PP
\fBReturns:\fP
.RS 4
Margin
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBlayoutPolicy()\fP, \fBlayoutHint()\fP, \fBQwtPlotItem::Margins\fP \fBQwtPlot::getCanvasMarginsHint()\fP, \fBQwtPlot::updateCanvasMargins()\fP 
.RE
.PP

.PP
Reimplemented from \fBQwtPlotItem\fP\&.
.SS "double QwtPlotAbstractBarChart::layoutHint () const"
The combination of \fBlayoutPolicy()\fP and \fBlayoutHint()\fP define how the width of the bars is calculated
.PP
\fBReturns:\fP
.RS 4
Layout policy of the chart item 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBLayoutPolicy\fP, \fBsetLayoutHint()\fP, \fBlayoutPolicy()\fP 
.RE
.PP

.SS "\fBQwtPlotAbstractBarChart::LayoutPolicy\fP QwtPlotAbstractBarChart::layoutPolicy () const"
The combination of \fBlayoutPolicy()\fP and \fBlayoutHint()\fP define how the width of the bars is calculated
.PP
\fBReturns:\fP
.RS 4
Layout policy of the chart item 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetLayoutPolicy()\fP, \fBlayoutHint()\fP 
.RE
.PP

.SS "int QwtPlotAbstractBarChart::margin () const"

.PP
\fBReturns:\fP
.RS 4
Margin between the outmost bars and the contentsRect() of the canvas\&.
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetMargin()\fP, \fBspacing()\fP 
.RE
.PP

.SS "double QwtPlotAbstractBarChart::sampleWidth (const \fBQwtScaleMap\fP &map, doublecanvasSize, doubleboundingSize, doublevalue) const\fC [protected]\fP"
Calculate the width for a sample in paint device coordinates
.PP
\fBParameters:\fP
.RS 4
\fImap\fP Scale map for the corresponding scale 
.br
\fIcanvasSize\fP Size of the canvas in paint device coordinates 
.br
\fIboundingSize\fP Bounding size of the chart in plot coordinates ( used in AutoAdjustSamples mode ) 
.br
\fIvalue\fP Value of the sample
.RE
.PP
\fBReturns:\fP
.RS 4
Sample width 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBlayoutPolicy()\fP, \fBlayoutHint()\fP 
.RE
.PP

.SS "void QwtPlotAbstractBarChart::setBaseline (doublevalue)"

.PP
Set the baseline\&. The baseline is the origin for the chart\&. Each bar is painted from the baseline in the direction of the sample value\&. In case of a horizontal \fBorientation()\fP the baseline is interpreted as x - otherwise as y - value\&.
.PP
The default value for the baseline is 0\&.
.PP
\fBParameters:\fP
.RS 4
\fIvalue\fP Value for the baseline
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBbaseline()\fP, \fBQwtPlotSeriesItem::orientation()\fP 
.RE
.PP

.SS "void QwtPlotAbstractBarChart::setLayoutHint (doublehint)"
The combination of \fBlayoutPolicy()\fP and \fBlayoutHint()\fP define how the width of the bars is calculated
.PP
\fBParameters:\fP
.RS 4
\fIhint\fP Layout hint
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBLayoutPolicy\fP, \fBlayoutPolicy()\fP, \fBlayoutHint()\fP 
.RE
.PP

.SS "void QwtPlotAbstractBarChart::setLayoutPolicy (\fBLayoutPolicy\fPpolicy)"
The combination of \fBlayoutPolicy()\fP and \fBlayoutHint()\fP define how the width of the bars is calculated
.PP
\fBParameters:\fP
.RS 4
\fIpolicy\fP Layout policy
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBlayoutPolicy()\fP, \fBlayoutHint()\fP 
.RE
.PP

.SS "void QwtPlotAbstractBarChart::setMargin (intmargin)"

.PP
Set the margin\&. The margin is the distance between the outmost bars and the contentsRect() of the canvas\&. The default setting is 5 pixels\&.
.PP
\fBParameters:\fP
.RS 4
\fImargin\fP Margin
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBspacing()\fP, \fBmargin()\fP 
.RE
.PP

.SS "void QwtPlotAbstractBarChart::setSpacing (intspacing)"

.PP
Set the spacing\&. The spacing is the distance between 2 samples ( bars for \fBQwtPlotBarChart\fP or a group of bars for \fBQwtPlotMultiBarChart\fP ) in paint device coordinates\&.
.PP
\fBSee Also:\fP
.RS 4
\fBspacing()\fP 
.RE
.PP

.SS "int QwtPlotAbstractBarChart::spacing () const"

.PP
\fBReturns:\fP
.RS 4
Spacing between 2 samples ( bars or groups of bars ) 
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetSpacing()\fP, \fBmargin()\fP 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.