1
.TH "QwtPlotGrid" 3 "11 Jun 2007" "Version 5.0.2" "Qwt User's Guide" \" -*- nroff -*-
9
Inherits \fBQwtPlotItem\fP.
11
.SH "Detailed Description"
13
A class which draws a coordinate grid.
15
The \fBQwtPlotGrid\fP class can be used to draw a coordinate grid. A coordinate grid consists of major and minor vertical and horizontal gridlines. The locations of the gridlines are determined by the X and Y scale divisions which can be assigned with \fBQwtPlotGrid::setXDiv\fP and \fBQwtPlotGrid::setYDiv()\fP The \fBdraw()\fP member draws the grid within a bounding rectangle.
17
Definition at line 34 of file qwt_plot_grid.h.
18
.SS "Public Member Functions"
22
.RI "\fBQwtPlotGrid\fP ()"
25
.RI "virtual \fB~QwtPlotGrid\fP ()"
28
.RI "virtual int \fBrtti\fP () const "
31
.RI "void \fBenableX\fP (bool tf)"
34
.RI "bool \fBxEnabled\fP () const "
37
.RI "void \fBenableY\fP (bool tf)"
40
.RI "bool \fByEnabled\fP () const "
43
.RI "void \fBenableXMin\fP (bool tf)"
46
.RI "bool \fBxMinEnabled\fP () const "
49
.RI "void \fBenableYMin\fP (bool tf)"
52
.RI "bool \fByMinEnabled\fP () const "
55
.RI "void \fBsetXDiv\fP (const \fBQwtScaleDiv\fP &sx)"
58
.RI "const \fBQwtScaleDiv\fP & \fBxScaleDiv\fP () const "
61
.RI "void \fBsetYDiv\fP (const \fBQwtScaleDiv\fP &sy)"
64
.RI "const \fBQwtScaleDiv\fP & \fByScaleDiv\fP () const "
67
.RI "void \fBsetPen\fP (const QPen &p)"
70
.RI "void \fBsetMajPen\fP (const QPen &p)"
73
.RI "const QPen & \fBmajPen\fP () const "
76
.RI "void \fBsetMinPen\fP (const QPen &p)"
79
.RI "const QPen & \fBminPen\fP () const "
82
.RI "virtual void \fBdraw\fP (QPainter *p, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRect &rect) const "
85
.RI "virtual void \fBupdateScaleDiv\fP (const \fBQwtScaleDiv\fP &, const \fBQwtScaleDiv\fP &)"
88
.SH "Constructor & Destructor Documentation"
90
.SS "QwtPlotGrid::QwtPlotGrid ()\fC [explicit]\fP"
92
Enables major grid, disables minor grid.
94
Definition at line 42 of file qwt_plot_grid.cpp.
96
References QwtPlotItem::setZ().
97
.SS "QwtPlotGrid::~QwtPlotGrid ()\fC [virtual]\fP"
101
Definition at line 50 of file qwt_plot_grid.cpp.
102
.SH "Member Function Documentation"
104
.SS "void QwtPlotGrid::draw (QPainter * painter, const \fBQwtScaleMap\fP & mx, const \fBQwtScaleMap\fP & my, const QRect & r) const\fC [virtual]\fP"
108
The grid is drawn into the bounding rectangle such that gridlines begin and end at the rectangle's borders. The X and Y maps are used to map the scale divisions into the drawing region screen.
112
\fIpainter\fP Painter
118
\fIr\fP Contents rect of the plot canvas
123
Implements \fBQwtPlotItem\fP.
125
Definition at line 202 of file qwt_plot_grid.cpp.
126
.SS "void QwtPlotGrid::enableX (bool tf)"
128
Enable or disable vertical gridlines.
132
\fItf\fP Enable (true) or disable
137
Minor gridlines can be enabled or disabled with \fBenableXMin()\fP
142
Definition at line 67 of file qwt_plot_grid.cpp.
144
References QwtPlotItem::itemChanged().
145
.SS "void QwtPlotGrid::enableXMin (bool tf)"
147
Enable or disable minor vertical gridlines.
151
\fItf\fP Enable (true) or disable
161
Definition at line 95 of file qwt_plot_grid.cpp.
163
References QwtPlotItem::itemChanged().
164
.SS "void QwtPlotGrid::enableY (bool tf)"
166
Enable or disable horizontal gridlines.
170
\fItf\fP Enable (true) or disable
175
Minor gridlines can be enabled or disabled with \fBenableYMin()\fP
180
Definition at line 81 of file qwt_plot_grid.cpp.
182
References QwtPlotItem::itemChanged().
183
.SS "void QwtPlotGrid::enableYMin (bool tf)"
185
Enable or disable minor horizontal gridlines.
189
\fItf\fP Enable (true) or disable
199
Definition at line 109 of file qwt_plot_grid.cpp.
201
References QwtPlotItem::itemChanged().
202
.SS "const QPen & QwtPlotGrid::majPen () const"
206
the pen for the major gridlines
211
\fBsetMajPen()\fP, \fBsetMinPen()\fP, \fBsetPen()\fP
216
Definition at line 270 of file qwt_plot_grid.cpp.
217
.SS "const QPen & QwtPlotGrid::minPen () const"
221
the pen for the minor gridlines
226
\fBsetMinPen()\fP, \fBsetMajPen()\fP, \fBsetPen()\fP
231
Definition at line 279 of file qwt_plot_grid.cpp.
232
.SS "void QwtPlotGrid::setMajPen (const QPen & p)"
234
Assign a pen for the major gridlines.
243
\fBmajPen()\fP, \fBsetMinPen()\fP, \fBsetPen()\fP
248
Definition at line 168 of file qwt_plot_grid.cpp.
250
References QwtPlotItem::itemChanged().
251
.SS "void QwtPlotGrid::setMinPen (const QPen & p)"
253
Assign a pen for the minor gridlines.
262
Definition at line 181 of file qwt_plot_grid.cpp.
264
References QwtPlotItem::itemChanged().
265
.SS "void QwtPlotGrid::setPen (const QPen & p)"
267
Assign a pen for both major and minor gridlines.
276
\fBsetMajPen()\fP, \fBsetMinPen()\fP
281
Definition at line 153 of file qwt_plot_grid.cpp.
283
References QwtPlotItem::itemChanged().
284
.SS "void QwtPlotGrid::setXDiv (const \fBQwtScaleDiv\fP & sx)"
286
Assign an x axis scale division.
290
\fIsx\fP Scale division
295
\fBQwtPlotGrid\fP uses implicit sharing (see Qt Manual) for the scale divisions.
300
Definition at line 124 of file qwt_plot_grid.cpp.
302
References QwtPlotItem::itemChanged().
304
Referenced by updateScaleDiv().
305
.SS "void QwtPlotGrid::setYDiv (const \fBQwtScaleDiv\fP & sy)"
307
Assign a y axis division.
311
\fIsy\fP Scale division
316
\fBQwtPlotGrid\fP uses implicit sharing (see Qt Manual) for the scale divisions.
321
Definition at line 139 of file qwt_plot_grid.cpp.
323
References QwtPlotItem::itemChanged().
325
Referenced by updateScaleDiv().
326
.SS "void QwtPlotGrid::updateScaleDiv (const \fBQwtScaleDiv\fP & xDiv, const \fBQwtScaleDiv\fP & yDiv)\fC [virtual]\fP"
328
Update the item to changes of the axes scale division.
330
Update the item, when the axes of plot have changed. The default implementation does nothing, but items that depend on the scale division (like \fBQwtPlotGrid()\fP) have to reimplement \fBupdateScaleDiv()\fP
334
\fIxScaleDiv\fP Scale division of the x-axis
336
\fIyScaleDiv\fP Scale division of the y-axis
341
\fBQwtPlot::updateAxes()\fP
346
Reimplemented from \fBQwtPlotItem\fP.
348
Definition at line 333 of file qwt_plot_grid.cpp.
350
References setXDiv(), and setYDiv().
351
.SS "bool QwtPlotGrid::xEnabled () const"
355
true if vertical gridlines are enabled
365
Definition at line 288 of file qwt_plot_grid.cpp.
366
.SS "bool QwtPlotGrid::xMinEnabled () const"
370
true if minor vertical gridlines are enabled
380
Definition at line 297 of file qwt_plot_grid.cpp.
381
.SS "const \fBQwtScaleDiv\fP & QwtPlotGrid::xScaleDiv () const"
385
the scale division of the x axis
390
Definition at line 322 of file qwt_plot_grid.cpp.
391
.SS "bool QwtPlotGrid::yEnabled () const"
395
true if horizontal gridlines are enabled
405
Definition at line 306 of file qwt_plot_grid.cpp.
406
.SS "bool QwtPlotGrid::yMinEnabled () const"
410
true if minor horizontal gridlines are enabled
420
Definition at line 315 of file qwt_plot_grid.cpp.
421
.SS "const \fBQwtScaleDiv\fP & QwtPlotGrid::yScaleDiv () const"
425
the scale division of the y axis
430
Definition at line 328 of file qwt_plot_grid.cpp.
434
Generated automatically by Doxygen for Qwt User's Guide from the source code.