JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches

This Mix-In class provides setter/getter methods, storage and other facilities for the graph symbols style. More...

#include <jkqtpgraphsbasestylingmixins.h>

Inheritance diagram for JKQTPGraphSymbolStyleMixin:
[legend]

Public Member Functions

 JKQTPGraphSymbolStyleMixin ()
 class constructor
 
virtual ~JKQTPGraphSymbolStyleMixin ()
 
QColor getSymbolColor () const
 set the color of the graph symbols
 
QColor getSymbolFillColor () const
 set the color of filling of the graph symbols
 
QString getSymbolFontName () const
 get the font to be used for character symbols JKQTPCharacterSymbol+QChar('').unicode()
 
double getSymbolLineWidth () const
 get the line width of the graph symbol outline (in pt)
 
double getSymbolSize () const
 get the size (=diameter in pt) of the graph symbol (in pt)
 
JKQTPGraphSymbols getSymbolType () const
 get the type of the graph symbol
 
void initSymbolStyle (JKQTBasePlotter *parent, int &parentPlotStyle, JKQTPPlotStyleType styletype=JKQTPPlotStyleType::Default)
 initiaize the symbol style (from the parent plotter)
 
void setSymbolAlpha (double alpha)
 set alpha-value of symbol outline and filling
 
void setSymbolColor (const QColor &__value)
 set the color of the graph symbols
 
void setSymbolColor (const QColor &__value, double alpha)
 set the color of the graph symbols
 
void setSymbolFillColor (const QColor &__value)
 set the color of filling of the graph symbols
 
void setSymbolFillColor (const QColor &__value, double alpha)
 set the color of filling of the graph symbols
 
void setSymbolFontName (const QString &__value)
 set the font to be used for character symbols JKQTPCharacterSymbol+QChar('').unicode()
 
void setSymbolLineWidth (double __value)
 set the line width of the graph symbol outline (in pt)
 
void setSymbolSize (double __value)
 set the size (=diameter in pt) of the graph symbol (in pt)
 
void setSymbolType (JKQTPGraphSymbols __value)
 set the type of the graph symbol
 

Protected Member Functions

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, using painter and parent . maxSymbolSizeFracton specifies the maximum fraction of keyRect to be used for the symbol.
 
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, using painter and parent . maxSymbolSizeFracton specifies the maximum fraction of keyRect to be used for the symbol.
 
