20#ifndef JKQTPGRAPHSBASEERROR_H
21#define JKQTPGRAPHSBASEERROR_H
27#include "jkqtplotter/jkqtpbaseelements.h"
28#include "jkqtplotter/jkqtpbaseplotter.h"
29#include "jkqtplotter/jkqtpgraphsbase.h"
30#include "jkqtplotter/jkqtptools.h"
31#include "jkqtplotter/jkqtplotter_imexport.h"
32#include "jkqtplotter/jkqtpimagetools.h"
33#include "jkqtplotter/jkqtplotter_configmacros.h"
46#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
184 void intPlotXYErrorIndicators(
JKQTPEnhancedPainter& painter,
const JKQTBasePlotter *parent,
const JKQTPGraph* parentGraph,
int xColumn,
int yColumn,
int xErrorColumn,
int yErrorColumn,
JKQTPErrorPlotstyle xErrorStyle,
JKQTPErrorPlotstyle yErrorStyle,
int xErrorColumnLower=-1,
int yErrorColumnLower=-1,
bool xErrorSymmetric=
true,
bool yErrorSymmetric=
true,
double xrelshift=0,
double yrelshift=0.0,
const QVector<int> *dataorder=
nullptr)
const;
188 virtual bool intPlotXYErrorIndicatorsGetColor(
JKQTPEnhancedPainter& painter,
const JKQTBasePlotter* parent,
const JKQTPGraph *parentGraph,
int xColumn,
int yColumn,
int xErrorColumn,
int yErrorColumn,
JKQTPErrorPlotstyle xErrorStyle,
JKQTPErrorPlotstyle yErrorStyle,
int index, QColor& errorLineColor, QColor& errorFillColor)
const;
198#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
250#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
300#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
324#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
350#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
represents a pen, when plotting in JKQTPlotter/JKQTBasePlotter
Definition jkqtpbaseplotter.h:764
base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
Definition jkqtpbaseplotter.h:394
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 assembles all styling properties applicable to error indicators.
Definition jkqtpgraphsbaseerrors.h:45
void setErrorFillTexture(const QImage &__value)
set the color of the error indicator filling and sets fill style to Qt::TexturePattern
QBrush m_errorFillBrush
fill brush for the error indicators
Definition jkqtpgraphsbaseerrors.h:165
void setErrorLineBrush(const QBrush &style)
sets the brush used to fill the line area of the error indicator (out)lines
void setErrorFillStyle(Qt::BrushStyle __value)
set the fill style of the error indicators
void setErrorFillBrush(const QBrush &b)
sets an error indicator fill brush (overwrites all internal properties!)
QColor getErrorFillColor() const
get the fill color of the error indicators
QBrush getErrorFillBrush(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent) const
constructs a QBrush from the error indicator fill styling properties
double m_errorBarCapSize
size of the error bar end markers [pt]
Definition jkqtpgraphsbaseerrors.h:171
QVector< qreal > getErrorLineDashPattern() const
gets the dash pattern for a custom dash style of the error indicator (out)lines
QColor getErrorLineColor() const
get the color of the error indicator (out)lines
double m_errorLineWidth
width of the error indicators' lines, given in pt
Definition jkqtpgraphsbaseerrors.h:161
const QGradient * getErrorFillGradient() const
get the gradient object of the error indicator filling
Qt::PenJoinStyle getErrorLineJoinStyle() const
returns the join style of the error indicator (out)lines
QPen m_errorLinePen
error indicator line pen
Definition jkqtpgraphsbaseerrors.h:159
QPixmap getErrorFillTexture() const
set the color of the error indicator filling
QBrush getErrorLineBrush() const
gets the brush used to fill the line area of the error indicator (out)lines
void setErrorLineStyle(Qt::PenStyle __value)
set the style of the error indicator (out)lines
void setErrorLineColor(const QColor &__value)
set the color of the error indicator (out)lines
JKQTPGraphErrorStyleMixin()
class contructor
Qt::PenStyle getErrorLineStyle() const
get the style of the error indicator (out)lines
double getErrorBarCapSize() const
size of the error bar end markers [pt]
void setErrorLineDashOffset(qreal offset)
sets the dash offset for a custom dash style of the error indicator (out)lines
virtual ~JKQTPGraphErrorStyleMixin()=default
void setErrorLineCapStyle(Qt::PenCapStyle style)
sets the cap style of the error indicator (out)lines
QPen getErrorLinePenForRects(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent) const
constructs a QPen from the error indicator line styling properties, suitable for drawing rectangles w...
void setErrorFillTransform(const QTransform &b)
sets an error indicator fill transformation
void setErrorLineJoinStyle(Qt::PenJoinStyle style)
sets the join style of the error indicator (out)lines
QColor m_errorFillColor
fill color for the error indicators
Definition jkqtpgraphsbaseerrors.h:167
void setErrorBarCapSize(double __value)
size of the error bar end markers [pt]
QPen getErrorLinePen(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent) const
constructs a QPen from the error indicator line styling properties
void initErrorStyle(JKQTBasePlotter *parent, int &parentPlotStyle, JKQTPPlotStyleType styletype=JKQTPPlotStyleType::Default)
initiaize the error indicator style (from the parent plotter)
double getErrorLineWidth() const
get the width [pt] of the error indicator (out)lines
void setErrorLineDashPattern(const QVector< qreal > &pattern)
sets the dash pattern for a custom dash style of the error indicator (out)lines
void setErrorLineWidth(double __value)
set the width [pt] of the error indicator (out)lines
void setErrorFillColor(const QColor &__value)
set the fill color of the error indicators
QImage getErrorFillTextureImage() const
set the color of the error indicator filling
virtual bool intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int index, QColor &errorLineColor, QColor &errorFillColor) const
this function can be used to set the color of the error indicators automatically
qreal getErrorLineDashOffset() const
returns the dash offset for a custom dash style of the error indicator (out)lines
void setErrorStyleFromPen(const JKQTBasePlotter::JKQTPPen &pen)
derive the properties of the error indicators from pen
void setErrorFillTexture(const QPixmap &__value)
set the color of the error indicator filling and sets fill style to Qt::TexturePattern
Qt::BrushStyle getErrorFillStyle() const
get the fill style of the error indicators
Qt::PenCapStyle getErrorLineCapStyle() const
gets the cap style of the error indicator (out)lines
void setErrorFillGradient(const QGradient &__value)
set the filling of the error indicators to a gradient and sets fill style to a gradient setting
void intPlotXYErrorIndicators(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int xErrorColumnLower=-1, int yErrorColumnLower=-1, bool xErrorSymmetric=true, bool yErrorSymmetric=true, double xrelshift=0, double yrelshift=0.0, const QVector< int > *dataorder=nullptr) const
draw error indicators with the parameters defined in this class. The position of the datapoints is gi...
void setErrorColorFromGraphColor(QColor graphColor)
derive the colors of the error indicators from a given color
this virtual base class of the (data-column based) graphs, which are part of a JKQTPlotter plot and w...
Definition jkqtpgraphsbase.h:429
This class adds data fields for error indicators in x direction.
Definition jkqtpgraphsbaseerrors.h:197
void setXErrorSymmetric(bool __value)
indicates whether the x-errors are symmetric (from one column only)
int xErrorColumn
the column that contains the error of the x-component of the datapoints
Definition jkqtpgraphsbaseerrors.h:226
JKQTPErrorPlotstyle getXErrorStyle() const
how to draw the errors (if available) of the x-value
void setXErrorColumn(int __value)
the column that contains the error of the x-component of the datapoints
JKQTPErrorPlotstyle xErrorStyle
how to draw the errors (if available) of the x-value
Definition jkqtpgraphsbaseerrors.h:232
bool getXErrorSymmetric() const
indicates whether the x-errors are symmetric (from one column only)
int xErrorColumnLower
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
Definition jkqtpgraphsbaseerrors.h:228
void setXErrorStyle(JKQTPErrorPlotstyle __value)
how to draw the errors (if available) of the x-value
virtual double getXErrorU(int i, const JKQTPDatastore *ds) const
returns the upper x-error for the i-th datapoint, read from datastore ds
virtual double getXErrorL(int i, const JKQTPDatastore *ds) const
returns the lower x-error for the i-th datapoint, read from datastore ds
bool xErrorSymmetric
indicates whether the x-errors are symmetric (from one column only)
Definition jkqtpgraphsbaseerrors.h:230
JKQTPXGraphErrorData()
class contructor
int getXErrorColumnLower() const
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
int getXErrorColumn() const
the column that contains the error of the x-component of the datapoints
void setXErrorColumnLower(int __value)
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
virtual ~JKQTPXGraphErrorData()=default
This class is the base class for graphs that only display error indicators in x-direction.
Definition jkqtpgraphsbaseerrors.h:299
virtual void plotErrorIndicators(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector< int > *dataorder=nullptr) const
draws the error indicators
virtual bool errorUsesColumn(int c) const
returns true, if the error plots use the given column
JKQTPXGraphErrors()
class contructor
virtual ~JKQTPXGraphErrors()=default
This class is the base class for graphs that only display error indicators in x- and y-direction.
Definition jkqtpgraphsbaseerrors.h:349
virtual ~JKQTPXYGraphErrors()=default
JKQTPXYGraphErrors()
class contructor
virtual bool errorUsesColumn(int c) const
returns true, if the error plots use the given column
virtual void plotErrorIndicators(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector< int > *dataorder=nullptr) const
draws the error indicators
This class adds data fields for error indicators in y direction.
Definition jkqtpgraphsbaseerrors.h:249
virtual ~JKQTPYGraphErrorData()=default
bool getYErrorSymmetric() const
indicates whether the x-errors are symmetric (from one column only)
void setYErrorColumn(int __value)
the column that contains the error of the x-component of the datapoints
JKQTPErrorPlotstyle yErrorStyle
how to draw the errors (if available) of the x-value
Definition jkqtpgraphsbaseerrors.h:284
void setYErrorStyle(JKQTPErrorPlotstyle __value)
how to draw the errors (if available) of the x-value
JKQTPErrorPlotstyle getYErrorStyle() const
how to draw the errors (if available) of the x-value
void setYErrorColumnLower(int __value)
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
int getYErrorColumn() const
the column that contains the error of the x-component of the datapoints
int yErrorColumn
the column that contains the error of the x-component of the datapoints
Definition jkqtpgraphsbaseerrors.h:278
int getYErrorColumnLower() const
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
void setYErrorSymmetric(bool __value)
indicates whether the x-errors are symmetric (from one column only)
bool yErrorSymmetric
indicates whether the x-errors are symmetric (from one column only)
Definition jkqtpgraphsbaseerrors.h:282
virtual double getYErrorU(int i, const JKQTPDatastore *ds) const
returns the upper y-error for the i-th datapoint, read from datastore ds
JKQTPYGraphErrorData()
class contructor
virtual double getYErrorL(int i, const JKQTPDatastore *ds) const
returns the lower y-error for the i-th datapoint, read from datastore ds
int yErrorColumnLower
the column that contains the error of the x-component of the datapoints. This is used as the lower er...
Definition jkqtpgraphsbaseerrors.h:280
This class is the base class for graphs that only display error indicators in y-direction.
Definition jkqtpgraphsbaseerrors.h:323
JKQTPYGraphErrors()
class contructor
virtual bool errorUsesColumn(int c) const
returns true, if the error plots use the given column
virtual void plotErrorIndicators(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector< int > *dataorder=nullptr) const
draws the error indicators
virtual ~JKQTPYGraphErrors()=default
QFlags< JKQTPErrorPlotstyleElements > JKQTPErrorPlotstyle
specifies the plot styles for the error information, e.g. error bars, boxes, lines ....
Definition jkqtptools.h:728
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89
JKQTPPlotStyleType
used to specify teh type of graph when calling getPlotStyle()
Definition jkqtptools.h:68