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
148 Q_PROPERTY(QColor highlightingLineColor MEMBER m_highlightingLineColor READ getHighlightingLineColor WRITE setHighlightingLineColor)
149 Q_PROPERTY(QColor lineColor MEMBER m_lineColor READ getLineColor WRITE setLineColor)
150 Q_PROPERTY(Qt::PenStyle lineStyle MEMBER m_lineStyle READ getLineStyle WRITE setLineStyle)
151 Q_PROPERTY(
double lineWidth MEMBER m_lineWidth READ getLineWidth WRITE setLineWidth)
176#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
196#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
197 Q_PROPERTY(
bool useNonvisibleLineCompression MEMBER useNonvisibleLineCompression READ getUseNonvisibleLineCompression WRITE setUseNonvisibleLineCompression)
198 Q_PROPERTY(
double nonvisibleLineCompressionAgressiveness MEMBER nonvisibleLineCompressionAgressiveness READ getNonvisibleLineCompressionAgressiveness WRITE setNonvisibleLineCompressionAgressiveness)
249#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
278#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
279 Q_PROPERTY(
JKQTPLineDecoratorStyle headDecoratorStyle MEMBER m_headDecoratorStyle READ getHeadDecoratorStyle WRITE setHeadDecoratorStyle)
280 Q_PROPERTY(
double headDecoratorSizeFactor MEMBER m_headDecoratorSizeFactor READ getHeadDecoratorSizeFactor WRITE setHeadDecoratorSizeFactor)
304#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
346#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
347 Q_PROPERTY(
JKQTPLineDecoratorStyle headDecoratorStyle MEMBER m_headDecoratorStyle READ getHeadDecoratorStyle WRITE setHeadDecoratorStyle)
348 Q_PROPERTY(
JKQTPLineDecoratorStyle tailDecoratorStyle MEMBER m_tailDecoratorStyle READ getTailDecoratorStyle WRITE setTailDecoratorStyle)
349 Q_PROPERTY(
double headDecoratorSizeFactor MEMBER m_headDecoratorSizeFactor READ getHeadDecoratorSizeFactor WRITE setHeadDecoratorSizeFactor)
350 Q_PROPERTY(
double tailDecoratorSizeFactor MEMBER m_tailDecoratorSizeFactor READ getTailDecoratorSizeFactor WRITE setTailDecoratorSizeFactor)
380#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
430#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
431 Q_PROPERTY(
JKQTPGraphSymbols symbolType MEMBER m_symbolType READ getSymbolType WRITE setSymbolType)
432 Q_PROPERTY(QColor symbolColor MEMBER m_symbolColor READ getSymbolColor WRITE setSymbolColor)
433 Q_PROPERTY(QColor symbolFillColor MEMBER m_symbolFillColor READ getSymbolFillColor WRITE setSymbolFillColor)
434 Q_PROPERTY(
double symbolSize MEMBER m_symbolSize READ getSymbolSize WRITE setSymbolSize)
435 Q_PROPERTY(
double symbolLineWidth MEMBER m_symbolLineWidth READ getSymbolLineWidth WRITE setSymbolLineWidth)
436 Q_PROPERTY(QString symbolFontName MEMBER m_symbolFontName READ getSymbolFontName WRITE setSymbolFontName)
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
576 Q_PROPERTY(Qt::BrushStyle fillStyle MEMBER m_fillStyle READ getFillStyle WRITE setFillStyle)
577 Q_PROPERTY(QColor fillColor MEMBER m_fillColor READ getFillColor WRITE setFillColor)
596#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
618#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
619 Q_PROPERTY(
bool drawLine MEMBER m_drawLine READ getDrawLine WRITE setDrawLine)
620 Q_PROPERTY(
bool fillCurve MEMBER m_fillCurve READ getFillCurve WRITE setFillCurve)
641#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
672#ifndef JKQTPLOTTER_WORKAROUND_QGADGET_BUG
673 Q_PROPERTY(QColor textColor MEMBER m_textColor READ getTextColor WRITE setTextColor)
674 Q_PROPERTY(
double textFontSize MEMBER m_textFontSize READ getTextFontSize WRITE setTextFontSize)
675 Q_PROPERTY(QString textFontName MEMBER m_textFontName READ getTextFontName WRITE setTextFontName)
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
This Mix-In class provides setter/getter methods, storage and other facilities for the graph line sty...
Definition jkqtpgraphsbasestylingmixins.h:248
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 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
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
This Mix-In class provides setter/getter methods, storage and other facilities for the graph line sty...
Definition jkqtpgraphsbasestylingmixins.h:303
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 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 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)
void setHeadDecoratorSizeFactor(const double &__value)
head decorator size-factor, used to calculate the size of the arrow from the line width
JKQTPLineDecoratorStyle m_headDecoratorStyle
head decorator style
Definition jkqtpgraphsbasestylingmixins.h:354
This Mix-In class provides setter/getter methods, storage and other facilities for the graph filling ...
Definition jkqtpgraphsbasestylingmixins.h:529
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
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
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
This Mix-In class provides setter/getter methods, storage and other facilities for the graph line and...
Definition jkqtpgraphsbasestylingmixins.h:595
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
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
JKQTPGraphLineAndFillStyleMixin()
class constructor
This Mix-In class provides setter/getter methods, storage and other facilities for the graph line sty...
Definition jkqtpgraphsbasestylingmixins.h:49
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
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
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
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
This Mix-In class provides setter/getter methods, storage and other facilities for a line-graph compr...
Definition jkqtpgraphsbasestylingmixins.h:175
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 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()
This Mix-In class provides setter/getter methods, storage and other facilities for the graph symbols ...
Definition jkqtpgraphsbasestylingmixins.h:379
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
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
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,...
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()
QColor m_symbolFillColor
color of the symbol filling
Definition jkqtpgraphsbasestylingmixins.h:446
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
This Mix-In class provides setter/getter methods, storage and other facilities for text in graphs.
Definition jkqtpgraphsbasestylingmixins.h:640
void setTextFontSize(double __value)
set the base font size of text
double m_textFontSize
base font size of text
Definition jkqtpgraphsbasestylingmixins.h:682
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 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:364
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89
JKQTPPlotStyleType
used to specify teh type of graph when calling getPlotStyle()
Definition jkqtptools.h:68