1
.TH "QwtPlotGrid" 3 "1 May 2008" "Version 5.1.0" "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 \fBsetXDiv()\fP and \fBsetYDiv()\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 &xMap, const \fBQwtScaleDiv\fP &yMap)"
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 "int QwtPlotGrid::rtti () const\fC [virtual]\fP"
108
QwtPlotItem::Rtti_PlotGrid
113
Reimplemented from \fBQwtPlotItem\fP.
115
Definition at line 56 of file qwt_plot_grid.cpp.
116
.SS "void QwtPlotGrid::enableX (bool tf)"
118
Enable or disable vertical gridlines.
122
\fItf\fP Enable (true) or disable
127
Minor gridlines can be enabled or disabled with \fBenableXMin()\fP
132
Definition at line 68 of file qwt_plot_grid.cpp.
134
References QwtPlotItem::itemChanged().
135
.SS "bool QwtPlotGrid::xEnabled () const"
139
true if vertical gridlines are enabled
149
Definition at line 289 of file qwt_plot_grid.cpp.
150
.SS "void QwtPlotGrid::enableY (bool tf)"
152
Enable or disable horizontal gridlines.
156
\fItf\fP Enable (true) or disable
161
Minor gridlines can be enabled or disabled with \fBenableYMin()\fP
166
Definition at line 82 of file qwt_plot_grid.cpp.
168
References QwtPlotItem::itemChanged().
169
.SS "bool QwtPlotGrid::yEnabled () const"
173
true if horizontal gridlines are enabled
183
Definition at line 307 of file qwt_plot_grid.cpp.
184
.SS "void QwtPlotGrid::enableXMin (bool tf)"
186
Enable or disable minor vertical gridlines.
190
\fItf\fP Enable (true) or disable
200
Definition at line 96 of file qwt_plot_grid.cpp.
202
References QwtPlotItem::itemChanged().
203
.SS "bool QwtPlotGrid::xMinEnabled () const"
207
true if minor vertical gridlines are enabled
217
Definition at line 298 of file qwt_plot_grid.cpp.
218
.SS "void QwtPlotGrid::enableYMin (bool tf)"
220
Enable or disable minor horizontal gridlines.
224
\fItf\fP Enable (true) or disable
234
Definition at line 110 of file qwt_plot_grid.cpp.
236
References QwtPlotItem::itemChanged().
237
.SS "bool QwtPlotGrid::yMinEnabled () const"
241
true if minor horizontal gridlines are enabled
251
Definition at line 316 of file qwt_plot_grid.cpp.
252
.SS "void QwtPlotGrid::setXDiv (const \fBQwtScaleDiv\fP & scaleDiv)"
254
Assign an x axis scale division.
258
\fIscaleDiv\fP Scale division
263
\fBQwtPlotGrid\fP uses implicit sharing (see Qt Manual) for the scale divisions.
268
Definition at line 125 of file qwt_plot_grid.cpp.
270
References QwtPlotItem::itemChanged().
272
Referenced by updateScaleDiv().
273
.SS "const \fBQwtScaleDiv\fP & QwtPlotGrid::xScaleDiv () const"
277
the scale division of the x axis
282
Definition at line 323 of file qwt_plot_grid.cpp.
283
.SS "void QwtPlotGrid::setYDiv (const \fBQwtScaleDiv\fP & sy)"
285
Assign a y axis division.
289
\fIsy\fP Scale division
294
\fBQwtPlotGrid\fP uses implicit sharing (see Qt Manual) for the scale divisions.
299
Definition at line 140 of file qwt_plot_grid.cpp.
301
References QwtPlotItem::itemChanged().
303
Referenced by updateScaleDiv().
304
.SS "const \fBQwtScaleDiv\fP & QwtPlotGrid::yScaleDiv () const"
308
the scale division of the y axis
313
Definition at line 329 of file qwt_plot_grid.cpp.
314
.SS "void QwtPlotGrid::setPen (const QPen & p)"
316
Assign a pen for both major and minor gridlines.
325
\fBsetMajPen()\fP, \fBsetMinPen()\fP
330
Definition at line 154 of file qwt_plot_grid.cpp.
332
References QwtPlotItem::itemChanged().
333
.SS "void QwtPlotGrid::setMajPen (const QPen & p)"
335
Assign a pen for the major gridlines.
344
\fBmajPen()\fP, \fBsetMinPen()\fP, \fBsetPen()\fP
349
Definition at line 169 of file qwt_plot_grid.cpp.
351
References QwtPlotItem::itemChanged().
352
.SS "const QPen & QwtPlotGrid::majPen () const"
356
the pen for the major gridlines
361
\fBsetMajPen()\fP, \fBsetMinPen()\fP, \fBsetPen()\fP
366
Definition at line 271 of file qwt_plot_grid.cpp.
367
.SS "void QwtPlotGrid::setMinPen (const QPen & p)"
369
Assign a pen for the minor gridlines.
378
Definition at line 182 of file qwt_plot_grid.cpp.
380
References QwtPlotItem::itemChanged().
381
.SS "const QPen & QwtPlotGrid::minPen () const"
385
the pen for the minor gridlines
390
\fBsetMinPen()\fP, \fBsetMajPen()\fP, \fBsetPen()\fP
395
Definition at line 280 of file qwt_plot_grid.cpp.
396
.SS "void QwtPlotGrid::draw (QPainter * painter, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRect & canvasRect) const\fC [virtual]\fP"
400
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.
404
\fIpainter\fP Painter
406
\fIxMap\fP X axis map
410
\fIcanvasRect\fP Contents rect of the plot canvas
415
Implements \fBQwtPlotItem\fP.
417
Definition at line 203 of file qwt_plot_grid.cpp.
418
.SS "void QwtPlotGrid::updateScaleDiv (const \fBQwtScaleDiv\fP & xMap, const \fBQwtScaleDiv\fP & yMap)\fC [virtual]\fP"
420
Update the item to changes of the axes scale division.
422
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
426
\fIxScaleDiv\fP Scale division of the x-axis
428
\fIyScaleDiv\fP Scale division of the y-axis
433
\fBQwtPlot::updateAxes()\fP
438
Reimplemented from \fBQwtPlotItem\fP.
440
Definition at line 334 of file qwt_plot_grid.cpp.
442
References setXDiv(), and setYDiv().
446
Generated automatically by Doxygen for Qwt User's Guide from the source code.