![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Responsible for drawing the grid of a QCPAxis. More...
#include <qcustomplot.h>


Public Member Functions | |
| QCPGrid (QCPAxis *parentAxis) | |
| bool | subGridVisible () const |
| bool | antialiasedSubGrid () const |
| bool | antialiasedZeroLine () const |
| QPen | pen () const |
| QPen | subGridPen () const |
| QPen | zeroLinePen () const |
| void | setSubGridVisible (bool visible) |
| void | setAntialiasedSubGrid (bool enabled) |
| void | setAntialiasedZeroLine (bool enabled) |
| void | setPen (const QPen &pen) |
| void | setSubGridPen (const QPen &pen) |
| void | setZeroLinePen (const QPen &pen) |
| QCPGrid (QCPAxis *parentAxis) | |
| bool | subGridVisible () const |
| bool | antialiasedSubGrid () const |
| bool | antialiasedZeroLine () const |
| QPen | pen () const |
| QPen | subGridPen () const |
| QPen | zeroLinePen () const |
| void | setSubGridVisible (bool visible) |
| void | setAntialiasedSubGrid (bool enabled) |
| void | setAntialiasedZeroLine (bool enabled) |
| void | setPen (const QPen &pen) |
| void | setSubGridPen (const QPen &pen) |
| void | setZeroLinePen (const QPen &pen) |
Public Member Functions inherited from QCPLayerable | |
| QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0) | |
| virtual | ~QCPLayerable () |
| bool | visible () const |
| QCustomPlot * | parentPlot () const |
| QCPLayerable * | parentLayerable () const |
| QCPLayer * | layer () const |
| bool | antialiased () const |
| void | setVisible (bool on) |
| Q_SLOT bool | setLayer (QCPLayer *layer) |
| bool | setLayer (const QString &layerName) |
| void | setAntialiased (bool enabled) |
| virtual double | selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const |
| bool | realVisibility () const |
| QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0) | |
| ~QCPLayerable () | |
| bool | visible () const |
| QCustomPlot * | parentPlot () const |
| QCPLayerable * | parentLayerable () const |
| QCPLayer * | layer () const |
| bool | antialiased () const |
| void | setVisible (bool on) |
| Q_SLOT bool | setLayer (QCPLayer *layer) |
| bool | setLayer (const QString &layerName) |
| void | setAntialiased (bool enabled) |
| virtual double | selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const |
| bool | realVisibility () const |
Protected Member Functions | |
| virtual void | applyDefaultAntialiasingHint (QCPPainter *painter) const |
| virtual void | draw (QCPPainter *painter) |
| void | drawGridLines (QCPPainter *painter) const |
| void | drawSubGridLines (QCPPainter *painter) const |
| virtual void | applyDefaultAntialiasingHint (QCPPainter *painter) const |
| virtual void | draw (QCPPainter *painter) |
| void | drawGridLines (QCPPainter *painter) const |
| void | drawSubGridLines (QCPPainter *painter) const |
Protected Member Functions inherited from QCPLayerable | |
| virtual void | parentPlotInitialized (QCustomPlot *parentPlot) |
| virtual QCP::Interaction | selectionCategory () const |
| virtual QRect | clipRect () const |
| virtual void | selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) |
| virtual void | deselectEvent (bool *selectionStateChanged) |
| virtual void | mousePressEvent (QMouseEvent *event, const QVariant &details) |
| virtual void | mouseMoveEvent (QMouseEvent *event, const QPointF &startPos) |
| virtual void | mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos) |
| virtual void | mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details) |
| virtual void | wheelEvent (QWheelEvent *event) |
| void | initializeParentPlot (QCustomPlot *parentPlot) |
| void | setParentLayerable (QCPLayerable *parentLayerable) |
| bool | moveToLayer (QCPLayer *layer, bool prepend) |
| void | applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const |
| virtual void | parentPlotInitialized (QCustomPlot *parentPlot) |
| virtual QCP::Interaction | selectionCategory () const |
| virtual QRect | clipRect () const |
| virtual void | selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) |
| virtual void | deselectEvent (bool *selectionStateChanged) |
| void | initializeParentPlot (QCustomPlot *parentPlot) |
| void | setParentLayerable (QCPLayerable *parentLayerable) |
| bool | moveToLayer (QCPLayer *layer, bool prepend) |
| void | applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const |
Protected Attributes | |
| bool | mSubGridVisible |
| bool | mAntialiasedSubGrid |
| bool | mAntialiasedZeroLine |
| QPen | mPen |
| QPen | mSubGridPen |
| QPen | mZeroLinePen |
| QCPAxis * | mParentAxis |
Protected Attributes inherited from QCPLayerable | |
| bool | mVisible |
| QCustomPlot * | mParentPlot |
| QPointer< QCPLayerable > | mParentLayerable |
| QCPLayer * | mLayer |
| bool | mAntialiased |
Additional Inherited Members | |
Signals inherited from QCPLayerable | |
| void | layerChanged (QCPLayer *newLayer) |
| void | layerChanged (QCPLayer *newLayer) |
Responsible for drawing the grid of a QCPAxis.
This class is tightly bound to QCPAxis. Every axis owns a grid instance and uses it to draw the grid lines, sub grid lines and zero-line. You can interact with the grid of an axis via QCPAxis::grid. Normally, you don't need to create an instance of QCPGrid yourself.
The axis and grid drawing was split into two classes to allow them to be placed on different layers (both QCPAxis and QCPGrid inherit from QCPLayerable). Thus it is possible to have the grid in the background and the axes in the foreground, and any plottables/items in between. This described situation is the default setup, see the QCPLayer documentation.
Definition at line 2202 of file qcustomplot.h.
|
explicit |
Creates a QCPGrid instance and sets default values.
You shouldn't instantiate grids on their own, since every QCPAxis brings its own QCPGrid.
Definition at line 7349 of file qcustomplot.cpp.
References QCPLayerable::setAntialiased(), setAntialiasedSubGrid(), setAntialiasedZeroLine(), setPen(), setSubGridPen(), setSubGridVisible(), and setZeroLinePen().
| QCPGrid::QCPGrid | ( | QCPAxis * | parentAxis | ) |
|
inline |
Definition at line 2219 of file qcustomplot.h.
|
inline |
Definition at line 1166 of file qcustomplot.h.
|
inline |
Definition at line 2220 of file qcustomplot.h.
|
inline |
Definition at line 1167 of file qcustomplot.h.
|
protectedvirtual |
Implements QCPLayerable.
Definition at line 7418 of file qcustomplot.cpp.
References QCP::aeGrid, QCPLayerable::applyAntialiasingHint(), and QCPLayerable::mAntialiased.
Referenced by drawGridLines().
|
protectedvirtual |
Implements QCPLayerable.
|
protectedvirtual |
Implements QCPLayerable.
Definition at line 7428 of file qcustomplot.cpp.
References drawGridLines(), drawSubGridLines(), mParentAxis, mSubGridVisible, and QCPAxis::subTicks().
|
protectedvirtual |
Implements QCPLayerable.
|
protected |
Definition at line 7444 of file qcustomplot.cpp.
References QCP::aeZeroLine, QCPLayerable::applyAntialiasingHint(), applyDefaultAntialiasingHint(), QCPAxisRect::bottom(), QCPAxis::coordToPixel(), QCPPainter::drawLine(), QCPAxisRect::left(), QCPRange::lower, mAntialiasedZeroLine, QCPAxis::mAxisRect, mParentAxis, mPen, QCPAxis::mRange, QCPAxis::mTickVector, mZeroLinePen, QCPAxis::orientation(), QCPAxis::range(), QCPAxisRect::right(), QCPPainter::setPen(), QCPRange::size(), QCPAxisRect::top(), and QCPRange::upper.
Referenced by draw().
|
protected |
|
protected |
Definition at line 7525 of file qcustomplot.cpp.
References QCP::aeSubGrid, QCPLayerable::applyAntialiasingHint(), QCPAxisRect::bottom(), QCPAxis::coordToPixel(), QCPPainter::drawLine(), QCPAxisRect::left(), mAntialiasedSubGrid, QCPAxis::mAxisRect, mParentAxis, mSubGridPen, QCPAxis::mSubTickVector, QCPAxis::orientation(), QCPAxisRect::right(), QCPPainter::setPen(), and QCPAxisRect::top().
Referenced by draw().
|
protected |
|
inline |
Definition at line 2221 of file qcustomplot.h.
Referenced by setPen(), setSubGridPen(), and setZeroLinePen().
|
inline |
Definition at line 1168 of file qcustomplot.h.
| void QCPGrid::setAntialiasedSubGrid | ( | bool | enabled | ) |
Sets whether sub grid lines are drawn antialiased.
Definition at line 7374 of file qcustomplot.cpp.
References mAntialiasedSubGrid.
Referenced by QCPGrid().
| void QCPGrid::setAntialiasedSubGrid | ( | bool | enabled | ) |
| void QCPGrid::setAntialiasedZeroLine | ( | bool | enabled | ) |
Sets whether zero lines are drawn antialiased.
Definition at line 7381 of file qcustomplot.cpp.
References mAntialiasedZeroLine.
Referenced by QCPGrid().
| void QCPGrid::setAntialiasedZeroLine | ( | bool | enabled | ) |
| void QCPGrid::setPen | ( | const QPen & | pen | ) |
Sets the pen with which (major) grid lines are drawn.
Definition at line 7388 of file qcustomplot.cpp.
Referenced by QCPGrid().
| void QCPGrid::setPen | ( | const QPen & | pen | ) |
| void QCPGrid::setSubGridPen | ( | const QPen & | pen | ) |
Sets the pen with which sub grid lines are drawn.
Definition at line 7393 of file qcustomplot.cpp.
References mSubGridPen, and pen().
Referenced by QCPGrid().
| void QCPGrid::setSubGridPen | ( | const QPen & | pen | ) |
| void QCPGrid::setSubGridVisible | ( | bool | visible | ) |
Sets whether grid lines at sub tick marks are drawn.
Definition at line 7369 of file qcustomplot.cpp.
References mSubGridVisible, and QCPLayerable::visible().
Referenced by QCPGrid().
| void QCPGrid::setSubGridVisible | ( | bool | visible | ) |
| void QCPGrid::setZeroLinePen | ( | const QPen & | pen | ) |
Sets the pen with which zero lines are drawn.
Zero lines are lines at value coordinate 0 which may be drawn with a different pen than other grid lines. To disable zero lines and just draw normal grid lines at zero, set pen to Qt::NoPen.
Definition at line 7402 of file qcustomplot.cpp.
References mZeroLinePen, and pen().
Referenced by QCPAxisRect::QCPAxisRect(), and QCPGrid().
| void QCPGrid::setZeroLinePen | ( | const QPen & | pen | ) |
|
inline |
Definition at line 2222 of file qcustomplot.h.
|
inline |
Definition at line 1169 of file qcustomplot.h.
|
inline |
Definition at line 2218 of file qcustomplot.h.
|
inline |
Definition at line 1165 of file qcustomplot.h.
|
inline |
Definition at line 2223 of file qcustomplot.h.
|
inline |
Definition at line 1170 of file qcustomplot.h.
|
protected |
Definition at line 2236 of file qcustomplot.h.
Referenced by drawSubGridLines(), and setAntialiasedSubGrid().
|
protected |
Definition at line 2236 of file qcustomplot.h.
Referenced by drawGridLines(), and setAntialiasedZeroLine().
|
protected |
Definition at line 2240 of file qcustomplot.h.
Referenced by draw(), drawGridLines(), and drawSubGridLines().
|
protected |
Definition at line 2237 of file qcustomplot.h.
Referenced by drawGridLines(), and setPen().
|
protected |
Definition at line 2237 of file qcustomplot.h.
Referenced by drawSubGridLines(), and setSubGridPen().
|
protected |
Definition at line 2235 of file qcustomplot.h.
Referenced by draw(), and setSubGridVisible().
|
protected |
Definition at line 2237 of file qcustomplot.h.
Referenced by drawGridLines(), and setZeroLinePen().