File: qwt__plot_8h-source.html

package info (click to toggle)
libqwt 4.2.0-4.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 9,832 kB
  • ctags: 5,512
  • sloc: cpp: 22,973; ansic: 244; makefile: 66
file content (473 lines) | stat: -rw-r--r-- 36,066 bytes parent folder | download | duplicates (5)
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
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Qwt User&apos;s Guide: qwt_plot.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>qwt_plot.h</h1><pre class="fragment"><div>00001 <span class="comment">/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************</span>
00002 <span class="comment"> * Qwt Widget Library</span>
00003 <span class="comment"> * Copyright (C) 1997   Josef Wilgen</span>
00004 <span class="comment"> * Copyright (C) 2002   Uwe Rathmann</span>
00005 <span class="comment"> *</span>
00006 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
00007 <span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span>
00008 <span class="comment"> *****************************************************************************/</span>
00009 
00010 <span class="comment">// vim: expandtab</span>
00011 
00012 <span class="preprocessor">#ifndef QWT_PLOT_H</span>
00013 <span class="preprocessor"></span><span class="preprocessor">#define QWT_PLOT_H</span>
00014 <span class="preprocessor"></span>
00015 <span class="preprocessor">#include &lt;qframe.h&gt;</span>
00016 <span class="preprocessor">#include "qwt_global.h"</span>
00017 <span class="preprocessor">#include "qwt_array.h"</span>
00018 <span class="preprocessor">#include "qwt_grid.h"</span>
00019 <span class="preprocessor">#include "qwt_autoscl.h"</span>
00020 <span class="preprocessor">#include "qwt_scldraw.h"</span>
00021 <span class="preprocessor">#include "qwt_symbol.h"</span>
00022 <span class="preprocessor">#include "qwt_curve.h"</span>
00023 <span class="preprocessor">#include "qwt_marker.h"</span>
00024 <span class="preprocessor">#include "qwt_legend.h"</span>
00025 <span class="preprocessor">#include "qwt_plot_printfilter.h"</span>
00026 <span class="preprocessor">#include "qwt_plot_classes.h"</span>
00027 <span class="preprocessor">#include "qwt_plot_dict.h"</span>
00028 
00029 <span class="keyword">class </span>QLabel;
00030 <span class="keyword">class </span><a class="code" href="class_qwt_plot_layout.html">QwtPlotLayout</a>;
00031 <span class="keyword">class </span><a class="code" href="class_qwt_scale.html">QwtScale</a>;
00032 <span class="keyword">class </span><a class="code" href="class_qwt_plot_item.html">QwtPlotItem</a>;
00033 <span class="keyword">class </span><a class="code" href="class_qwt_plot_canvas.html">QwtPlotCanvas</a>;
00034 <span class="keyword">class </span><a class="code" href="class_qwt_plot_print_filter.html">QwtPlotPrintFilter</a>;
00035 
<a name="l00085"></a><a class="code" href="class_qwt_plot.html">00085</a> <span class="keyword">class </span>QWT_EXPORT QwtPlot: <span class="keyword">public</span> QFrame
00086 {
00087     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_qwt_plot_item.html">QwtPlotItem</a>;
00088     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_qwt_plot_canvas.html">QwtPlotCanvas</a>;
00089     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_qwt_plot_print_filter.html">QwtPlotPrintFilter</a>;
00090 
00091     Q_OBJECT
00092 
00093     Q_ENUMS( Axis Position )
00094         
00095     <span class="comment">// plot</span>
00096     Q_PROPERTY( <span class="keywordtype">bool</span> autoReplot READ autoReplot WRITE setAutoReplot )
00097 
00098     <span class="comment">// canvas</span>
00099     Q_PROPERTY( QColor canvasBackground READ canvasBackground 
00100         WRITE setCanvasBackground )
00101     Q_PROPERTY( <span class="keywordtype">int</span> canvasLineWidth READ canvasLineWidth 
00102         WRITE setCanvasLineWidth )
00103 
00104     <span class="comment">// axes  </span>
00105     Q_PROPERTY( <span class="keywordtype">bool</span> xBottomAxis READ xBottomAxisEnabled 
00106         WRITE enableXBottomAxis )
00107     Q_PROPERTY( <span class="keywordtype">bool</span> xTopAxis READ xTopAxisEnabled WRITE enableXTopAxis )
00108     Q_PROPERTY( <span class="keywordtype">bool</span> yLeftAxis READ yLeftAxisEnabled WRITE enableYLeftAxis )
00109     Q_PROPERTY( <span class="keywordtype">bool</span> yRightAxis READ yRightAxisEnabled WRITE enableYRightAxis )
00110 
00111     <span class="comment">// title</span>
00112     Q_PROPERTY( QString title READ title WRITE setTitle )
00113     Q_PROPERTY( QFont titleFont READ titleFont WRITE setTitleFont )
00114 
00115     <span class="comment">// grid</span>
00116     Q_PROPERTY( <span class="keywordtype">bool</span> xGrid READ gridXEnabled WRITE enableGridX )
00117     Q_PROPERTY( <span class="keywordtype">bool</span> xMinGrid READ gridXMinEnabled WRITE enableGridX )
00118     Q_PROPERTY( <span class="keywordtype">bool</span> yGrid READ gridYEnabled WRITE enableGridY )
00119     Q_PROPERTY( <span class="keywordtype">bool</span> yMinGrid READ gridYMinEnabled WRITE enableGridY )
00120 
00121     <span class="comment">// legend</span>
00122     Q_PROPERTY( <span class="keywordtype">bool</span> autoLegend READ autoLegend WRITE setAutoLegend )
00123     Q_PROPERTY( QFont legendFont READ legendFont WRITE setLegendFont )
00124     Q_PROPERTY( Position legendPosition READ legendPosition
00125         WRITE setLegendPosition)
00126 
00127 <span class="keyword">public</span>:
<a name="l00129"></a><a class="code" href="class_qwt_plot.html#w9">00129</a>     <span class="keyword">enum</span> Axis { yLeft, yRight, xBottom, xTop, axisCnt };
00131     <span class="comment">// The enums QwtPlot::Position and Qwt::Position must match,</span>
00132     <span class="comment">// because deprecated functions like</span>
00133     <span class="comment">// QwtPlot::setLegendPos(Qwt::Left)</span>
00134     <span class="comment">// are now implemented in terms of functions like</span>
00135     <span class="comment">// QwtPlot::setLegendPosition(QwtPlot::Left).</span>
<a name="l00136"></a><a class="code" href="class_qwt_plot.html#w10">00136</a>     <span class="keyword">enum</span> Position {
00137         Left = Qwt::Left,
00138         Right = Qwt::Right,
00139         Bottom = Qwt::Bottom,
00140         Top = Qwt::Top
00141     };
00142 
00143     QwtPlot(QWidget *p = 0, <span class="keyword">const</span> <span class="keywordtype">char</span> *name = 0);
00144     QwtPlot(<span class="keyword">const</span> QString &amp;title, QWidget *p = 0, <span class="keyword">const</span> <span class="keywordtype">char</span> *name = 0);
00145     <span class="keyword">virtual</span> ~QwtPlot();
00146 
<a name="l00148"></a><a class="code" href="class_qwt_plot.html#a3">00148</a>     <span class="keywordtype">void</span> enableXBottomAxis(<span class="keywordtype">bool</span> b) {enableAxis(xBottom,b);}     
<a name="l00150"></a><a class="code" href="class_qwt_plot.html#a4">00150</a>     <span class="keywordtype">bool</span> xBottomAxisEnabled()<span class="keyword"> const </span>{<span class="keywordflow">return</span> axisEnabled(xBottom);};
<a name="l00152"></a><a class="code" href="class_qwt_plot.html#a5">00152</a>     <span class="keywordtype">void</span> enableXTopAxis(<span class="keywordtype">bool</span> b) {enableAxis(xTop,b);}       
<a name="l00154"></a><a class="code" href="class_qwt_plot.html#a6">00154</a>     <span class="keywordtype">bool</span> xTopAxisEnabled()<span class="keyword"> const </span>{<span class="keywordflow">return</span> axisEnabled(xTop);};
<a name="l00156"></a><a class="code" href="class_qwt_plot.html#a7">00156</a>     <span class="keywordtype">void</span> enableYRightAxis(<span class="keywordtype">bool</span> b) {enableAxis(yRight,b);}       
<a name="l00158"></a><a class="code" href="class_qwt_plot.html#a8">00158</a>     <span class="keywordtype">bool</span> yRightAxisEnabled()<span class="keyword"> const </span>{<span class="keywordflow">return</span> axisEnabled(yRight);};
<a name="l00160"></a><a class="code" href="class_qwt_plot.html#a9">00160</a>     <span class="keywordtype">void</span> enableYLeftAxis(<span class="keywordtype">bool</span> b) {enableAxis(yLeft,b);}     
<a name="l00162"></a><a class="code" href="class_qwt_plot.html#a10">00162</a>     <span class="keywordtype">bool</span> yLeftAxisEnabled()<span class="keyword"> const </span>{<span class="keywordflow">return</span> axisEnabled(yLeft);};
00163 
00164     <span class="keywordtype">void</span> setAutoReplot(<span class="keywordtype">bool</span> tf = TRUE);
00165     <span class="keywordtype">bool</span> autoReplot() const;
00166 
00167     <span class="keywordtype">void</span> print(QPaintDevice &amp;p,
00168         const <a class="code" href="class_qwt_plot_print_filter.html">QwtPlotPrintFilter</a> &amp; = <a class="code" href="class_qwt_plot_print_filter.html">QwtPlotPrintFilter</a>()) const;
00169     virtual <span class="keywordtype">void</span> print(QPainter *, const QRect &amp;rect,
00170         const <a class="code" href="class_qwt_plot_print_filter.html">QwtPlotPrintFilter</a> &amp; = <a class="code" href="class_qwt_plot_print_filter.html">QwtPlotPrintFilter</a>()) const;
00171 
00172 
00173 #ifndef QWT_NO_COMPAT
00174     <span class="comment">// Outline</span>
00175 
00176     <span class="keywordtype">void</span> enableOutline(<span class="keywordtype">bool</span> tf);
00177     <span class="keywordtype">bool</span> outlineEnabled() const;
00178     <span class="keywordtype">void</span> setOutlineStyle(Qwt::Shape os);
00179     Qwt::Shape outlineStyle() const;
00180     <span class="keywordtype">void</span> setOutlinePen(const QPen &amp;pn);
00181     const QPen&amp; outlinePen() const;
00182 #endif
00183 
00184     <span class="comment">// Layout</span>
00185 
00186     <a class="code" href="class_qwt_plot_layout.html">QwtPlotLayout</a> *plotLayout();
00187     const <a class="code" href="class_qwt_plot_layout.html">QwtPlotLayout</a> *plotLayout() const;
00188 
00189     <span class="keywordtype">void</span> setMargin(<span class="keywordtype">int</span> margin);
00190     <span class="keywordtype">int</span> margin() const;
00191 
00192     <span class="comment">// Title</span>
00193 
00194     <span class="keywordtype">void</span> setTitle(const QString &amp;t);
00195     QString title() const;
00196     <span class="keywordtype">void</span> setTitleFont (const QFont &amp;f);
00197     QFont titleFont() const;
00198 
00199     QLabel *titleLabel();
00200     const QLabel *titleLabel() const;
00201 
00202     <span class="comment">// Canvas</span>
00203 
00204     <a class="code" href="class_qwt_plot_canvas.html">QwtPlotCanvas</a> *canvas();
00205     const <a class="code" href="class_qwt_plot_canvas.html">QwtPlotCanvas</a> *canvas() const;
00206 
00207     <span class="keywordtype">void</span> setCanvasBackground (const QColor &amp;c);
00208     const QColor&amp; canvasBackground() const;
00209 
00210     <span class="keywordtype">void</span> setCanvasLineWidth(<span class="keywordtype">int</span> w);
00211     <span class="keywordtype">int</span> canvasLineWidth() const;
00212 
00213     QwtPlotCurveIterator curveIterator() const;
00214     QwtPlotMarkerIterator markerIterator() const;
00215 
00216     <a class="code" href="class_qwt_di_map.html">QwtDiMap</a> canvasMap(<span class="keywordtype">int</span> axis) const;
00217 
00218     <span class="keywordtype">double</span> invTransform(<span class="keywordtype">int</span> axis, <span class="keywordtype">int</span> pos) const;
00219     <span class="keywordtype">int</span> transform(<span class="keywordtype">int</span> axis, <span class="keywordtype">double</span> value) const;
00220 
00221     <span class="comment">// Curves</span>
00222 
00223     <span class="keywordtype">long</span> insertCurve(<a class="code" href="class_qwt_plot_curve.html">QwtPlotCurve</a> *);
00224     <span class="keywordtype">long</span> insertCurve(const QString &amp;title,
00225         <span class="keywordtype">int</span> xAxis = xBottom, <span class="keywordtype">int</span> yAxis = yLeft);
00226 
00227     QwtPlotCurve *curve(<span class="keywordtype">long</span> key);
00228     const QwtPlotCurve *curve(<span class="keywordtype">long</span> key) const;
00229 
00230     QwtArray&lt;<span class="keywordtype">long</span>&gt; curveKeys() const;
00231 
00232     <span class="keywordtype">long</span> closestCurve(<span class="keywordtype">int</span> xpos, <span class="keywordtype">int</span> ypos, <span class="keywordtype">int</span> &amp;dist) const;
00233     <span class="keywordtype">long</span> closestCurve(<span class="keywordtype">int</span> xpos, <span class="keywordtype">int</span> ypos, <span class="keywordtype">int</span> &amp;dist,
00234         <span class="keywordtype">double</span> &amp;xval, <span class="keywordtype">double</span> &amp;yval, <span class="keywordtype">int</span> &amp;index) const;
00235 
00236     <span class="keywordtype">bool</span> setCurveBaseline(<span class="keywordtype">long</span> key, <span class="keywordtype">double</span> ref);
00237     <span class="keywordtype">double</span> curveBaseline(<span class="keywordtype">long</span> key) const;
00238 
00239     <span class="keywordtype">bool</span> setCurveRawData(<span class="keywordtype">long</span> key, const <span class="keywordtype">double</span> *x, const <span class="keywordtype">double</span> *y, <span class="keywordtype">int</span> size);
00240     <span class="keywordtype">bool</span> setCurveData(<span class="keywordtype">long</span> key, const <span class="keywordtype">double</span> *x, const <span class="keywordtype">double</span> *y, <span class="keywordtype">int</span> size);
00241     <span class="keywordtype">bool</span> setCurveData(<span class="keywordtype">long</span> key, 
00242         const QwtArray&lt;<span class="keywordtype">double</span>&gt; &amp;x, const QwtArray&lt;<span class="keywordtype">double</span>&gt; &amp;y);
00243     <span class="keywordtype">bool</span> setCurveData(<span class="keywordtype">long</span> key, const QwtArray&lt;<a class="code" href="class_qwt_double_point.html">QwtDoublePoint</a>&gt; &amp;data);
00244     <span class="keywordtype">bool</span> setCurveData(<span class="keywordtype">long</span> key, const <a class="code" href="class_qwt_data.html">QwtData</a> &amp;data);
00245 
00246     <span class="keywordtype">bool</span> setCurveOptions(<span class="keywordtype">long</span> key, <span class="keywordtype">int</span> t);
00247     <span class="keywordtype">int</span> curveOptions(<span class="keywordtype">long</span> key) const;
00248 
00249     <span class="keywordtype">bool</span> setCurvePen(<span class="keywordtype">long</span> key, const QPen &amp;pen);
00250     QPen curvePen(<span class="keywordtype">long</span> key) const;
00251 
00252     <span class="keywordtype">bool</span> setCurveBrush(<span class="keywordtype">long</span> key, const QBrush &amp;brush);
00253     QBrush curveBrush(<span class="keywordtype">long</span> key) const;
00254 
00255     <span class="keywordtype">bool</span> setCurveSplineSize(<span class="keywordtype">long</span> key, <span class="keywordtype">int</span> s);
00256     <span class="keywordtype">int</span> curveSplineSize(<span class="keywordtype">long</span> key) const;
00257 
00258     <span class="keywordtype">bool</span> setCurveStyle(<span class="keywordtype">long</span> key, <span class="keywordtype">int</span> s, <span class="keywordtype">int</span> options = 0);
00259     <span class="keywordtype">int</span> curveStyle(<span class="keywordtype">long</span> key) const;
00260 
00261     <span class="keywordtype">bool</span> setCurveSymbol(<span class="keywordtype">long</span> key, const <a class="code" href="class_qwt_symbol.html">QwtSymbol</a> &amp;s);
00262     <a class="code" href="class_qwt_symbol.html">QwtSymbol</a> curveSymbol(<span class="keywordtype">long</span> key) const;
00263 
00264     <span class="keywordtype">bool</span> setCurveTitle(<span class="keywordtype">long</span> key, const QString &amp;s);
00265     QString curveTitle(<span class="keywordtype">long</span> key) const;
00266 
00267     <span class="keywordtype">bool</span> setCurveXAxis(<span class="keywordtype">long</span> key, <span class="keywordtype">int</span> axis);
00268     <span class="keywordtype">int</span> curveXAxis(<span class="keywordtype">long</span> key) const;
00269     <span class="keywordtype">bool</span> setCurveYAxis(<span class="keywordtype">long</span> key, <span class="keywordtype">int</span> axis);
00270     <span class="keywordtype">int</span> curveYAxis(<span class="keywordtype">long</span> key) const;
00271 
00272     <span class="keywordtype">void</span> drawCurve(<span class="keywordtype">long</span> key, <span class="keywordtype">int</span> from = 0, <span class="keywordtype">int</span> to = -1);
00273 
00274     <span class="comment">//  Grid</span>
00275 
00276     <span class="keywordtype">void</span> enableGridX(<span class="keywordtype">bool</span> tf = TRUE);
00277     <span class="keywordtype">void</span> enableGridXMin(<span class="keywordtype">bool</span> tf = TRUE);
00278     <span class="keywordtype">void</span> enableGridY(<span class="keywordtype">bool</span> tf = TRUE);
00279     <span class="keywordtype">void</span> enableGridYMin(<span class="keywordtype">bool</span> tf = TRUE);
00280 
00281     <span class="keywordtype">bool</span> gridXEnabled() const;
00282     <span class="keywordtype">bool</span> gridXMinEnabled() const;
00283     <span class="keywordtype">bool</span> gridYEnabled() const;
00284     <span class="keywordtype">bool</span> gridYMinEnabled() const;
00285 
00286     <span class="keywordtype">void</span> setGridXAxis(<span class="keywordtype">int</span> axis);
00287     <span class="keywordtype">int</span> gridXAxis() const;
00288     <span class="keywordtype">void</span> setGridYAxis(<span class="keywordtype">int</span> axis);
00289     <span class="keywordtype">int</span> gridYAxis() const;
00290 
00291     <span class="keywordtype">void</span> setGridPen(const QPen &amp;p);
00292     <span class="keywordtype">void</span> setGridMajPen(const QPen &amp;p);
00293     const QPen&amp; gridMajPen() const;
00294     <span class="keywordtype">void</span> setGridMinPen(const QPen &amp;p);
00295     const QPen&amp; gridMinPen() const;
00296 
00297     <a class="code" href="class_qwt_plot_grid.html">QwtPlotGrid</a> &amp;grid();
00298     const <a class="code" href="class_qwt_plot_grid.html">QwtPlotGrid</a> &amp;grid() const;
00299 
00300     <span class="comment">// Axes</span>
00301 
00302     <span class="keywordtype">void</span> setAxisAutoScale(<span class="keywordtype">int</span> axis);
00303     <span class="keywordtype">bool</span> axisAutoScale(<span class="keywordtype">int</span> axis) const;
00304 
00305     <span class="keywordtype">void</span> enableAxis(<span class="keywordtype">int</span> axis, <span class="keywordtype">bool</span> tf = TRUE);
00306     <span class="keywordtype">bool</span> axisEnabled(<span class="keywordtype">int</span> axis) const;
00307 
00308     <span class="keywordtype">void</span> changeAxisOptions(<span class="keywordtype">int</span> axis, <span class="keywordtype">int</span> opt, <span class="keywordtype">bool</span> value);
00309     <span class="keywordtype">void</span> setAxisOptions(<span class="keywordtype">int</span> axis, <span class="keywordtype">int</span> opt);
00310     <span class="keywordtype">int</span> axisOptions(<span class="keywordtype">int</span> axis) const;
00311 
00312     <span class="keywordtype">void</span> setAxisFont(<span class="keywordtype">int</span> axis, const QFont &amp;f);
00313     QFont axisFont(<span class="keywordtype">int</span> axis) const;
00314 
00315     <span class="keywordtype">void</span> setAxisMargins(<span class="keywordtype">int</span> axis, <span class="keywordtype">double</span> mlo, <span class="keywordtype">double</span> mhi);
00316     <span class="keywordtype">bool</span> axisMargins(<span class="keywordtype">int</span> axis, <span class="keywordtype">double</span> &amp;mlo, <span class="keywordtype">double</span> &amp;mhi) const;
00317 
00318     <span class="keywordtype">void</span> setAxisScale(<span class="keywordtype">int</span> axis, <span class="keywordtype">double</span> min, <span class="keywordtype">double</span> max, <span class="keywordtype">double</span> step = 0);
00319     <span class="keywordtype">void</span> setAxisScaleDraw(<span class="keywordtype">int</span> axis, <a class="code" href="class_qwt_scale_draw.html">QwtScaleDraw</a> *);
00320     const <a class="code" href="class_qwt_scale_div.html">QwtScaleDiv</a> *axisScale(<span class="keywordtype">int</span> axis) const;
00321     const QwtScaleDraw *axisScaleDraw(<span class="keywordtype">int</span> axis) const;
00322     const <a class="code" href="class_qwt_scale.html">QwtScale</a> *axis(<span class="keywordtype">int</span> axis) const;
00323 
00324     <span class="keywordtype">void</span> setAxisLabelFormat(<span class="keywordtype">int</span> axis, <span class="keywordtype">char</span> f, <span class="keywordtype">int</span> prec, <span class="keywordtype">int</span> fieldwidth = 0);
00325     <span class="keywordtype">void</span> axisLabelFormat(<span class="keywordtype">int</span> axis, <span class="keywordtype">char</span> &amp;f, <span class="keywordtype">int</span> &amp;prec, <span class="keywordtype">int</span> &amp;fieldwidth) const;
00326 
00327     <span class="keywordtype">void</span> setAxisLabelAlignment(<span class="keywordtype">int</span> axis, <span class="keywordtype">int</span> alignment);
00328     <span class="keywordtype">void</span> setAxisLabelRotation(<span class="keywordtype">int</span> axis, <span class="keywordtype">double</span> rotation);
00329 
00330     <span class="keywordtype">void</span> setAxisTitle(<span class="keywordtype">int</span> axis, const QString &amp;t);
00331     QString axisTitle(<span class="keywordtype">int</span> axis) const;
00332     <span class="keywordtype">void</span> setAxisTitleFont(<span class="keywordtype">int</span> axis, const QFont &amp;f);
00333     QFont axisTitleFont(<span class="keywordtype">int</span> axis) const;
00334     <span class="keywordtype">void</span> setAxisTitleAlignment(<span class="keywordtype">int</span> axis, <span class="keywordtype">int</span> align);
00335     <span class="keywordtype">int</span> axisTitleAlignment(<span class="keywordtype">int</span> axis) const;
00336 
00337     <span class="keywordtype">void</span> setAxisMaxMinor(<span class="keywordtype">int</span> axis, <span class="keywordtype">int</span> maxMinor);
00338     <span class="keywordtype">int</span> axisMaxMajor(<span class="keywordtype">int</span> axis) const;
00339     <span class="keywordtype">void</span> setAxisMaxMajor(<span class="keywordtype">int</span> axis, <span class="keywordtype">int</span> maxMajor);
00340     <span class="keywordtype">int</span> axisMaxMinor(<span class="keywordtype">int</span> axis) const;
00341 
00342     <span class="keywordtype">void</span> setAxisReference(<span class="keywordtype">int</span> axis, <span class="keywordtype">double</span> value);
00343     <span class="keywordtype">double</span> axisReference(<span class="keywordtype">int</span> axis) const;
00344 
00345     <span class="comment">//  Markers</span>
00346 
00347     <span class="keywordtype">long</span> insertMarker(<a class="code" href="class_qwt_plot_marker.html">QwtPlotMarker</a> *);
00348     <span class="keywordtype">long</span> insertMarker(const QString &amp;label = QString::null,
00349                 <span class="keywordtype">int</span> xAxis = xBottom, <span class="keywordtype">int</span> yAxis = yLeft);
00350     <span class="keywordtype">long</span> insertLineMarker(const QString &amp;label, <span class="keywordtype">int</span> axis);
00351 
00352     QwtPlotMarker *marker(<span class="keywordtype">long</span> key);
00353     const QwtPlotMarker *marker(<span class="keywordtype">long</span> key) const;
00354 
00355     <span class="keywordtype">long</span> closestMarker(<span class="keywordtype">int</span> xpos, <span class="keywordtype">int</span> ypos, <span class="keywordtype">int</span> &amp;dist) const;
00356     QwtArray&lt;<span class="keywordtype">long</span>&gt; markerKeys() const;
00357 
00358     <span class="keywordtype">bool</span> setMarkerXAxis(<span class="keywordtype">long</span> key, <span class="keywordtype">int</span> axis);
00359     <span class="keywordtype">int</span> markerXAxis(<span class="keywordtype">long</span> key) const;
00360     <span class="keywordtype">bool</span> setMarkerYAxis(<span class="keywordtype">long</span> key, <span class="keywordtype">int</span> axis);
00361     <span class="keywordtype">int</span> markerYAxis(<span class="keywordtype">long</span> key) const;
00362 
00363     <span class="keywordtype">bool</span> setMarkerPos(<span class="keywordtype">long</span> key, <span class="keywordtype">double</span> xval, <span class="keywordtype">double</span> yVal);
00364     <span class="keywordtype">bool</span> setMarkerXPos(<span class="keywordtype">long</span> key, <span class="keywordtype">double</span> val);
00365     <span class="keywordtype">bool</span> setMarkerYPos(<span class="keywordtype">long</span> key, <span class="keywordtype">double</span> val);
00366     <span class="keywordtype">void</span> markerPos(<span class="keywordtype">long</span> key, <span class="keywordtype">double</span> &amp;mx, <span class="keywordtype">double</span> &amp;my) const;
00367 
00368     <span class="keywordtype">bool</span> setMarkerFont(<span class="keywordtype">long</span> key, const QFont &amp;f);
00369     QFont markerFont(<span class="keywordtype">long</span> key) const;
00370     <span class="keywordtype">bool</span> setMarkerPen(<span class="keywordtype">long</span> key, const QPen &amp;p);
00371 
00372     <span class="keywordtype">bool</span> setMarkerLabel(<span class="keywordtype">long</span> key, const QString &amp;text,
00373         const QFont &amp;font = QFont(), const QColor &amp;color = QColor(),
00374         const QPen &amp;pen = QPen(Qt::NoPen),
00375         const QBrush &amp;brush = QBrush(Qt::NoBrush));
00376 
00377     <span class="keywordtype">bool</span> setMarkerLabelText(<span class="keywordtype">long</span> key, const QString &amp;text);
00378     const QString markerLabel(<span class="keywordtype">long</span> key) const;
00379     <span class="keywordtype">bool</span> setMarkerLabelAlign(<span class="keywordtype">long</span> key, <span class="keywordtype">int</span> align);
00380     <span class="keywordtype">int</span> markerLabelAlign(<span class="keywordtype">long</span> key) const;
00381     <span class="keywordtype">bool</span> setMarkerLabelPen(<span class="keywordtype">long</span> key, const QPen &amp;p);
00382     QPen markerLabelPen(<span class="keywordtype">long</span> key) const;
00383 
00384     <span class="keywordtype">bool</span> setMarkerLinePen(<span class="keywordtype">long</span> key, const QPen &amp;p);
00385     QPen markerLinePen(<span class="keywordtype">long</span> key) const;
00386     <span class="keywordtype">bool</span> setMarkerLineStyle(<span class="keywordtype">long</span> key, <a class="code" href="class_qwt_marker.html">QwtMarker</a>::LineStyle st);
00387     <a class="code" href="class_qwt_marker.html">QwtMarker</a>::LineStyle markerLineStyle(<span class="keywordtype">long</span> key) const;
00388 
00389     <span class="keywordtype">bool</span> setMarkerSymbol(<span class="keywordtype">long</span> key, const <a class="code" href="class_qwt_symbol.html">QwtSymbol</a> &amp;s);
00390     <a class="code" href="class_qwt_symbol.html">QwtSymbol</a> markerSymbol(<span class="keywordtype">long</span> key) const;
00391 
00392     <span class="comment">// Legend </span>
00393 
00394     <span class="keywordtype">void</span> setAutoLegend(<span class="keywordtype">bool</span> enabled);
00395     <span class="keywordtype">bool</span> autoLegend() const;
00396 
00397     <span class="keywordtype">void</span> enableLegend(<span class="keywordtype">bool</span> tf, <span class="keywordtype">long</span> curveKey = -1);
00398     <span class="keywordtype">bool</span> legendEnabled(<span class="keywordtype">long</span> curveKey) const;
00399 
00400     <span class="keywordtype">void</span> setLegendPosition(Position pos, <span class="keywordtype">double</span> ratio);
00401 
00402     <span class="keywordtype">void</span> setLegendPosition(Position pos);
00403     Position legendPosition() const;
00404 
00405 #ifndef QWT_NO_COMPAT
00406     <span class="keywordtype">void</span> setLegendPos(<span class="keywordtype">int</span> pos, <span class="keywordtype">double</span> ratio = 0.0);
00407     <span class="keywordtype">int</span> legendPos() const;
00408 #endif
00409 
00410     <span class="keywordtype">void</span> setLegendFont(const QFont &amp;f);
00411     const QFont legendFont() const;
00412 
00413     <span class="keywordtype">void</span> setLegendFrameStyle(<span class="keywordtype">int</span> st);
00414     <span class="keywordtype">int</span> legendFrameStyle() const;
00415 
00416     <a class="code" href="class_qwt_legend.html">QwtLegend</a> *legend();
00417     const <a class="code" href="class_qwt_legend.html">QwtLegend</a> *legend() const;
00418 
00419     <span class="keywordtype">void</span> setLegendDisplayPolicy(
00420         <a class="code" href="class_qwt_legend.html">QwtLegend</a>::LegendDisplayPolicy, <span class="keywordtype">int</span> mode = -1);
00421 
00422     <span class="comment">// Misc</span>
00423     virtual QSize sizeHint() const;
00424     virtual QSize minimumSizeHint() const;
00425 
00426     virtual <span class="keywordtype">bool</span> event(QEvent *);
00427 
00428 public slots:
00429     <span class="keywordtype">void</span> clear();
00430 
00431     <span class="keywordtype">bool</span> removeCurve(<span class="keywordtype">long</span> key);
00432     <span class="keywordtype">void</span> removeCurves();
00433 
00434     <span class="keywordtype">bool</span> removeMarker(<span class="keywordtype">long</span> key);
00435     <span class="keywordtype">void</span> removeMarkers();
00436 
00437     virtual <span class="keywordtype">void</span> replot();
00438 
00439 protected slots:
00440     virtual <span class="keywordtype">void</span> lgdClicked();
00441 
00442 #ifndef QWT_NO_COMPAT
00443 signals:
00456     <span class="keywordtype">void</span> plotMousePressed(const QMouseEvent &amp;e);
00457 
00471     <span class="keywordtype">void</span> plotMouseReleased(const QMouseEvent &amp;e);
00472 
00485     <span class="keywordtype">void</span> plotMouseMoved(const QMouseEvent &amp;e);
00486 #else
00487 private:
00488     <span class="comment">// needed for mocs #ifdef ignorance</span>
00489     <span class="keywordtype">void</span> plotMousePressed(const QMouseEvent &amp;);
00490     <span class="keywordtype">void</span> plotMouseReleased(const QMouseEvent &amp;);
00491     <span class="keywordtype">void</span> plotMouseMoved(const QMouseEvent &amp;);
00492 #endif <span class="comment">// !QWT_NO_COMPAT</span>
00493 
00494 signals:
00507     <span class="keywordtype">void</span> legendClicked(<span class="keywordtype">long</span> key);
00508 
00509 protected:
00510     <span class="keywordtype">void</span> autoRefresh();
00511     static <span class="keywordtype">bool</span> axisValid(<span class="keywordtype">int</span> axis);
00512 
00513     virtual <span class="keywordtype">void</span> drawCanvas(QPainter *);
00514     virtual <span class="keywordtype">void</span> drawCanvasItems(QPainter *, const QRect &amp;,
00515         const QwtArray&lt;<a class="code" href="class_qwt_di_map.html">QwtDiMap</a>&gt; &amp;, const <a class="code" href="class_qwt_plot_print_filter.html">QwtPlotPrintFilter</a> &amp;) const;
00516     virtual <span class="keywordtype">void</span> drawContents( QPainter* p );
00517 
00518     virtual <span class="keywordtype">void</span> updateTabOrder();
00519 
00520     <span class="keywordtype">void</span> updateAxes();
00521     <span class="keywordtype">void</span> updateLayout();
00522 
00523     virtual <span class="keywordtype">void</span> resizeEvent(QResizeEvent *e);
00524 
00525     virtual <span class="keywordtype">void</span> insertLegendItem(<span class="keywordtype">long</span> curveKey);
00526     virtual <span class="keywordtype">void</span> updateLegendItem(<span class="keywordtype">long</span> curveKey);
00527     virtual <span class="keywordtype">void</span> printLegendItem(QPainter *, 
00528         const QWidget *, const QRect &amp;) const;
00529 
00530     <span class="keywordtype">void</span> updateLegendItem(const QwtPlotCurve *, <a class="code" href="class_qwt_legend_item.html">QwtLegendItem</a> *);
00531 
00532     virtual <span class="keywordtype">void</span> printTitle(QPainter *, const QRect &amp;) const;
00533     virtual <span class="keywordtype">void</span> printScale(QPainter *, <span class="keywordtype">int</span> axis, <span class="keywordtype">int</span> startDist, <span class="keywordtype">int</span> endDist,
00534         <span class="keywordtype">int</span> baseDist, const QRect &amp;) const;
00535     virtual <span class="keywordtype">void</span> printCanvas(QPainter *, const QRect &amp;,
00536         const QwtArray&lt;QwtDiMap&gt; &amp;, const <a class="code" href="class_qwt_plot_print_filter.html">QwtPlotPrintFilter</a> &amp;) const;
00537     virtual <span class="keywordtype">void</span> printLegend(QPainter *, const QRect &amp;) const;
00538 
00539 private:
00540     <span class="keywordtype">void</span> initAxes();
00541     <span class="keywordtype">long</span> newCurveKey();
00542     <span class="keywordtype">long</span> newMarkerKey();
00543     <span class="keywordtype">void</span> initPlot(const QString &amp;title = QString::null);
00544 
00545     QLabel *d_lblTitle;
00546     <a class="code" href="class_qwt_plot_canvas.html">QwtPlotCanvas</a> *d_canvas;
00547     <a class="code" href="class_qwt_legend.html">QwtLegend</a> *d_legend;
00548     <a class="code" href="class_qwt_plot_layout.html">QwtPlotLayout</a> *d_layout;
00549 
00550     <span class="keywordtype">bool</span> d_axisEnabled[axisCnt];
00551     <a class="code" href="class_qwt_scale.html">QwtScale</a> *d_scale[axisCnt];
00552     <a class="code" href="class_qwt_auto_scale.html">QwtAutoScale</a> d_as[axisCnt];
00553 
00554     QwtCurveDict *d_curves;
00555     QwtMarkerDict *d_markers;
00556     <a class="code" href="class_qwt_plot_grid.html">QwtPlotGrid</a> *d_grid;
00557 
00558     <span class="keywordtype">bool</span> d_autoReplot;
00559     <span class="keywordtype">bool</span> d_autoLegend;
00560 
00561 };
00562 
00563 #endif
00564 
00565 <span class="comment">// Local Variables:</span>
00566 <span class="comment">// mode: C++</span>
00567 <span class="comment">// c-file-style: "stroustrup"</span>
00568 <span class="comment">// indent-tabs-mode: nil</span>
00569 <span class="comment">// End:</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Tue Nov 16 21:12:20 2004 for Qwt User's Guide by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>