#include <qwt_grid.h>
Inheritance diagram for QwtGrid:

Public Member Functions | |
| QwtGrid () | |
| virtual | ~QwtGrid () |
| virtual void | draw (QPainter *p, const QRect &r, const QwtDiMap &mx, const QwtDiMap &my) const |
| void | enableX (bool tf) |
| bool | xEnabled () const |
| void | enableY (bool tf) |
| bool | yEnabled () const |
| void | enableXMin (bool tf) |
| bool | xMinEnabled () const |
| void | enableYMin (bool tf) |
| bool | yMinEnabled () const |
| void | setXDiv (const QwtScaleDiv &sx) |
| const QwtScaleDiv & | xScaleDiv () const |
| void | setYDiv (const QwtScaleDiv &sy) |
| const QwtScaleDiv & | yScaleDiv () const |
| void | setPen (const QPen &p) |
| void | setMajPen (const QPen &p) |
| const QPen & | majPen () const |
| void | setMinPen (const QPen &p) |
| const QPen & | minPen () const |
Protected Member Functions | |
| virtual void | gridChanged () |
Private Attributes | |
| bool | d_xEnabled |
| bool | d_yEnabled |
| bool | d_xMinEnabled |
| bool | d_yMinEnabled |
| QwtScaleDiv | d_sdx |
| QwtScaleDiv | d_sdy |
| QPen | d_majPen |
| QPen | d_minPen |
The QwtGrid 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 QwtGrid::setXDiv and QwtGrid::setYDiv() The draw() member draws the grid within a bounding rectangle.
Definition at line 32 of file qwt_grid.h.
|
|
Enables major grid, disables minor grid.
Definition at line 15 of file qwt_grid.cpp. References d_xEnabled, d_xMinEnabled, d_yEnabled, and d_yMinEnabled. |
|
|
dtor
Definition at line 24 of file qwt_grid.cpp. |
|
||||||||||||||||||||
|
Draw the grid. 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.
Definition at line 170 of file qwt_grid.cpp. References d_majPen, d_minPen, d_sdx, d_sdy, d_xEnabled, d_xMinEnabled, d_yEnabled, d_yMinEnabled, QwtPainter::drawLine(), QwtScaleDiv::majCnt(), QwtScaleDiv::majMark(), QwtScaleDiv::minCnt(), QwtScaleDiv::minMark(), and QwtDiMap::transform(). Referenced by QwtPlot::drawCanvasItems(). |
|
|
Enable or disable vertical gridlines.
Definition at line 35 of file qwt_grid.cpp. References d_xEnabled, and gridChanged(). Referenced by QwtPlot::enableGridX(). |
|
|
Enable or disable minor vertical gridlines.
Definition at line 63 of file qwt_grid.cpp. References d_xMinEnabled, and gridChanged(). Referenced by QwtPlot::enableGridXMin(), and QwtPlot::initPlot(). |
|
|
Enable or disable horizontal gridlines.
Definition at line 49 of file qwt_grid.cpp. References d_yEnabled, and gridChanged(). Referenced by QwtPlot::enableGridY(). |
|
|
Enable or disable minor horizontal gridlines.
Definition at line 77 of file qwt_grid.cpp. References d_yMinEnabled, and gridChanged(). Referenced by QwtPlot::enableGridYMin(), and QwtPlot::initPlot(). |
|
|
Notify a change of attributes. This virtual function is called when an attribute of the grid has changed. It can be redefined by derived classes. The default implementation does nothing. Reimplemented in QwtPlotGrid. Definition at line 304 of file qwt_grid.cpp. Referenced by enableX(), enableXMin(), enableY(), enableYMin(), setMajPen(), setMinPen(), setPen(), setXDiv(), and setYDiv(). |
|
|
Definition at line 234 of file qwt_grid.cpp. References d_majPen. Referenced by QwtPlotPrintFilter::apply(), QwtPlot::gridMajPen(), and QwtPlotPrintFilter::reset(). |
|
|
Definition at line 243 of file qwt_grid.cpp. References d_minPen. Referenced by QwtPlotPrintFilter::apply(), QwtPlot::gridMinPen(), and QwtPlotPrintFilter::reset(). |
|
|
Assign a pen for the major gridlines.
Definition at line 136 of file qwt_grid.cpp. References d_majPen, and gridChanged(). Referenced by QwtPlotPrintFilter::apply(), QwtPlotPrintFilter::reset(), and QwtPlot::setGridMajPen(). |
|
|
Assign a pen for the minor gridlines.
Definition at line 149 of file qwt_grid.cpp. References d_minPen, and gridChanged(). Referenced by QwtPlotPrintFilter::apply(), QwtPlotPrintFilter::reset(), and QwtPlot::setGridMinPen(). |
|
|
Assign a pen for both major and minor gridlines.
Definition at line 122 of file qwt_grid.cpp. References d_majPen, d_minPen, and gridChanged(). Referenced by QwtPlot::initPlot(), and QwtPlot::setGridPen(). |
|
|
Assign an x axis scale division.
Definition at line 93 of file qwt_grid.cpp. References d_sdx, and gridChanged(). Referenced by QwtPlot::initPlot(), QwtPlot::setGridXAxis(), and QwtPlot::updateAxes(). |
|
|
Assign a y axis division.
Definition at line 109 of file qwt_grid.cpp. References d_sdy, and gridChanged(). Referenced by QwtPlot::initPlot(), QwtPlot::setGridYAxis(), and QwtPlot::updateAxes(). |
|
|
Definition at line 252 of file qwt_grid.cpp. References d_xEnabled. |
|
|
Definition at line 261 of file qwt_grid.cpp. References d_xMinEnabled. |
|
|
Definition at line 286 of file qwt_grid.cpp. References d_sdx. |
|
|
Definition at line 270 of file qwt_grid.cpp. References d_yEnabled. |
|
|
Definition at line 279 of file qwt_grid.cpp. References d_yMinEnabled. |
|
|
Definition at line 292 of file qwt_grid.cpp. References d_sdy. |
|
|
Definition at line 82 of file qwt_grid.h. Referenced by draw(), majPen(), setMajPen(), and setPen(). |
|
|
Definition at line 83 of file qwt_grid.h. Referenced by draw(), minPen(), setMinPen(), and setPen(). |
|
|
Definition at line 79 of file qwt_grid.h. Referenced by draw(), setXDiv(), and xScaleDiv(). |
|
|
Definition at line 80 of file qwt_grid.h. Referenced by draw(), setYDiv(), and yScaleDiv(). |
|
|
Definition at line 74 of file qwt_grid.h. Referenced by draw(), enableX(), QwtGrid(), and xEnabled(). |
|
|
Definition at line 76 of file qwt_grid.h. Referenced by draw(), enableXMin(), QwtGrid(), and xMinEnabled(). |
|
|
Definition at line 75 of file qwt_grid.h. Referenced by draw(), enableY(), QwtGrid(), and yEnabled(). |
|
|
Definition at line 77 of file qwt_grid.h. Referenced by draw(), enableYMin(), QwtGrid(), and yMinEnabled(). |
1.3.2