QwtGrid(3)

NAME
QwtGrid - A class which draws a coordinate grid.

SYNOPSIS

#include <qwt_grid.h>

Inherited by QwtPlotGrid.

  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

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 setYDiv() The draw() member draws the grid within a bounding rectangle.

CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

  QwtGrid::QwtGrid ()

ctor.

  QwtGrid::~QwtGrid () [virtual]

dtor.

MEMBER FUNCTION DOCUMENTATION

  void QwtGrid::draw (QPainter * p, const QRect & r, const QwtDiMap & mx, const QwtDiMap & my)

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 enableXMin()

  void QwtGrid::enableXMin (bool tf)

Enable or disable minor vertical gridlines.

Parameters:

tf  Enable (TRUE) or disable

See also:
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 enableYMin()

  void QwtGrid::enableYMin (bool tf)

Enable or disable minor horizontal gridlines.

Parameters:

tf  Enable (TRUE) or disable

See also:
enableY()

  virtual 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.

  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)

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.