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

Support Class for JKQTPCoordinateAxis, which summarizes all properties that define the visual styling of a JKQTPCoordinateAxis. More...

#include <jkqtpcoordinateaxesstyle.h>

Inheritance diagram for JKQTPCoordinateAxisStyle:
[legend]
Collaboration diagram for JKQTPCoordinateAxisStyle:
[legend]

Public Member Functions

 JKQTPCoordinateAxisStyle ()
 
 JKQTPCoordinateAxisStyle (const JKQTBasePlotterStyle &baseStyle)
 
double getArrowSize (JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
 calculates the size of an arrow in pixels
 
QPen getAxisPen (JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
 returns a QPen that can be used for drawing axis lines
 
QPen getMinorTickPen (JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
 returns a QPen that can be used for drawing minor axis tick lines
 
QPen getTickPen (JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
 returns a QPen that can be used for drawing axis tick lines
 
QPen getZeroAxisPen (JKQTPEnhancedPainter &painter, JKQTBasePlotter *parent) const
 returns a QPen that can be used for drawing zero axis lines
 
void loadSettings (const QSettings &settings, const QString &group=QString("axis/"), const JKQTPCoordinateAxisStyle &defaultStyle=JKQTPCoordinateAxisStyle())
 loads the plot properties from a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object
 
void saveSettings (QSettings &settings, const QString &group=QString("axis/")) const
 saves the plot properties into a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object.
 

Public Attributes

double arrowSizeFactor
 factor used to calculate the size of line arrows
 
bool autoLabelDigits
 when true, the digits of the labels are calculated automatically
 
QColor axisColor
 color of the axis (labels, ticks, axis itself ...)
 
double axisLineOffset
 if non-zero, the line of the coordinate axis is moved outside the plot by this amount [pt]. This does not apply to the zero-axis!
 
QColor colorZeroAxis
 color of 0-line
 
JKQTPCADrawMode drawMode0
 draw mode of the zero axis
 
JKQTPCADrawMode drawMode1
 draw mode of the main (left/bottom) axis
 
JKQTPCADrawMode drawMode2
 draw mode of the secondary (right/top) axis
 
QColor labelColor
 color of the axis label
 
int labelDigits
 digits used for tick labels
 
double labelDistance
 distance between tick label and axis label in pt
 
double labelFontSize
 fontsize of the axis labels
 
JKQTPLabelPosition labelPosition
 position of the axis label
 
double lineWidth
 line width of axis in pt
 
double lineWidthZeroAxis
 line width of 0-line in pt
 
JKQTPGridStyle majorGridStyle
 styling of the major/primary grid
 
JKQTPGridStyle minorGridStyle
 styling of the minor/secondary grid
 
QColor minorTickColor
 color of minor ticks
 
double minorTickInsideLength
 length of a minor axis tick inside the plot border in pt
 
QColor minorTickLabelColor
 color of minor tick labels
 
double minorTickLabelFontSize
 fontsize of the minor axis tick labels
 
bool minorTickLabelFullNumber
 indicates whether the minor tick labels should be full numbers, or just a number between 0..10
 
bool minorTickLabelsEnabled
 if true, the plotter displays minor axis labels as number between 1 and 10 in some cases
 
double minorTickOutsideLength
 length of a minor axis tick outside the plot border in pt
 
unsigned int minorTicks
 number of minor grid lines per axis tick interval
 
double minorTickWidth
 line width of minor ticks in pt
 
unsigned int minTicks
 minimum number of axis ticks
 
bool showZeroAxis
 indicates whether to draw a thick axis line at x=0 (zero axis)
 
Qt::PenStyle styleZeroAxis
 pen style of 0-line
 
QColor tickColor
 color of axis ticks
 
QString tickDateFormat
 format string for date tick labels, see QDateTime::toString() documentation for details on format strings
 
QString tickDateTimeFormat
 format string for datetime tick labels, see QDateTime::toString() documentation for details on format strings
 
QString tickFormatFormat
 format string for std::format tick labels, (see e.g. https://en.cppreference.com/w/cpp/utility/format/formatter#Standard_format_specification ). The first data parameter is the tick value as double an the second is tickUnitName as string. The following image shows an example for "\\texttt{{ y={:*^+8.1f}}}":
 
double tickInsideLength
 length of an axis tick inside the plot border in pt
 
double tickLabelAngle
 rotation angle of tick labels [-180..180], i.e. given in degrees, default is 0 (horizontal)
 
QColor tickLabelColor
 color of axis tick labels
 
double tickLabelDistance
 distance between tick end and label start in pt
 
double tickLabelFontSize
 fontsize of the axis tick labels
 
JKQTPCALabelType tickLabelType
 indicates how to draw the labels
 
JKQTPLabelTickMode tickMode
 mode of the major ticks
 
double tickOutsideLength
 length of an axis tick outside the plot border in pt
 
QString tickPrintfFormat
 format string for printf tick labels, see https://en.wikipedia.org/wiki/Printf_format_string documentation for details on format strings The first data parameter is the tick value as double an the second is tickUnitName as string. The following image shows an example for "y=%+.2f":
 
QString tickTimeFormat
 format string for time tick labels, see QDateTime::toString() documentation for details on format strings
 
double tickWidth
 line width of ticks in pt
 

Detailed Description

Support Class for JKQTPCoordinateAxis, which summarizes all properties that define the visual styling of a JKQTPCoordinateAxis.

See also
JKQTPCoordinateAxis, Styling System

Constructor & Destructor Documentation

◆ JKQTPCoordinateAxisStyle() [1/2]

JKQTPCoordinateAxisStyle::JKQTPCoordinateAxisStyle ( )

◆ JKQTPCoordinateAxisStyle() [2/2]

JKQTPCoordinateAxisStyle::JKQTPCoordinateAxisStyle ( const JKQTBasePlotterStyle baseStyle)
explicit

Member Function Documentation

◆ getArrowSize()

double JKQTPCoordinateAxisStyle::getArrowSize ( JKQTPEnhancedPainter painter,
JKQTBasePlotter parent 
) const

calculates the size of an arrow in pixels

◆ getAxisPen()

QPen JKQTPCoordinateAxisStyle::getAxisPen ( JKQTPEnhancedPainter painter,
JKQTBasePlotter parent 
) const

returns a QPen that can be used for drawing axis lines

◆ getMinorTickPen()

QPen JKQTPCoordinateAxisStyle::getMinorTickPen ( JKQTPEnhancedPainter painter,
JKQTBasePlotter parent 
) const

returns a QPen that can be used for drawing minor axis tick lines

◆ getTickPen()

QPen JKQTPCoordinateAxisStyle::getTickPen ( JKQTPEnhancedPainter painter,
JKQTBasePlotter parent 
) const

returns a QPen that can be used for drawing axis tick lines

◆ getZeroAxisPen()

QPen JKQTPCoordinateAxisStyle::getZeroAxisPen ( JKQTPEnhancedPainter painter,
JKQTBasePlotter parent 
) const

returns a QPen that can be used for drawing zero axis lines

◆ loadSettings()

void JKQTPCoordinateAxisStyle::loadSettings ( const QSettings &  settings,
const QString &  group = QString("axis/"),
const JKQTPCoordinateAxisStyle defaultStyle = JKQTPCoordinateAxisStyle() 
)

loads the plot properties from a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object

Parameters
settingsQSettings-object to read from
groupGroup in the QSettings-object to read from
defaultStyleIf a setting cannot be found in settings, default values are taken from this object By default, this is a default-constructed object

◆ saveSettings()

void JKQTPCoordinateAxisStyle::saveSettings ( QSettings &  settings,
const QString &  group = QString("axis/") 
) const

saves the plot properties into a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object.

Parameters
settingsQSettings-object to save to
groupGroup in the QSettings-object to save to

Member Data Documentation

◆ arrowSizeFactor

double JKQTPCoordinateAxisStyle::arrowSizeFactor

factor used to calculate the size of line arrows

◆ autoLabelDigits

bool JKQTPCoordinateAxisStyle::autoLabelDigits

when true, the digits of the labels are calculated automatically

◆ axisColor

QColor JKQTPCoordinateAxisStyle::axisColor

color of the axis (labels, ticks, axis itself ...)

◆ axisLineOffset

double JKQTPCoordinateAxisStyle::axisLineOffset

if non-zero, the line of the coordinate axis is moved outside the plot by this amount [pt]. This does not apply to the zero-axis!

◆ colorZeroAxis

QColor JKQTPCoordinateAxisStyle::colorZeroAxis

color of 0-line

◆ drawMode0

JKQTPCADrawMode JKQTPCoordinateAxisStyle::drawMode0

draw mode of the zero axis

See also
Example (JKQTPlotter): Plot With Axes through Origin

◆ drawMode1

JKQTPCADrawMode JKQTPCoordinateAxisStyle::drawMode1

draw mode of the main (left/bottom) axis

◆ drawMode2

JKQTPCADrawMode JKQTPCoordinateAxisStyle::drawMode2

draw mode of the secondary (right/top) axis

◆ labelColor

QColor JKQTPCoordinateAxisStyle::labelColor

color of the axis label

◆ labelDigits

int JKQTPCoordinateAxisStyle::labelDigits

digits used for tick labels

◆ labelDistance

double JKQTPCoordinateAxisStyle::labelDistance

distance between tick label and axis label in pt

◆ labelFontSize

double JKQTPCoordinateAxisStyle::labelFontSize

fontsize of the axis labels

◆ labelPosition

JKQTPLabelPosition JKQTPCoordinateAxisStyle::labelPosition

position of the axis label

◆ lineWidth

double JKQTPCoordinateAxisStyle::lineWidth

line width of axis in pt

◆ lineWidthZeroAxis

double JKQTPCoordinateAxisStyle::lineWidthZeroAxis

line width of 0-line in pt

◆ majorGridStyle

JKQTPGridStyle JKQTPCoordinateAxisStyle::majorGridStyle

styling of the major/primary grid

◆ minorGridStyle

JKQTPGridStyle JKQTPCoordinateAxisStyle::minorGridStyle

styling of the minor/secondary grid

◆ minorTickColor

QColor JKQTPCoordinateAxisStyle::minorTickColor

color of minor ticks

◆ minorTickInsideLength

double JKQTPCoordinateAxisStyle::minorTickInsideLength

length of a minor axis tick inside the plot border in pt

◆ minorTickLabelColor

QColor JKQTPCoordinateAxisStyle::minorTickLabelColor

color of minor tick labels

◆ minorTickLabelFontSize

double JKQTPCoordinateAxisStyle::minorTickLabelFontSize

fontsize of the minor axis tick labels

◆ minorTickLabelFullNumber

bool JKQTPCoordinateAxisStyle::minorTickLabelFullNumber

indicates whether the minor tick labels should be full numbers, or just a number between 0..10

◆ minorTickLabelsEnabled

bool JKQTPCoordinateAxisStyle::minorTickLabelsEnabled

if true, the plotter displays minor axis labels as number between 1 and 10 in some cases

◆ minorTickOutsideLength

double JKQTPCoordinateAxisStyle::minorTickOutsideLength

length of a minor axis tick outside the plot border in pt

◆ minorTicks

unsigned int JKQTPCoordinateAxisStyle::minorTicks

number of minor grid lines per axis tick interval

◆ minorTickWidth

double JKQTPCoordinateAxisStyle::minorTickWidth

line width of minor ticks in pt

◆ minTicks

unsigned int JKQTPCoordinateAxisStyle::minTicks

minimum number of axis ticks

◆ showZeroAxis

bool JKQTPCoordinateAxisStyle::showZeroAxis

indicates whether to draw a thick axis line at x=0 (zero axis)

◆ styleZeroAxis

Qt::PenStyle JKQTPCoordinateAxisStyle::styleZeroAxis

pen style of 0-line

◆ tickColor

QColor JKQTPCoordinateAxisStyle::tickColor

color of axis ticks

◆ tickDateFormat

QString JKQTPCoordinateAxisStyle::tickDateFormat

format string for date tick labels, see QDateTime::toString() documentation for details on format strings

◆ tickDateTimeFormat

QString JKQTPCoordinateAxisStyle::tickDateTimeFormat

format string for datetime tick labels, see QDateTime::toString() documentation for details on format strings

◆ tickFormatFormat

QString JKQTPCoordinateAxisStyle::tickFormatFormat

format string for std::format tick labels, (see e.g. https://en.cppreference.com/w/cpp/utility/format/formatter#Standard_format_specification ). The first data parameter is the tick value as double an the second is tickUnitName as string. The following image shows an example for "\\texttt{{ y={:*^+8.1f}}}":

Note
This option is only available for C++20 and above, use the CMake option JKQtPlotter_ENABLED_CXX20=ON if your compiler supports this.

◆ tickInsideLength

double JKQTPCoordinateAxisStyle::tickInsideLength

length of an axis tick inside the plot border in pt

◆ tickLabelAngle

double JKQTPCoordinateAxisStyle::tickLabelAngle

rotation angle of tick labels [-180..180], i.e. given in degrees, default is 0 (horizontal)

These images show some example rotations:

◆ tickLabelColor

QColor JKQTPCoordinateAxisStyle::tickLabelColor

color of axis tick labels

◆ tickLabelDistance

double JKQTPCoordinateAxisStyle::tickLabelDistance

distance between tick end and label start in pt

◆ tickLabelFontSize

double JKQTPCoordinateAxisStyle::tickLabelFontSize

fontsize of the axis tick labels

◆ tickLabelType

JKQTPCALabelType JKQTPCoordinateAxisStyle::tickLabelType

indicates how to draw the labels

◆ tickMode

JKQTPLabelTickMode JKQTPCoordinateAxisStyle::tickMode

mode of the major ticks

◆ tickOutsideLength

double JKQTPCoordinateAxisStyle::tickOutsideLength

length of an axis tick outside the plot border in pt

◆ tickPrintfFormat

QString JKQTPCoordinateAxisStyle::tickPrintfFormat

format string for printf tick labels, see https://en.wikipedia.org/wiki/Printf_format_string documentation for details on format strings The first data parameter is the tick value as double an the second is tickUnitName as string. The following image shows an example for "y=%+.2f":

◆ tickTimeFormat

QString JKQTPCoordinateAxisStyle::tickTimeFormat

format string for time tick labels, see QDateTime::toString() documentation for details on format strings

◆ tickWidth

double JKQTPCoordinateAxisStyle::tickWidth

line width of ticks in pt


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