QBrush getSymbolBrush (JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
 constructs a QPen from the line styling properties
 
QFont getSymbolFont () const
 generate a QFont for darwing symbols
 
QPen getSymbolPen (JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
 constructs a QPen from the line styling properties
 
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
 
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
 
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
 
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
 

Properties

QColor symbolColor
 
QColor symbolFillColor
 
QString symbolFontName
 
double symbolLineWidth
 
double symbolSize
 
JKQTPGraphSymbols symbolType
 

Private Attributes

QColor m_symbolColor
 (outline) color of the symbol

 
QColor m_symbolFillColor
 color of the symbol filling
 
QString m_symbolFontName
 font to be used for character symbols JKQTPCharacterSymbol+QChar('').unicode()
 
double m_symbolLineWidth
 width (in pt) of the lines used to plot the symbol for the data points, given in pt
 
double m_symbolSize
 size (diameter in pt) of the symbol for the data points, given in pt
 
JKQTPGraphSymbols m_symbolType
 which symbol to use for the datapoints
 

Detailed Description

This Mix-In class provides setter/getter methods, storage and other facilities for the graph symbols style.

supported properties:

  • symbol style
  • symbol size
  • symbol (outline) color
  • symbol fill color (not required for all symbols)
  • symbol (line) width
  • symbol font name (family) for character symbols JKQTPCharacterSymbol+QChar('').unicode()

Constructor & Destructor Documentation

◆ JKQTPGraphSymbolStyleMixin()

JKQTPGraphSymbolStyleMixin::JKQTPGraphSymbolStyleMixin ( )

class constructor

◆ ~JKQTPGraphSymbolStyleMixin()

virtual JKQTPGraphSymbolStyleMixin::~JKQTPGraphSymbolStyleMixin ( )
virtual

Member Function Documentation

◆ getKeySymbolLineWidthPx()

double JKQTPGraphSymbolStyleMixin::getKeySymbolLineWidthPx ( JKQTPEnhancedPainter painter,
const QRectF &  keyRect,
const JKQTBasePlotter parent,
double  maxSymbolSizeFracton = 0.9 
) const
protected

returns the symbol linewidth for drawing symbols in a key entry with keyRect for the symbol, using painter and parent . maxSymbolSizeFracton specifies the maximum fraction of keyRect to be used for the symbol.

◆ getKeySymbolSizePx()

double JKQTPGraphSymbolStyleMixin::getKeySymbolSizePx ( JKQTPEnhancedPainter painter,
const QRectF &  keyRect,
const JKQTBasePlotter parent,
double  maxSymbolSizeFracton = 0.9 
) const
protected

returns the symbol size for drawing symbols in a key entry with keyRect for the symbol, using painter and parent . maxSymbolSizeFracton specifies the maximum fraction of keyRect to be used for the symbol.

◆ getSymbolBrush()

QBrush JKQTPGraphSymbolStyleMixin::getSymbolBrush ( JKQTPEnhancedPainter painter,
JKQTBasePlotter parent 
) const
protected

constructs a QPen from the line styling properties

◆ getSymbolColor()

QColor JKQTPGraphSymbolStyleMixin::getSymbolColor ( ) const

set the color of the graph symbols

◆ getSymbolFillColor()

QColor JKQTPGraphSymbolStyleMixin::getSymbolFillColor ( ) const

set the color of filling of the graph symbols

◆ getSymbolFont()

QFont JKQTPGraphSymbolStyleMixin::getSymbolFont ( ) const
protected

generate a QFont for darwing symbols

◆ getSymbolFontName()

QString JKQTPGraphSymbolStyleMixin::getSymbolFontName ( ) const

get the font to be used for character symbols JKQTPCharacterSymbol+QChar('').unicode()

◆ getSymbolLineWidth()

double JKQTPGraphSymbolStyleMixin::getSymbolLineWidth ( ) const

get the line width of the graph symbol outline (in pt)

◆ getSymbolPen()

QPen JKQTPGraphSymbolStyleMixin::getSymbolPen ( JKQTPEnhancedPainter painter,
JKQTBasePlotter parent 
) const
protected

constructs a QPen from the line styling properties

◆ getSymbolSize()

double JKQTPGraphSymbolStyleMixin::getSymbolSize ( ) const

get the size (=diameter in pt) of the graph symbol (in pt)

◆ getSymbolType()

JKQTPGraphSymbols JKQTPGraphSymbolStyleMixin::getSymbolType ( ) const

get the type of the graph symbol

◆ initSymbolStyle()

void JKQTPGraphSymbolStyleMixin::initSymbolStyle ( JKQTBasePlotter parent,
int &  parentPlotStyle,
JKQTPPlotStyleType  styletype = JKQTPPlotStyleType::Default 
)

initiaize the symbol style (from the parent plotter)

◆ plotStyledSymbol() [1/4]

void JKQTPGraphSymbolStyleMixin::plotStyledSymbol ( JKQTBasePlotter parent,
JKQTPEnhancedPainter painter,
double  x,
double  y 
) const
inlineprotected

plot a symbol at location x,y (in painter coordinates), using the current style

Parameters
parentparent JKQTBasePlotter of the graph that uses this mix-in (used e.g. for line-width transformation)
painterthe QPainter to draw to
xx-coordinate of the symbol center
yy-coordinate of the symbol center

◆ plotStyledSymbol() [2/4]

void JKQTPGraphSymbolStyleMixin::plotStyledSymbol ( JKQTBasePlotter parent,
JKQTPEnhancedPainter painter,
double  x,
double  y,
double  symbolSize 
) const
inlineprotected

plot a symbol at location x,y (in painter coordinates), using the current style

Parameters
parentparent JKQTBasePlotter of the graph that uses this mix-in (used e.g. for line-width transformation)
painterthe QPainter to draw to
xx-coordinate of the symbol center
yy-coordinate of the symbol center
symbolSizesize of the symbol

◆ plotStyledSymbol() [3/4]

void JKQTPGraphSymbolStyleMixin::plotStyledSymbol ( JKQTBasePlotter parent,
JKQTPEnhancedPainter painter,
double  x,
double  y,
JKQTPGraphSymbols  type 
) const
inlineprotected

plot a symbol at location x,y (in painter coordinates), using the current style

Parameters
parentparent JKQTBasePlotter of the graph that uses this mix-in (used e.g. for line-width transformation)
painterthe QPainter to draw to
xx-coordinate of the symbol center
yy-coordinate of the symbol center
typetype of the symbol

◆ plotStyledSymbol() [4/4]

void JKQTPGraphSymbolStyleMixin::plotStyledSymbol ( JKQTBasePlotter parent,
JKQTPEnhancedPainter painter,
double  x,
double  y,
QColor  color,
QColor  fillColor 
) const
inlineprotected

plot a symbol at location x,y (in painter coordinates), using the current style

Parameters
parentparent JKQTBasePlotter of the graph that uses this mix-in (used e.g. for line-width transformation)
painterthe QPainter to draw to
xx-coordinate of the symbol center
yy-coordinate of the symbol center
colorcolor of the symbol
fillColorfill color of the symbol

◆ setSymbolAlpha()

void JKQTPGraphSymbolStyleMixin::setSymbolAlpha ( double  alpha)

set alpha-value of symbol outline and filling

◆ setSymbolColor() [1/2]

void JKQTPGraphSymbolStyleMixin::setSymbolColor ( const QColor &  __value)

set the color of the graph symbols

◆ setSymbolColor() [2/2]

void JKQTPGraphSymbolStyleMixin::setSymbolColor ( const QColor &  __value,
double  alpha 
)

set the color of the graph symbols

◆ setSymbolFillColor() [1/2]

void JKQTPGraphSymbolStyleMixin::setSymbolFillColor ( const QColor &  __value)

set the color of filling of the graph symbols

◆ setSymbolFillColor() [2/2]

void JKQTPGraphSymbolStyleMixin::setSymbolFillColor ( const QColor &  __value,
double  alpha 
)

set the color of filling of the graph symbols

◆ setSymbolFontName()

void JKQTPGraphSymbolStyleMixin::setSymbolFontName ( const QString &  __value)

set the font to be used for character symbols JKQTPCharacterSymbol+QChar('').unicode()

◆ setSymbolLineWidth()

void JKQTPGraphSymbolStyleMixin::setSymbolLineWidth ( double  __value)

set the line width of the graph symbol outline (in pt)

◆ setSymbolSize()

void JKQTPGraphSymbolStyleMixin::setSymbolSize ( double  __value)

set the size (=diameter in pt) of the graph symbol (in pt)

◆ setSymbolType()

void JKQTPGraphSymbolStyleMixin::setSymbolType ( JKQTPGraphSymbols  __value)

set the type of the graph symbol

Member Data Documentation

◆ m_symbolColor

QColor JKQTPGraphSymbolStyleMixin::m_symbolColor
private

(outline) color of the symbol

◆ m_symbolFillColor

QColor JKQTPGraphSymbolStyleMixin::m_symbolFillColor
private

color of the symbol filling

◆ m_symbolFontName

QString JKQTPGraphSymbolStyleMixin::m_symbolFontName
private

font to be used for character symbols JKQTPCharacterSymbol+QChar('').unicode()

◆ m_symbolLineWidth

double JKQTPGraphSymbolStyleMixin::m_symbolLineWidth
private

width (in pt) of the lines used to plot the symbol for the data points, given in pt

◆ m_symbolSize

double JKQTPGraphSymbolStyleMixin::m_symbolSize
private

size (diameter in pt) of the symbol for the data points, given in pt

◆ m_symbolType

JKQTPGraphSymbols JKQTPGraphSymbolStyleMixin::m_symbolType
private

which symbol to use for the datapoints

Property Documentation

◆ symbolColor

QColor JKQTPGraphSymbolStyleMixin::symbolColor
readwrite

◆ symbolFillColor

QColor JKQTPGraphSymbolStyleMixin::symbolFillColor
readwrite

◆ symbolFontName

QString JKQTPGraphSymbolStyleMixin::symbolFontName
readwrite

◆ symbolLineWidth

double JKQTPGraphSymbolStyleMixin::symbolLineWidth
readwrite

◆ symbolSize

double JKQTPGraphSymbolStyleMixin::symbolSize
readwrite

◆ symbolType

JKQTPGraphSymbols JKQTPGraphSymbolStyleMixin::symbolType
readwrite

The documentation for this class was generated from the following file: