Analitza
#include <plotter2d.h>
Protected Member Functions | |
QPair< QPointF, QString > | calcImage (const QPointF &ndp) const |
virtual int | currentFunction () const =0 |
virtual void | drawFunctions (QPaintDevice *qpd) |
virtual void | drawGrid (QPaintDevice *qpd) |
virtual void | forceRepaint ()=0 |
QPointF | fromWidget (const QPoint &p) const |
QRectF | lastUserViewport () const |
virtual void | modelChanged ()=0 |
QRectF | normalizeUserViewport (const QRectF uvp) |
void | scaleViewport (qreal scale, const QPoint ¢er, bool repaint=true) |
void | setPaintedSize (const QSize &size) |
QLineF | slope (const QPointF &dp) const |
QPointF | toViewport (const QPoint &mv) const |
QPointF | toWidget (const QPointF &) const |
QLineF | toWidget (const QLineF &) const |
void | updateScale (bool repaint) |
virtual void | viewportChanged ()=0 |
Detailed Description
Render 2D plots.
This class uses QPainter as backend for drawing plots. The default value of showGrid is true. The default grid color is Qt::lightGray. The default background color is Qt::white. The default value of autoGridStyle is true.
Definition at line 55 of file plotter2d.h.
Constructor & Destructor Documentation
Analitza::Plotter2D::Plotter2D | ( | const QSizeF & | size | ) |
|
virtual |
Member Function Documentation
|
inline |
Definition at line 125 of file plotter2d.h.
|
inline |
Returns whether we will change automatically the grid style based on the curent plot.
Definition at line 86 of file plotter2d.h.
|
inline |
Definition at line 80 of file plotter2d.h.
|
protectedpure virtual |
|
inline |
Definition at line 108 of file plotter2d.h.
|
protectedvirtual |
|
protectedvirtual |
|
protectedpure virtual |
|
inline |
Definition at line 75 of file plotter2d.h.
|
inline |
Sets whether it is keeping the aspect ratio (1:1 grid).
Definition at line 95 of file plotter2d.h.
|
inlineprotected |
Definition at line 155 of file plotter2d.h.
|
inline |
Definition at line 111 of file plotter2d.h.
|
inline |
Definition at line 101 of file plotter2d.h.
|
protectedpure virtual |
void Analitza::Plotter2D::moveViewport | ( | const QPoint & | delta | ) |
Moves the viewport delta
.
|
inline |
Definition at line 121 of file plotter2d.h.
|
protected |
|
inline |
Definition at line 124 of file plotter2d.h.
|
inline |
If true then we ignore the grid style suggested by setGridStyleHint, if false then we use as grid style the hint.
Definition at line 83 of file plotter2d.h.
|
inline |
Definition at line 77 of file plotter2d.h.
|
inline |
Definition at line 72 of file plotter2d.h.
void Analitza::Plotter2D::setGridStyleHint | ( | GridStyle | suggestedgs | ) |
Sets the suggested grid style.
Only works if autoGridStyle is false. Note that we only accept CoordinateSystem::Cartesian or CoordinateSystem::Polar.
void Analitza::Plotter2D::setKeepAspectRatio | ( | bool | ar | ) |
Sets whether it has to keep the aspect ratio (1:1 grid).
void Analitza::Plotter2D::setModel | ( | QAbstractItemModel * | f | ) |
|
protected |
|
inline |
Definition at line 120 of file plotter2d.h.
|
inline |
Definition at line 136 of file plotter2d.h.
|
inline |
Sets whether we will draw the grid.
Definition at line 65 of file plotter2d.h.
|
inline |
Definition at line 67 of file plotter2d.h.
|
inline |
Definition at line 130 of file plotter2d.h.
|
inline |
Definition at line 134 of file plotter2d.h.
|
inline |
Definition at line 133 of file plotter2d.h.
|
inline |
Definition at line 128 of file plotter2d.h.
|
inline |
Definition at line 127 of file plotter2d.h.
void Analitza::Plotter2D::setViewport | ( | const QRectF & | vp, |
bool | repaint = true |
||
) |
Sets the graph's viewport to v
.
void Analitza::Plotter2D::setXAxisLabel | ( | const QString & | label | ) |
void Analitza::Plotter2D::setYAxisLabel | ( | const QString & | label | ) |
|
inline |
Returns whether we have chosen to draw the grid.
Definition at line 70 of file plotter2d.h.
|
inline |
Definition at line 138 of file plotter2d.h.
void Analitza::Plotter2D::updateFunctions | ( | const QModelIndex & | parent, |
int | start, | ||
int | end | ||
) |
Force the functions from start
to end
to be recalculated.
|
protected |
|
protectedpure virtual |
void Analitza::Plotter2D::zoomIn | ( | bool | repaint = true | ) |
Zooms in to the Viewport center.
void Analitza::Plotter2D::zoomOut | ( | bool | repaint = true | ) |
Zooms out taken ref center too.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:37 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.