20#ifndef jkqtpvectorfield_H
21#define jkqtpvectorfield_H
28#include "jkqtplotter/jkqtptools.h"
29#include "jkqtplotter/jkqtplotter_imexport.h"
30#include "jkqtplotter/jkqtpgraphsbase.h"
31#include "jkqtplotter/jkqtpgraphsbasestylingmixins.h"
105 Q_ENUM(VectorAnchorPoint)
116 Q_ENUM(VectorLengthMode)
125 Q_ENUM(VectorLineWidthMode)
296 Q_ENUM(VectorColorMode)
base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
Definition jkqtpbaseplotter.h:394
this virtual class is the base for any type of coordinate axis, to be drawn by JKQTBasePlotter.
Definition jkqtpcoordinateaxes.h:181
This class manages data columns (with entries of type double ), used by JKQTPlotter/JKQTBasePlotter t...
Definition jkqtpdatastorage.h:282
this class extends the QPainter
Definition jkqtpenhancedpainter.h:33
JKQTPGraphDecoratedLineStyleMixin()
class constructor
int m_colorColumn
this column contains the symbol color
Definition jkqtpvectorfield.h:343
void setColorColumn(int __value)
this column contains the symbol color
virtual void getOutsideSize(JKQTPEnhancedPainter &painter, int &leftSpace, int &rightSpace, int &topSpace, int &bottomSpace) override
if the graph plots outside the actual plot field of view (e.g. color bars, scale bars,...
virtual bool usesColumn(int c) const override
returns true if the given column is used by the graph
virtual void drawKeyMarker(JKQTPEnhancedPainter &painter, const QRectF &rect) override
plots a key marker inside the specified rectangle rect
virtual void cbGetDataMinMax(double &imin, double &imax) override
determine min/max data value of the image
double m_intColMax
internally used to store the range of the color column
Definition jkqtpvectorfield.h:356
void setColorColumnContainsRGB(bool __value)
if this is true, the value in the colorColumn is converted to an integer, representing a color in ARG...
virtual QColor getLocalVectorColor(int i, double x, double y, double dx, double dy) const override
int getColorColumn() const
this column contains the symbol color
double m_intColMin
internally used to store the range of the color column
Definition jkqtpvectorfield.h:352
VectorColorMode m_vectorColorMode
indicates how color is determined from data (either from the vector or from m_colorColumn)
Definition jkqtpvectorfield.h:358
virtual void draw(JKQTPEnhancedPainter &painter) override
plots the graph to the plotter object specified as parent
bool m_colorColumnContainsRGB
if this is true, the value in the colorColumn is converted to an integer, representing a color in ARG...
Definition jkqtpvectorfield.h:348
JKQTPParametrizedVectorFieldGraph(JKQTBasePlotter *parent=nullptr)
class constructor
virtual void setParent(JKQTBasePlotter *parent) override
sets the parent painter class
virtual void drawOutside(JKQTPEnhancedPainter &painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace) override
plots outside the actual plot field of view (e.g. color bars, scale bars, ...)
void setVectorColorMode(VectorColorMode __value)
indicates how color is determined from data (either from the vector or from m_colorColumn)
VectorColorMode getVectorColorMode() const
indicates how color is determined from data (either from the vector or from m_colorColumn)
bool getColorColumnContainsRGB() const
if this is true, the value in the colorColumn is converted to an integer, representing a color in ARG...
VectorColorMode
determines how the color of the vector is determined
Definition jkqtpvectorfield.h:290
@ ColorFromAngle
color-coding by vector angle
Definition jkqtpvectorfield.h:293
@ DefaultColor
no color-coding, just use getLineColor()
Definition jkqtpvectorfield.h:291
@ ColorFromMagnitude
color-coding by vector magnitude/length
Definition jkqtpvectorfield.h:292
@ ColorFromCustomColumn
color-coding from getColorColumn() column
Definition jkqtpvectorfield.h:294
JKQTBasePlotter * parent
the plotter object this object belongs to
Definition jkqtpgraphsbase.h:386
VectorLineWidthMode
describes how the line width scales with the vector properties (or not)
Definition jkqtpvectorfield.h:119
@ AutoscaleLineWidthFromLength
line width is determined from the vector length. The maximum line width is given by JKQTPGraphLineSty...
Definition jkqtpvectorfield.h:121
@ DefaultVectorLineWidth
line width is equal to JKQTPGraphLineStyleMixin::getLineWidth() for all vectors
Definition jkqtpvectorfield.h:120
void setVectorLengthMode(VectorLengthMode newMode)
indicates how the length of the drawn vectors are determined from the data
VectorLineWidthMode vectorLineWidthMode
Definition jkqtpvectorfield.h:175
VectorLengthMode m_vectorLengthMode
indicates how the length of the drawn vectors are determined from the data
Definition jkqtpvectorfield.h:205
double m_minLineWidth
minimum line-width in pt, used for some modes of m_vectorLineWidthMode
Definition jkqtpvectorfield.h:233
double minLineWidth
Definition jkqtpvectorfield.h:174
virtual QColor getLocalVectorColor(int i, double x, double y, double dx, double dy) const
internal color functor, a customization point for derived classes
void setVectorLineWidthMode(VectorLineWidthMode m)
determines how the line width of the vectors is derived.
VectorAnchorPoint m_anchorPoint
defines where the vector is anchored
Definition jkqtpvectorfield.h:221
virtual QColor getKeyLabelColor() const override
returns the color to be used for the key label
VectorLengthMode getVectorLengthMode() const
indicates how the length of the drawn vectors are determined from the data
double getMinLineWIdth() const
minimum line-width in pt, used for some modes of m_vectorLineWidthMode
double getLengthScaleFactor() const
if m_vectorLengthMode ==false, this is the scale-factor used to calculate the vector length
VectorAnchorPoint
indicates the position of the point (x,y) relative to the vector
Definition jkqtpvectorfield.h:100
@ AnchorTip
the vector ends at (x,y)
Definition jkqtpvectorfield.h:103
@ AnchorMid
the vector's mid is at (x,y)
Definition jkqtpvectorfield.h:102
@ AnchorBottom
this is the default: the vector starts at (x,y)
Definition jkqtpvectorfield.h:101
VectorLengthMode vectorLengthMode
Definition jkqtpvectorfield.h:170
double m_minVecLen
internally calculated (before draw() actually draws) minimum vector length
Definition jkqtpvectorfield.h:238
VectorAnchorPoint anchorPoint
Definition jkqtpvectorfield.h:173
VectorLengthMode
indicates how the drawn vector's length is calculated from the data
Definition jkqtpvectorfield.h:111
@ AutoscaleLength
this is the default: vector lengths are autoscaled, so they don't overlap (in first approximation)
Definition jkqtpvectorfield.h:112
@ LengthFromData
the vector's length is determined by the data directly
Definition jkqtpvectorfield.h:113
@ IgnoreLength
all vectors have the same length
Definition jkqtpvectorfield.h:114
VectorLineWidthMode m_vectorLineWidthMode
determines how the line width of the vectors is derived.
Definition jkqtpvectorfield.h:228
double getMaxVecLen() const
acess to internally calculated (before draw() actually draws) maximum vector length
Definition jkqtpvectorfield.h:186
JKQTPVectorFieldGraph(JKQTBasePlotter *parent=nullptr)
class constructor
double m_lengthScaleFactor
if m_vectorLengthMode ==false, this is the scale-factor used to calculate the vector length
Definition jkqtpvectorfield.h:216
void setAnchorPoint(VectorAnchorPoint newAnchorPoint)
defines where the vector is anchored
double getAutoscaleLengthFactor() const
a scaling factor that can be used to modify the result of the autoscaling algorithm (m_vectorLengthMo...
virtual void drawKeyMarker(JKQTPEnhancedPainter &painter, const QRectF &rect) override
plots a key marker inside the specified rectangle rect
VectorLineWidthMode getVectorLineWidthMode() const
determines how the line width of the vectors is derived.
void setMinLineWidth(double lw)
minimum line-width in pt, used for some modes of m_vectorLineWidthMode
void setLengthScaleFactor(double newLengthScaleFactor)
if m_vectorLengthMode ==false, this is the scale-factor used to calculate the vector length
bool autoscaleLengthFactor
Definition jkqtpvectorfield.h:171
void setAutoscaleLengthFactor(double newAutoscaleLengthFactor)
a scaling factor that can be used to modify the result of the autoscaling algorithm (m_vectorLengthMo...
VectorAnchorPoint getAnchorPoint() const
defines where the vector is anchored
virtual void draw(JKQTPEnhancedPainter &painter) override
plots the graph to the plotter object specified as parent
double lengthScaleFactor
Definition jkqtpvectorfield.h:172
double m_autoscaleLengthFactor
a scaling factor that can be used to modify the result of the autoscaling algorithm (m_vectorLengthMo...
Definition jkqtpvectorfield.h:211
double m_maxVecLen
internally calculated (before draw() actually draws) maximum vector length
Definition jkqtpvectorfield.h:242
double getMinVecLen() const
acess to internally calculated (before draw() actually draws) minimum vector length
Definition jkqtpvectorfield.h:183
JKQTPXYAndVectorGraph(JKQTBasePlotter *parent=nullptr)
class constructor
plotter widget for scientific plots (uses JKQTBasePlotter to do the actual drawing)
Definition jkqtplotter.h:374
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89