![]() |
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
|
Support Class for JKQTPCoordinateAxis, which summarizes all properties that define the visual styling of a JKQTPCoordinateAxis. More...
#include <jkqtpcoordinateaxesstyle.h>
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 (major) 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 | |
Support Class for JKQTPCoordinateAxis, which summarizes all properties that define the visual styling of a JKQTPCoordinateAxis.
| JKQTPCoordinateAxisStyle::JKQTPCoordinateAxisStyle | ( | ) |
|
explicit |
| double JKQTPCoordinateAxisStyle::getArrowSize | ( | JKQTPEnhancedPainter & | painter, |
| JKQTBasePlotter * | parent ) const |
calculates the size of an arrow in pixels
| QPen JKQTPCoordinateAxisStyle::getAxisPen | ( | JKQTPEnhancedPainter & | painter, |
| JKQTBasePlotter * | parent ) const |
returns a QPen that can be used for drawing axis lines
| QPen JKQTPCoordinateAxisStyle::getMinorTickPen | ( | JKQTPEnhancedPainter & | painter, |
| JKQTBasePlotter * | parent ) const |
returns a QPen that can be used for drawing minor axis tick lines
| QPen JKQTPCoordinateAxisStyle::getTickPen | ( | JKQTPEnhancedPainter & | painter, |
| JKQTBasePlotter * | parent ) const |
returns a QPen that can be used for drawing axis tick lines
| QPen JKQTPCoordinateAxisStyle::getZeroAxisPen | ( | JKQTPEnhancedPainter & | painter, |
| JKQTBasePlotter * | parent ) const |
returns a QPen that can be used for drawing zero axis lines
| 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
| settings | QSettings-object to read from |
| group | Group in the QSettings-object to read from |
| defaultStyle | If a setting cannot be found in settings, default values are taken from this object By default, this is a default-constructed object |
| 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.
| settings | QSettings-object to save to |
| group | Group in the QSettings-object to save to |
| double JKQTPCoordinateAxisStyle::arrowSizeFactor |
factor used to calculate the size of line arrows
| bool JKQTPCoordinateAxisStyle::autoLabelDigits |
when true, the digits of the labels are calculated automatically
| QColor JKQTPCoordinateAxisStyle::axisColor |
color of the axis (labels, ticks, axis itself ...)
| 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!
| QColor JKQTPCoordinateAxisStyle::colorZeroAxis |
color of 0-line
| JKQTPCADrawMode JKQTPCoordinateAxisStyle::drawMode0 |
| JKQTPCADrawMode JKQTPCoordinateAxisStyle::drawMode1 |
draw mode of the main (left/bottom) axis
| JKQTPCADrawMode JKQTPCoordinateAxisStyle::drawMode2 |
draw mode of the secondary (right/top) axis
| QColor JKQTPCoordinateAxisStyle::labelColor |
color of the axis label
| int JKQTPCoordinateAxisStyle::labelDigits |
digits used for tick labels
| double JKQTPCoordinateAxisStyle::labelDistance |
distance between tick label and axis label in pt
| double JKQTPCoordinateAxisStyle::labelFontSize |
fontsize of the axis labels
| JKQTPLabelPosition JKQTPCoordinateAxisStyle::labelPosition |
position of the axis label
| double JKQTPCoordinateAxisStyle::lineWidth |
line width of axis in pt
| double JKQTPCoordinateAxisStyle::lineWidthZeroAxis |
line width of 0-line in pt
| JKQTPGridStyle JKQTPCoordinateAxisStyle::majorGridStyle |
styling of the major/primary grid
| JKQTPGridStyle JKQTPCoordinateAxisStyle::minorGridStyle |
styling of the minor/secondary grid
| QColor JKQTPCoordinateAxisStyle::minorTickColor |
color of minor ticks
| double JKQTPCoordinateAxisStyle::minorTickInsideLength |
length of a minor axis tick inside the plot border in pt
| QColor JKQTPCoordinateAxisStyle::minorTickLabelColor |
color of minor tick labels
| double JKQTPCoordinateAxisStyle::minorTickLabelFontSize |
fontsize of the minor axis tick labels
| bool JKQTPCoordinateAxisStyle::minorTickLabelFullNumber |
indicates whether the minor tick labels should be full numbers, or just a number between 0..10
| bool JKQTPCoordinateAxisStyle::minorTickLabelsEnabled |
if true, the plotter displays minor axis labels as number between 1 and 10 in some cases
| double JKQTPCoordinateAxisStyle::minorTickOutsideLength |
length of a minor axis tick outside the plot border in pt
| unsigned int JKQTPCoordinateAxisStyle::minorTicks |
number of minor grid lines per (major) axis tick interval
| double JKQTPCoordinateAxisStyle::minorTickWidth |
line width of minor ticks in pt
| unsigned int JKQTPCoordinateAxisStyle::minTicks |
minimum number of axis ticks
| bool JKQTPCoordinateAxisStyle::showZeroAxis |
indicates whether to draw a thick axis line at x=0 (zero axis)
| Qt::PenStyle JKQTPCoordinateAxisStyle::styleZeroAxis |
pen style of 0-line
| QColor JKQTPCoordinateAxisStyle::tickColor |
color of axis ticks
| QString JKQTPCoordinateAxisStyle::tickDateFormat |
format string for date tick labels, see QDateTime::toString() documentation for details on format strings
| QString JKQTPCoordinateAxisStyle::tickDateTimeFormat |
format string for datetime tick labels, see QDateTime::toString() documentation for details on format strings
| 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}}}":
JKQtPlotter_ENABLED_CXX20=ON if your compiler supports this. | double JKQTPCoordinateAxisStyle::tickInsideLength |
length of an axis tick inside the plot border in pt
| 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:
| QColor JKQTPCoordinateAxisStyle::tickLabelColor |
color of axis tick labels
| double JKQTPCoordinateAxisStyle::tickLabelDistance |
distance between tick end and label start in pt
| double JKQTPCoordinateAxisStyle::tickLabelFontSize |
fontsize of the axis tick labels
| JKQTPCALabelType JKQTPCoordinateAxisStyle::tickLabelType |
indicates how to draw the labels
| JKQTPLabelTickMode JKQTPCoordinateAxisStyle::tickMode |
mode of the major ticks
| double JKQTPCoordinateAxisStyle::tickOutsideLength |
length of an axis tick outside the plot border in pt
| 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":
| QString JKQTPCoordinateAxisStyle::tickTimeFormat |
format string for time tick labels, see QDateTime::toString() documentation for details on format strings
| double JKQTPCoordinateAxisStyle::tickWidth |
line width of ticks in pt