QwtGrid(3)

NAME
QwtGrid - A class which draws a coordinate grid.

SYNOPSIS

#include <qwt_grid.h>

Inherited by QwtPlotGrid.

  Public Methods
QwtGrid ()
virtual ~QwtGrid ()
virtual const QwtGrid & operator= (const QwtGrid &g)
virtual void draw (QPainter *p, const QRect &r, const QwtDiMap &mx, const QwtDiMap &my)
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 Methods
virtual void gridChanged ()

DETAILED DESCRIPTION

A class which draws a coordinate grid.

 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.

CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

  QwtGrid::QwtGrid ()

Enables major grid, disables minor grid.

  QwtGrid::~QwtGrid () [virtual]

dtor.

MEMBER FUNCTION DOCUMENTATION

  void QwtGrid::draw (QPainter * p, const QRect & r, const QwtDiMap & mx, const QwtDiMap & my) [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.

Parameters:

p   Painter

r   Bounding rectangle

mx  X axis map

my  Y axis

  void QwtGrid::enableX (bool tf)

Enable or disable vertical gridlines.

Parameters:

tf  Enable (TRUE) or disable

See also:
Minor gridlines can be enabled or disabled with QwtGrid::enableXMin()

  void QwtGrid::enableXMin (bool tf)

Enable or disable minor vertical gridlines.

Parameters:

tf  Enable (TRUE) or disable

See also:
QwtGrid::enableX()

  void QwtGrid::enableY (bool tf)

Enable or disable horizontal gridlines.

Parameters:

tf  Enable (TRUE) or disable

See also:
Minor gridlines can be enabled or disabled with QwtGrid::enableYMin()

  void QwtGrid::enableYMin (bool tf)

Enable or disable minor horizontal gridlines.

Parameters:

tf  Enable (TRUE) or disable

See also:
QwtGrid::enableY()

  void QwtGrid::gridChanged () [protected, virtual]

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.

  const QPen & QwtGrid::majPen () const

Returns:
the pen for the major gridlines

See also:
QwtGrid::setMinPen, QwtGrid::setPen

  const QPen & QwtGrid::minPen () const

Returns:
the pen for the minor gridlines

See also:
QwtGrid::setMinPen, QwtGrid::setPen

  const QwtGrid & QwtGrid::operator= (const QwtGrid & g) [virtual]

Assignment operator.

Parameters:

g   Grid to be assigned

  void QwtGrid::setMajPen (const QPen & p)

Assign a pen for the major gridlines.

Parameters:

p   Pen

  void QwtGrid::setMinPen (const QPen & p)

Assign a pen for the minor gridlines.

Parameters:

p   Pen

  void QwtGrid::setPen (const QPen & p)

Assign a pen for both major and minor gridlines.

Parameters:

p   Pen

  void QwtGrid::setXDiv (const QwtScaleDiv & sx)

Assign an x axis scale division.

Parameters:

sx  Scale division

Warning:
QwtGrid uses implicit sharing (see Qt Manual) for the scale divisions.

See also:
QwtScaleDiv

  void QwtGrid::setYDiv (const QwtScaleDiv & sy)

Assign a y axis division.

Parameters:

sy  Scale division

Warning:
QwtGrid uses implicit sharing (see Qt Manual) for the scale divisions.

See also:
QwtScaleDiv

  bool QwtGrid::xEnabled () const

Returns:
TRUE if vertical gridlines are enabled

See also:
QwtGrid::enableX

  bool QwtGrid::xMinEnabled () const

Returns:
TRUE if minor vertical gridlines are enabled

See also:
QwtGrid::enableXMin

  const QwtScaleDiv & QwtGrid::xScaleDiv () const

Returns:
the scale division of the x axis

  bool QwtGrid::yEnabled () const

Returns:
TRUE if horizontal gridlines are enabled

See also:
QwtGrid::enableY

  bool QwtGrid::yMinEnabled () const

Returns:
TRUE if minor horizontal gridlines are enabled

See also:
QwtGrid::enableYMin

  const QwtScaleDiv & QwtGrid::yScaleDiv () const

Returns:
the scale division of the y axis

AUTHOR

Generated automatically by Doxygen for Qwt User's Guide from the source code.