|
Qwt User's Guide
6.0.2
|
#include <qwt_plot_grid.h>

Public Member Functions | |
| QwtPlotGrid () | |
| virtual | ~QwtPlotGrid () |
| virtual void | draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &rect) const |
| void | enableX (bool tf) |
| void | enableXMin (bool tf) |
| void | enableY (bool tf) |
| void | enableYMin (bool tf) |
| const QPen & | majPen () const |
| const QPen & | minPen () const |
| virtual int | rtti () const |
| void | setMajPen (const QPen &p) |
| void | setMinPen (const QPen &p) |
| void | setPen (const QPen &p) |
| void | setXDiv (const QwtScaleDiv &sx) |
| void | setYDiv (const QwtScaleDiv &sy) |
| virtual void | updateScaleDiv (const QwtScaleDiv &xMap, const QwtScaleDiv &yMap) |
| bool | xEnabled () const |
| bool | xMinEnabled () const |
| const QwtScaleDiv & | xScaleDiv () const |
| bool | yEnabled () const |
| bool | yMinEnabled () const |
| const QwtScaleDiv & | yScaleDiv () const |
Public Member Functions inherited from QwtPlotItem | |
| QwtPlotItem (const QwtText &title=QwtText()) | |
| virtual | ~QwtPlotItem () |
| void | attach (QwtPlot *plot) |
| virtual QRectF | boundingRect () const |
| void | detach () |
| void | hide () |
| bool | isVisible () const |
| virtual void | itemChanged () |
| virtual QWidget * | legendItem () const |
| QRectF | paintRect (const QwtScaleMap &, const QwtScaleMap &) const |
| QwtPlot * | plot () const |
| QRectF | scaleRect (const QwtScaleMap &, const QwtScaleMap &) const |
| void | setAxes (int xAxis, int yAxis) |
| void | setItemAttribute (ItemAttribute, bool on=true) |
| void | setRenderHint (RenderHint, bool on=true) |
| void | setTitle (const QString &title) |
| void | setTitle (const QwtText &title) |
| virtual void | setVisible (bool) |
| void | setXAxis (int axis) |
| void | setYAxis (int axis) |
| void | setZ (double z) |
| void | show () |
| bool | testItemAttribute (ItemAttribute) const |
| bool | testRenderHint (RenderHint) const |
| const QwtText & | title () const |
| virtual void | updateLegend (QwtLegend *) const |
| int | xAxis () const |
| int | yAxis () const |
| double | z () const |
Public Member Functions inherited from QwtLegendItemManager | |
| QwtLegendItemManager () | |
| virtual | ~QwtLegendItemManager () |
| virtual void | drawLegendIdentifier (QPainter *, const QRectF &) const |
Additional Inherited Members | |
Public Types inherited from QwtPlotItem | |
| enum | ItemAttribute { Legend = 0x01, AutoScale = 0x02 } |
| typedef QFlags< ItemAttribute > | ItemAttributes |
| enum | RenderHint { RenderAntialiased = 1 } |
| typedef QFlags< RenderHint > | RenderHints |
| enum | RttiValues { Rtti_PlotItem = 0, Rtti_PlotGrid, Rtti_PlotScale, Rtti_PlotMarker, Rtti_PlotCurve, Rtti_PlotSpectroCurve, Rtti_PlotIntervalCurve, Rtti_PlotHistogram, Rtti_PlotSpectrogram, Rtti_PlotSVG, Rtti_PlotUserItem = 1000 } |
A class which draws a coordinate grid.
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 setXDiv() and setYDiv(). The draw() member draws the grid within a bounding rectangle.
|
virtual |
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.
| painter | Painter |
| xMap | X axis map |
| yMap | Y axis |
| canvasRect | Contents rect of the plot canvas |
Implements QwtPlotItem.
| void QwtPlotGrid::enableX | ( | bool | tf | ) |
Enable or disable vertical gridlines.
| tf | Enable (true) or disable |
| void QwtPlotGrid::enableXMin | ( | bool | tf | ) |
Enable or disable minor vertical gridlines.
| tf | Enable (true) or disable |
| void QwtPlotGrid::enableY | ( | bool | tf | ) |
Enable or disable horizontal gridlines.
| tf | Enable (true) or disable |
| void QwtPlotGrid::enableYMin | ( | bool | tf | ) |
Enable or disable minor horizontal gridlines.
| tf | Enable (true) or disable |
| const QPen & QwtPlotGrid::majPen | ( | ) | const |
| const QPen & QwtPlotGrid::minPen | ( | ) | const |
|
virtual |
Reimplemented from QwtPlotItem.
| void QwtPlotGrid::setMajPen | ( | const QPen & | pen | ) |
| void QwtPlotGrid::setMinPen | ( | const QPen & | pen | ) |
| void QwtPlotGrid::setPen | ( | const QPen & | pen | ) |
Assign a pen for both major and minor gridlines
| pen | Pen |
| void QwtPlotGrid::setXDiv | ( | const QwtScaleDiv & | scaleDiv | ) |
Assign an x axis scale division
| scaleDiv | Scale division |
| void QwtPlotGrid::setYDiv | ( | const QwtScaleDiv & | scaleDiv | ) |
Assign a y axis division
| scaleDiv | Scale division |
|
virtual |
Update the grid to changes of the axes scale division
| xScaleDiv | Scale division of the x-axis |
| yScaleDiv | Scale division of the y-axis |
Reimplemented from QwtPlotItem.
| bool QwtPlotGrid::xEnabled | ( | ) | const |
| bool QwtPlotGrid::xMinEnabled | ( | ) | const |
| const QwtScaleDiv & QwtPlotGrid::xScaleDiv | ( | ) | const |
| bool QwtPlotGrid::yEnabled | ( | ) | const |
| bool QwtPlotGrid::yMinEnabled | ( | ) | const |
| const QwtScaleDiv & QwtPlotGrid::yScaleDiv | ( | ) | const |
1.8.1