SciDAVis
1.D4
|
#include <Grid.h>
Public Member Functions | |
void | copy (Grid *) |
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 |
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) |
bool | xZeroLineEnabled () |
bool | yZeroLineEnabled () |
Private Attributes | |
QPen | d_maj_pen_y |
QPen | d_min_pen_y |
long | mrkX |
long | mrkY |
2D Grid class
Grid::Grid | ( | ) |
References d_maj_pen_y, and d_min_pen_y.
void Grid::copy | ( | Grid * | grid | ) |
References enableZeroLineX(), enableZeroLineY(), majPenX(), majPenY(), minPenX(), minPenY(), setMajPenX(), setMajPenY(), setMinPenX(), setMinPenY(), xZeroLineEnabled(), and yZeroLineEnabled().
Referenced by Graph::copy().
void Grid::draw | ( | QPainter * | painter, |
const QwtScaleMap & | mx, | ||
const QwtScaleMap & | my, | ||
const QRect & | r | ||
) | const |
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 |
mx | X axis map |
my | Y axis |
r | Contents 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 |
Referenced by draw().
void Grid::enableZeroLineX | ( | bool | enable = true | ) |
References Plot::axesLinewidth(), Plot::insertMarker(), mrkX, and Plot::removeMarker().
Referenced by copy(), ImportOPJ::importGraphs(), load(), and AxesDialog::updateGrid().
void Grid::enableZeroLineY | ( | bool | enable = true | ) |
References Plot::axesLinewidth(), Plot::insertMarker(), mrkY, and Plot::removeMarker().
Referenced by copy(), ImportOPJ::importGraphs(), load(), and AxesDialog::updateGrid().
void Grid::load | ( | const QStringList & | grid | ) |
References ColorBox::color(), enableZeroLineX(), enableZeroLineY(), Graph::getPenStyle(), majPenX(), majPenY(), minPenX(), minPenY(), setMajPenX(), setMajPenY(), setMinPenX(), and setMinPenY().
Referenced by ApplicationWindow::openGraph().
|
inline |
Referenced by copy(), load(), saveToString(), and AxesDialog::showGridOptions().
|
inline |
References d_maj_pen_y.
Referenced by copy(), load(), saveToString(), and AxesDialog::showGridOptions().
|
inline |
Referenced by copy(), load(), saveToString(), and AxesDialog::showGridOptions().
|
inline |
References d_min_pen_y.
Referenced by copy(), load(), saveToString(), and AxesDialog::showGridOptions().
QString Grid::saveToString | ( | ) |
References majPenX(), majPenY(), minPenX(), minPenY(), xZeroLineEnabled(), and yZeroLineEnabled().
Referenced by Graph::saveToString().
|
inline |
Referenced by copy(), ImportOPJ::importGraphs(), load(), Plot::Plot(), and AxesDialog::updateGrid().
|
inline |
References d_maj_pen_y.
Referenced by copy(), ImportOPJ::importGraphs(), load(), and AxesDialog::updateGrid().
|
inline |
Referenced by copy(), ImportOPJ::importGraphs(), load(), Plot::Plot(), and AxesDialog::updateGrid().
|
inline |
References d_min_pen_y.
Referenced by copy(), ImportOPJ::importGraphs(), load(), and AxesDialog::updateGrid().
|
inline |
References mrkX.
Referenced by copy(), saveToString(), and AxesDialog::showGridOptions().
|
inline |
References mrkY.
Referenced by copy(), saveToString(), and AxesDialog::showGridOptions().
|
private |
Referenced by draw(), Grid(), majPenY(), and setMajPenY().
|
private |
Referenced by draw(), Grid(), minPenY(), and setMinPenY().
|
private |
Referenced by enableZeroLineX(), and xZeroLineEnabled().
|
private |
Referenced by enableZeroLineY(), and yZeroLineEnabled().