The QwtPlotGrid 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 QwtPlotGrid::setXDiv and QwtPlotGrid::setYDiv() The draw() member draws the grid within a bounding rectangle.
Definition at line 34 of file qwt_plot_grid.h.
Public Member Functions | |
QwtPlotGrid () | |
virtual | ~QwtPlotGrid () |
virtual int | rtti () 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 |
virtual void | draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &rect) const |
virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) |
Protected Member Functions | |
virtual void | gridChanged () |
|
Enables major grid, disables minor grid.
Definition at line 41 of file qwt_plot_grid.cpp. |
|
dtor
Definition at line 48 of file qwt_plot_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.
Implements QwtPlotItem. Definition at line 199 of file qwt_plot_grid.cpp. |
|
Enable or disable vertical gridlines.
Definition at line 65 of file qwt_plot_grid.cpp. References gridChanged(). |
|
Enable or disable minor vertical gridlines.
Definition at line 93 of file qwt_plot_grid.cpp. References gridChanged(). |
|
Enable or disable horizontal gridlines.
Definition at line 79 of file qwt_plot_grid.cpp. References gridChanged(). |
|
Enable or disable minor horizontal gridlines.
Definition at line 107 of file qwt_plot_grid.cpp. References gridChanged(). |
|
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. Definition at line 344 of file qwt_plot_grid.cpp. References QwtPlotItem::itemChanged(). Referenced by enableX(), enableXMin(), enableY(), enableYMin(), setMajPen(), setMinPen(), setPen(), setXDiv(), and setYDiv(). |
|
Definition at line 267 of file qwt_plot_grid.cpp. |
|
Definition at line 276 of file qwt_plot_grid.cpp. |
|
Assign a pen for the major gridlines.
Definition at line 166 of file qwt_plot_grid.cpp. References gridChanged(). |
|
Assign a pen for the minor gridlines.
Definition at line 179 of file qwt_plot_grid.cpp. References gridChanged(). |
|
Assign a pen for both major and minor gridlines.
Definition at line 152 of file qwt_plot_grid.cpp. References gridChanged(). |
|
Assign an x axis scale division.
Definition at line 123 of file qwt_plot_grid.cpp. References gridChanged(). |
|
Assign a y axis division.
Definition at line 139 of file qwt_plot_grid.cpp. References gridChanged(). |
|
Definition at line 285 of file qwt_plot_grid.cpp. |
|
Definition at line 294 of file qwt_plot_grid.cpp. |
|
Definition at line 319 of file qwt_plot_grid.cpp. |
|
Definition at line 303 of file qwt_plot_grid.cpp. |
|
Definition at line 312 of file qwt_plot_grid.cpp. |
|
Definition at line 325 of file qwt_plot_grid.cpp. |