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)
137 virtual QColor getKeyLabelColor() const override;
145 double getAutoscaleLengthFactor() const;
147 void setAutoscaleLengthFactor(
double newAutoscaleLengthFactor);
150 double getLengthScaleFactor() const;
152 void setLengthScaleFactor(
double newLengthScaleFactor);
166 void setMinLineWidth(
double lw);
168 double getMinLineWIdth() const;
170 Q_PROPERTY(
VectorLengthMode vectorLengthMode READ getVectorLengthMode WRITE setVectorLengthMode )
171 Q_PROPERTY(
bool autoscaleLengthFactor READ getAutoscaleLengthFactor WRITE setAutoscaleLengthFactor )
172 Q_PROPERTY(
double lengthScaleFactor READ getLengthScaleFactor WRITE setLengthScaleFactor )
174 Q_PROPERTY(
double minLineWidth READ getMinLineWIdth WRITE setMinLineWidth )
175 Q_PROPERTY(
VectorLineWidthMode vectorLineWidthMode READ getVectorLineWidthMode WRITE setVectorLineWidthMode )
180 virtual QColor getLocalVectorColor(
int i,
double x,
double y,
double dx,
double dy) const;
183 inline
double getMinVecLen()
const {
return m_minVecLen; };
294 ColorFromCustomColumn
296 Q_ENUM(VectorColorMode)
311 virtual
void getOutsideSize(
JKQTPEnhancedPainter& painter,
int& leftSpace,
int& rightSpace,
int& topSpace,
int& bottomSpace) override;
313 virtual
void drawOutside(
JKQTPEnhancedPainter& painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace) override;
315 virtual
void cbGetDataMinMax(
double& imin,
double& imax) override;
317 virtual
bool usesColumn(
int c) const override;
321 void setColorColumn(
int __value);
323 int getColorColumn() const;
325 void setColorColumn (
size_t __value);
327 void setColorColumnContainsRGB(
bool __value);
329 bool getColorColumnContainsRGB() const;
337 virtual QColor getLocalVectorColor(
int i,
double x,
double y,
double dx,
double dy) const override;
348 bool m_colorColumnContainsRGB;
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
This Mix-In class provides setter/getter methods, storage and other facilities for the graph line sty...
Definition jkqtpgraphsbasestylingmixins.h:303
This graph plots a vector field, i.e. a set of vectors (dx,dy) or (angle,length) at positions (x,...
Definition jkqtpvectorfield.h:286
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
This graph plots a vector field, i.e. a set of vectors (dx,dy) or (angle,length) at positions (x,...
Definition jkqtpvectorfield.h:96
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
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
VectorAnchorPoint m_anchorPoint
defines where the vector is anchored
Definition jkqtpvectorfield.h:221
VectorAnchorPoint
indicates the position of the point (x,y) relative to the vector
Definition jkqtpvectorfield.h:100
@ 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
double m_minVecLen
internally calculated (before draw() actually draws) minimum vector length
Definition jkqtpvectorfield.h:238
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
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
double m_lengthScaleFactor
if m_vectorLengthMode ==false, this is the scale-factor used to calculate the vector length
Definition jkqtpvectorfield.h:216
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
This virtual JKQTPGraph descendent extends JKQTPXYGraph with two additional columns that encode for a...
Definition jkqtpgraphsbase.h:968
plotter widget for scientific plots (uses JKQTBasePlotter to do the actual drawing)
Definition jkqtplotter.h:364
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89