#include <qwt_grid.h>
Inherited by QwtPlotGrid.
Inheritance diagram for QwtGrid
Public Methods | |
QwtGrid () | |
virtual | ~QwtGrid () |
const QwtGrid& | operator= (const QwtGrid &g) |
void | draw (QPainter *p, const QRect &r, const QwtDiMap &mx, const QwtDiMap &my) |
void | enableX (bool tf) |
void | enableY (bool tf) |
void | enableXMin (bool tf) |
void | enableYMin (bool tf) |
void | setXDiv (const QwtScaleDiv &sx) |
void | setYDiv (const QwtScaleDiv &sy) |
void | setPen (const QPen &p) |
void | setMajPen (const QPen &p) |
void | setMinPen (const QPen &p) |
const QPen& | majPen () const |
const QPen& | minPen () const |
bool | xEnabled () const |
bool | xMinEnabled () const |
bool | yEnabled () const |
bool | yMinEnabled () const |
const QwtScaleDiv& | xScaleDiv () const |
const QwtScaleDiv& | yScaleDiv () const |
Protected Methods | |
virtual void | gridChanged () |
Protected 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 setYDiv() The draw() member draws the grid within a bounding rectangle.
|
ctor.
|
|
dtor.
|
|
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.
|
|
Enable or disable vertical gridlines.
|
|
Enable or disable minor vertical gridlines.
|
|
Enable or disable horizontal gridlines.
|
|
Enable or disable minor horizontal gridlines.
|
|
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. |
|
|
|
|
|
Assignment operator.
|
|
Assign a pen for the major gridlines.
|
|
Assign a pen for the minor gridlines.
|
|
Assign a pen for both major and minor gridlines.
|
|
Assign an x axis scale division.
|
|
Assign a y axis division.
|
|
|
|
|
|
|
|
|
|
|
|
|