21#ifndef jkqtpgraphsbasestylingmixins_H
22#define jkqtpgraphsbasestylingmixins_H
29#include "jkqtplotter/jkqtptools.h"
30#include "jkqtplotter/jkqtplotter_imexport.h"
31#include "jkqtplotter/jkqtpbaseplotter.h"
32#include "jkqtcommon/jkqtpdrawingtools.h"
33#include "jkqtplotter/jkqtplotter_configmacros.h"
50#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
147#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
176#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
196#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
249#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
278#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
304#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
346#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
380#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
430#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
467 JKQTPPlotSymbol(painter, x, y,
m_symbolType, parent->
pt2px(painter,
m_symbolSize), parent->
pt2px(painter,
m_symbolLineWidth*parent->
getLineWidthMultiplier()),
m_symbolColor,
m_symbolFillColor,
getSymbolFont());
491 JKQTPPlotSymbol(painter, x, y,type, parent->
pt2px(painter,
m_symbolSize), parent->
pt2px(painter,
m_symbolLineWidth*parent->
getLineWidthMultiplier()),
m_symbolColor,
m_symbolFillColor,
getSymbolFont());
504 JKQTPPlotSymbol(painter, x, y,
m_symbolType, parent->
pt2px(painter,
m_symbolSize), parent->
pt2px(painter,
m_symbolLineWidth*parent->
getLineWidthMultiplier()), color, fillColor,
getSymbolFont());
530#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
575#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
596#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
618#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
641#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
672#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
Definition jkqtpbaseplotter.h:394
double pt2px(double pt, double dpi) const
returns the given size in DTP points points (1/72inch = 0.353mm) to pixels (with given dots per inch)
Definition jkqtpbaseplotter.h:842
double getLineWidthMultiplier() const
multiplier or the line widths
this class extends the QPainter
Definition jkqtpenhancedpainter.h:33
double calcHeadDecoratorSize(double line_width) const
calculates the tail decorator size from the line width line_width, using m_headDecoratorSizeFactor an...
JKQTPLineDecoratorStyle m_headDecoratorStyle
head decorator style
Definition jkqtpgraphsbasestylingmixins.h:284
double m_headDecoratorSizeFactor
head decorator size-factor, used to calculate the size of the arrow from the line width
Definition jkqtpgraphsbasestylingmixins.h:286
void initDecoratedHeadLineStyle(JKQTBasePlotter *parent, int &parentPlotStyle, JKQTPPlotStyleType styletype=JKQTPPlotStyleType::Default)
initiaize the line style (from the parent plotter)
JKQTPLineDecoratorStyle headDecoratorStyle
Definition jkqtpgraphsbasestylingmixins.h:279
JKQTPLineDecoratorStyle getHeadDecoratorStyle() const
get the head decorator style
void setHeadDecoratorSizeFactor(const double &__value)
head decorator size-factor, used to calculate the size of the arrow from the line width
double headDecoratorSizeFactor
Definition jkqtpgraphsbasestylingmixins.h:280
virtual ~JKQTPGraphDecoratedHeadLineStyleMixin()
JKQTPGraphDecoratedHeadLineStyleMixin()
class constructor
void setHeadDecoratorStyle(const JKQTPLineDecoratorStyle &__value)
set the head decorator style
double getHeadDecoratorSizeFactor() const
head decorator size-factor, used to calculate the size of the arrow from the line width
JKQTPLineDecoratorStyle getHeadDecoratorStyle() const
get the head decorator style
virtual ~JKQTPGraphDecoratedLineStyleMixin()
double getHeadDecoratorSizeFactor() const
head decorator size-factor, used to calculate the size of the arrow from the line width
JKQTPLineDecoratorStyle headDecoratorStyle
Definition jkqtpgraphsbasestylingmixins.h:347
JKQTPLineDecoratorStyle getTailDecoratorStyle() const
get the tail decorator style
void setTailDecoratorSizeFactor(const double &__value)
tail decorator size-factor, used to calculate the size of the arrow from the line width
void setHeadDecoratorStyle(const JKQTPLineDecoratorStyle &__value)
set the head decorator style
JKQTPLineDecoratorStyle m_tailDecoratorStyle
tail decorator style
Definition jkqtpgraphsbasestylingmixins.h:356
double tailDecoratorSizeFactor
Definition jkqtpgraphsbasestylingmixins.h:350
double m_tailDecoratorSizeFactor
tail decorator size-factor, used to calculate the size of the arrow from the line width
Definition jkqtpgraphsbasestylingmixins.h:360
JKQTPGraphDecoratedLineStyleMixin()
class constructor
void setTailDecoratorStyle(const JKQTPLineDecoratorStyle &__value)
set the tail decorator style
double calcHeadDecoratorSize(double line_width) const
calculates the tail decorator size from the line width line_width, using m_headDecoratorSizeFactor an...
double calcTailDecoratorSize(double line_width) const
calculates the tail decorator size from the line width line_width, using m_tailDecoratorSizeFactor an...
double m_headDecoratorSizeFactor
head decorator size-factor, used to calculate the size of the arrow from the line width
Definition jkqtpgraphsbasestylingmixins.h:358
double getTailDecoratorSizeFactor() const
tail decorator size-factor, used to calculate the size of the arrow from the line width
void initDecoratedLineStyle(JKQTBasePlotter *parent, int &parentPlotStyle, JKQTPPlotStyleType styletype=JKQTPPlotStyleType::Default)
initiaize the line style (from the parent plotter)
double headDecoratorSizeFactor
Definition jkqtpgraphsbasestylingmixins.h:349
void setHeadDecoratorSizeFactor(const double &__value)
head decorator size-factor, used to calculate the size of the arrow from the line width
JKQTPLineDecoratorStyle tailDecoratorStyle
Definition jkqtpgraphsbasestylingmixins.h:348
JKQTPLineDecoratorStyle m_headDecoratorStyle
head decorator style
Definition jkqtpgraphsbasestylingmixins.h:354
const QGradient * getFillGradient() const
get the gradient object of the graph filling
void setFillColor(const QColor &__value, double alpha)
set the color of the graph filling
void initFillStyleInvertedColor(JKQTPGraphFillStyleMixin *other)
initiaize the fill style from another JKQTPGraphFillStyleMixin other by inverting its fill color
JKQTPGraphFillStyleMixin()
class constructor
void setFillTransform(const QTransform &b)
sets a fill transformation
virtual ~JKQTPGraphFillStyleMixin()
void setFillColor(const QColor &__value)
set the color of the graph filling
void initFillStyle(JKQTBasePlotter *parent, int &parentPlotStyle, JKQTPPlotStyleType styletype=JKQTPPlotStyleType::Default)
initiaize the fill style (from the parent plotter)
void setFillTexture(const QImage &__value)
set the color of the graph filling and sets fill style to Qt::TexturePattern
void setFillGradient(const QGradient &__value)
set the filling of the graph to a gradient and sets fill style to a gradient setting
QColor fillColor
Definition jkqtpgraphsbasestylingmixins.h:577
void setFillBrush(const QBrush &b)
sets a fill brush (overwrites all internal properties!)
QImage getFillTextureImage() const
set the color of the graph filling
QBrush getFillBrush(JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
constructs a QBrush from the graph fill styling properties
Qt::BrushStyle fillStyle
Definition jkqtpgraphsbasestylingmixins.h:576
QBrush m_fillBrush
fill style of the graph
Definition jkqtpgraphsbasestylingmixins.h:584
QPixmap getFillTexture() const
set the color of the graph filling
void setFillStyle(Qt::BrushStyle __value)
set the fill style of the graph
QColor getFillColor() const
set the color of the graph filling
Qt::BrushStyle getFillStyle() const
get the fill style of the graph
void setFillTexture(const QPixmap &__value)
set the color of the graph filling and sets fill style to Qt::TexturePattern
QColor m_fillColor
last fill color of the graph
Definition jkqtpgraphsbasestylingmixins.h:586
bool doDrawLine() const
indicates whether to draw a line on the circumference of the described area (i.e. along the data poin...
bool doFillCurve() const
indicates whether to fill the space between the curve and the x-axis
bool getFillCurve() const
indicates whether to fill the space between the curve and the x-axis
bool drawLine
Definition jkqtpgraphsbasestylingmixins.h:619
void setDrawLine(bool __value)
indicates whether to draw a line on the circumference of the described area (i.e. along the data poin...
bool m_drawLine
indicates whether to draw a line on the circumference of the described area (i.e. along the data poin...
Definition jkqtpgraphsbasestylingmixins.h:624
bool getDrawLine() const
indicates whether to draw a line on the circumference of the described area (i.e. along the data poin...
bool m_fillCurve
indicates whether to fill the space between the curve and the x-axis
Definition jkqtpgraphsbasestylingmixins.h:626
void setFillCurve(bool __value)
indicates whether to fill the space between the curve and the x-axis
bool fillCurve
Definition jkqtpgraphsbasestylingmixins.h:620
JKQTPGraphLineAndFillStyleMixin()
class constructor
Qt::PenStyle lineStyle
Definition jkqtpgraphsbasestylingmixins.h:150
void setLineJoinStyle(Qt::PenJoinStyle style)
sets the join style
double getLineWidth() const
get the line width of the graph line (in pt)
void setLineWidth(double __value)
set the line width of the graph line (in pt)
void setLineBrush(const QBrush &style)
sets the brush used to fill the line area
QPen getHighlightingLinePenForRects(JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
constructs a QPen from the line styling properties, suitable for drawing rectangle with sharp corners
QPen getLinePenForRects(JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
constructs a QPen from the line styling properties, suitable for drawing rectangles with sharp edges
QPen getHighlightingLinePen(JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
constructs a QPen from the line styling properties
QPen getLinePen(JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
constructs a QPen from the line styling properties
virtual ~JKQTPGraphLineStyleMixin()
QVector< qreal > getLineDashPattern() const
gets the dash pattern for a custom dash style
void setLineColor(const QColor &__value, double alpha)
set the color of the graph line
void setHighlightingLineColor(const QColor &__value)
set the color of the graph line when highlighted
Qt::PenStyle getLineStyle() const
get the style of the graph line
QColor highlightingLineColor
Definition jkqtpgraphsbasestylingmixins.h:148
QPen m_linePen
graph line pen
Definition jkqtpgraphsbasestylingmixins.h:155
QPen getKeyLinePen(JKQTPEnhancedPainter &painter, const QRectF &rect, JKQTBasePlotter *parent) const
constructs a QPen from the line styling properties, but uses getKeyLineWidthPx() for the width,...
void setLineColorInvertedFrom(QColor __noninvertedColor)
sets the line-color as an inverted version of the given color
QColor lineColor
Definition jkqtpgraphsbasestylingmixins.h:149
void setHighlightingLineColor(const QColor &__value, double alpha)
set the color of the graph line when highlighted
JKQTPGraphLineStyleMixin()
class constructor
Qt::PenCapStyle getLineCapStyle() const
gets the cap style
QColor m_highlightingLineColor
line pen for the highlighted look
Definition jkqtpgraphsbasestylingmixins.h:159
void initLineStyle(JKQTBasePlotter *parent, int &parentPlotStyle, JKQTPPlotStyleType styletype=JKQTPPlotStyleType::Default)
initiaize the line style (from the parent plotter)
QBrush getLineBrush() const
gets the brush used to fill the line area
void setLineColor(const QColor &__value)
set the color of the graph line
double m_lineWidth
width of the graph lines, given in pt
Definition jkqtpgraphsbasestylingmixins.h:157
double lineWidth
Definition jkqtpgraphsbasestylingmixins.h:151
qreal getLineDashOffset() const
returns the dash offset for a custom dash style
void setLineDashPattern(const QVector< qreal > &pattern)
sets the dash pattern for a custom dash style
void setLineDashOffset(qreal offset)
sets the dash offset for a custom dash style
void setLineStyle(Qt::PenStyle __value)
set the style of the graph line
double getKeyLineWidthPx(JKQTPEnhancedPainter &painter, const QRectF &keyRect, const JKQTBasePlotter *parent) const
returns the linewidth for drawing lines in a key entry with keyRect for the symbol,...
void setLineCapStyle(Qt::PenCapStyle style)
sets the cap style
Qt::PenJoinStyle getLineJoinStyle() const
returns the join style
QColor getLineColor() const
get the color of the graph line
QColor getHighlightingLineColor() const
get the color of the graph line when highlighted
bool getUseNonvisibleLineCompression() const
void setUseNonvisibleLineCompression(bool _useNonvisibleLineCompression)
bool m_useNonvisibleLineCompression
use an optimization algorithm that tries to reduce the number of lines that overlap each other (i....
Definition jkqtpgraphsbasestylingmixins.h:215
double nonvisibleLineCompressionAgressiveness
Definition jkqtpgraphsbasestylingmixins.h:198
bool useNonvisibleLineCompression
Definition jkqtpgraphsbasestylingmixins.h:197
double m_nonvisibleLineCompressionAgressiveness
this sets the agressiveness of the option useNonvisibleLineCompression
Definition jkqtpgraphsbasestylingmixins.h:231
void setNonvisibleLineCompressionAgressiveness(double Agressiveness)
double getNonvisibleLineCompressionAgressiveness() const
JKQTPGraphLinesCompressionMixin()
class constructor
virtual ~JKQTPGraphLinesCompressionMixin()
void setSymbolColor(const QColor &__value, double alpha)
set the color of the graph symbols
void plotStyledSymbol(JKQTBasePlotter *parent, JKQTPEnhancedPainter &painter, double x, double y) const
plot a symbol at location x,y (in painter coordinates), using the current style
Definition jkqtpgraphsbasestylingmixins.h:465
QColor symbolFillColor
Definition jkqtpgraphsbasestylingmixins.h:433
void setSymbolFillColor(const QColor &__value)
set the color of filling of the graph symbols
double getSymbolSize() const
get the size (=diameter in pt) of the graph symbol (in pt)
void setSymbolLineWidth(double __value)
set the line width of the graph symbol outline (in pt)
void setSymbolAlpha(double alpha)
set alpha-value of symbol outline and filling
JKQTPGraphSymbols getSymbolType() const
get the type of the graph symbol
QPen getSymbolPen(JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
constructs a QPen from the line styling properties
JKQTPGraphSymbols m_symbolType
which symbol to use for the datapoints
Definition jkqtpgraphsbasestylingmixins.h:440
QColor getSymbolFillColor() const
set the color of filling of the graph symbols
QColor symbolColor
Definition jkqtpgraphsbasestylingmixins.h:432
double getKeySymbolSizePx(JKQTPEnhancedPainter &painter, const QRectF &keyRect, const JKQTBasePlotter *parent, double maxSymbolSizeFracton=0.9) const
returns the symbol size for drawing symbols in a key entry with keyRect for the symbol,...
double symbolLineWidth
Definition jkqtpgraphsbasestylingmixins.h:435
QString m_symbolFontName
font to be used for character symbols JKQTPCharacterSymbol+QChar('').unicode()
Definition jkqtpgraphsbasestylingmixins.h:450
void plotStyledSymbol(JKQTBasePlotter *parent, JKQTPEnhancedPainter &painter, double x, double y, JKQTPGraphSymbols type) const
plot a symbol at location x,y (in painter coordinates), using the current style
Definition jkqtpgraphsbasestylingmixins.h:489
double getKeySymbolLineWidthPx(JKQTPEnhancedPainter &painter, const QRectF &keyRect, const JKQTBasePlotter *parent, double maxSymbolSizeFracton=0.9) const
returns the symbol linewidth for drawing symbols in a key entry with keyRect for the symbol,...
QString getSymbolFontName() const
get the font to be used for character symbols JKQTPCharacterSymbol+QChar('').unicode()
void plotStyledSymbol(JKQTBasePlotter *parent, JKQTPEnhancedPainter &painter, double x, double y, double symbolSize) const
plot a symbol at location x,y (in painter coordinates), using the current style
Definition jkqtpgraphsbasestylingmixins.h:477
void setSymbolFontName(const QString &__value)
set the font to be used for character symbols JKQTPCharacterSymbol+QChar('').unicode()
QColor getSymbolColor() const
set the color of the graph symbols
void setSymbolSize(double __value)
set the size (=diameter in pt) of the graph symbol (in pt)
void initSymbolStyle(JKQTBasePlotter *parent, int &parentPlotStyle, JKQTPPlotStyleType styletype=JKQTPPlotStyleType::Default)
initiaize the symbol style (from the parent plotter)
double m_symbolSize
size (diameter in pt) of the symbol for the data points, given in pt
Definition jkqtpgraphsbasestylingmixins.h:442
void setSymbolColor(const QColor &__value)
set the color of the graph symbols
QFont getSymbolFont() const
generate a QFont for darwing symbols
double m_symbolLineWidth
width (in pt) of the lines used to plot the symbol for the data points, given in pt
Definition jkqtpgraphsbasestylingmixins.h:448
JKQTPGraphSymbolStyleMixin()
class constructor
QColor m_symbolColor
(outline) color of the symbol
Definition jkqtpgraphsbasestylingmixins.h:444
double getSymbolLineWidth() const
get the line width of the graph symbol outline (in pt)
void plotStyledSymbol(JKQTBasePlotter *parent, JKQTPEnhancedPainter &painter, double x, double y, QColor color, QColor fillColor) const
plot a symbol at location x,y (in painter coordinates), using the current style
Definition jkqtpgraphsbasestylingmixins.h:502
virtual ~JKQTPGraphSymbolStyleMixin()
JKQTPGraphSymbols symbolType
Definition jkqtpgraphsbasestylingmixins.h:431
QColor m_symbolFillColor
color of the symbol filling
Definition jkqtpgraphsbasestylingmixins.h:446
double symbolSize
Definition jkqtpgraphsbasestylingmixins.h:434
QString symbolFontName
Definition jkqtpgraphsbasestylingmixins.h:436
void setSymbolFillColor(const QColor &__value, double alpha)
set the color of filling of the graph symbols
void setSymbolType(JKQTPGraphSymbols __value)
set the type of the graph symbol
QBrush getSymbolBrush(JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
constructs a QPen from the line styling properties
void setTextFontSize(double __value)
set the base font size of text
double m_textFontSize
base font size of text
Definition jkqtpgraphsbasestylingmixins.h:682
double textFontSize
Definition jkqtpgraphsbasestylingmixins.h:674
QColor textColor
Definition jkqtpgraphsbasestylingmixins.h:673
QColor getTextColor() const
set the color of the text
virtual ~JKQTPGraphTextStyleMixin()
double getTextFontSize() const
get the base font size of text
void initTextStyle(JKQTBasePlotter *parent, int &parentPlotStyle, JKQTPPlotStyleType styletype=JKQTPPlotStyleType::Default)
initiaize the fill style (from the parent plotter)
QString textFontName
Definition jkqtpgraphsbasestylingmixins.h:675
QString m_textFontName
name of the font to be used for the text
Definition jkqtpgraphsbasestylingmixins.h:684
QString getTextFontName() const
get the base font name of text
QColor m_textColor
color of the text
Definition jkqtpgraphsbasestylingmixins.h:679
void setTextFontName(const QString &__value)
set the base font name of text
void setTextColor(const QColor &__value, double alpha)
set the color of the text
JKQTPGraphTextStyleMixin(JKQTBasePlotter *parent)
class constructor
void setTextColor(const QColor &__value)
set the color of the text
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
JKQTPPlotStyleType
used to specify teh type of graph when calling getPlotStyle()
Definition jkqtptools.h:68
@ Default
Definition jkqtptools.h:69