QtiPlot  0.9.8.2
Public Member Functions | Private Member Functions | Private Attributes
Grid Class Reference

#include <Grid.h>

List of all members.

Public Member Functions

void copy (Grid *)
void enableZeroLineX (bool enable=true)
void enableZeroLineY (bool enable=true)
 Grid ()
void load (const QStringList &)
const QPen & majPenX () const
const QPen & majPenY () const
const QPen & minPenX () const
const QPen & minPenY () const
QString saveToString ()
void setMajPenX (const QPen &p)
void setMajPenY (const QPen &p)
void setMinPenX (const QPen &p)
void setMinPenY (const QPen &p)
void setXZeroLinePen (const QPen &p)
void setYZeroLinePen (const QPen &p)
bool xZeroLineEnabled ()
QwtPlotMarker * xZeroLineMarker ()
const QPen & xZeroLinePen ()
bool yZeroLineEnabled ()
QwtPlotMarker * yZeroLineMarker ()
const QPen & yZeroLinePen ()

Private Member Functions

void draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &rect) const
 Draw the grid.
void drawLines (QPainter *painter, const QRect &rect, Qt::Orientation orientation, const QwtScaleMap &map, const QwtValueList &values) const

Private Attributes

QPen d_maj_pen_y
QPen d_min_pen_y
QwtPlotMarker * mrkX
QwtPlotMarker * mrkY

Constructor & Destructor Documentation


Member Function Documentation

void Grid::copy ( Grid grid)
void Grid::draw ( QPainter *  painter,
const QwtScaleMap &  mx,
const QwtScaleMap &  my,
const QRect &  r 
) const [private]

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:
painterPainter
mxX axis map
myY axis
rContents rect of the plot canvas

References d_maj_pen_y, d_min_pen_y, and drawLines().

void Grid::drawLines ( QPainter *  painter,
const QRect &  rect,
Qt::Orientation  orientation,
const QwtScaleMap &  map,
const QwtValueList &  values 
) const [private]

References Graph::canvasFrameWidth().

Referenced by draw().

void Grid::enableZeroLineX ( bool  enable = true)
void Grid::enableZeroLineY ( bool  enable = true)
void Grid::load ( const QStringList &  grid)
const QPen& Grid::majPenX ( ) const [inline]
const QPen& Grid::majPenY ( ) const [inline]
const QPen& Grid::minPenX ( ) const [inline]
const QPen& Grid::minPenY ( ) const [inline]
QString Grid::saveToString ( )
void Grid::setMajPenX ( const QPen &  p) [inline]
void Grid::setMajPenY ( const QPen &  p) [inline]
void Grid::setMinPenX ( const QPen &  p) [inline]
void Grid::setMinPenY ( const QPen &  p) [inline]
void Grid::setXZeroLinePen ( const QPen &  p)

References mrkX.

void Grid::setYZeroLinePen ( const QPen &  p)

References mrkY.

bool Grid::xZeroLineEnabled ( ) [inline]

References mrkX.

Referenced by copy(), saveToString(), and AxesDialog::showGridOptions().

QwtPlotMarker* Grid::xZeroLineMarker ( ) [inline]
const QPen & Grid::xZeroLinePen ( )

References mrkX.

bool Grid::yZeroLineEnabled ( ) [inline]

References mrkY.

Referenced by copy(), saveToString(), and AxesDialog::showGridOptions().

QwtPlotMarker* Grid::yZeroLineMarker ( ) [inline]
const QPen & Grid::yZeroLinePen ( )

References mrkY.


Member Data Documentation

QPen Grid::d_maj_pen_y [private]

Referenced by draw(), majPenY(), and setMajPenY().

QPen Grid::d_min_pen_y [private]

Referenced by draw(), minPenY(), and setMinPenY().

QwtPlotMarker* Grid::mrkX [private]
QwtPlotMarker * Grid::mrkY [private]

The documentation for this class was generated from the following files: