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 JKQTBasePlotter, which summarizes all properties that define the visual styling of the key in a JKQTBasePlotter. More...

#include <jkqtpkeystyle.h>

Public Member Functions

 JKQTPKeyStyle ()
 
 JKQTPKeyStyle (const JKQTBasePlotterStyle &baseStyle)
 
void loadSettings (const QSettings &settings, const QString &group=QString("plots/key/"), const JKQTPKeyStyle &defaultStyle=JKQTPKeyStyle())
 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("plots/key/")) const
 saves the plot properties into a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object.
 

Public Attributes

QBrush backgroundBrush
 color of the key background
 
double columnSeparation
 distance between two columns of key entries [in units of width of 'X' set in fontName, fontSize]
 
QString fontName
 font name
 
double fontSize
 font size for key labels [in points]
 
QColor frameColor
 color of the key frame line
 
Qt::PenStyle frameLineStyle
 linestyle for the frame
 
double frameRounding
 rounding radius of the key frame rectangle (<=0 -> no rounded rectangle) [pt]
 
bool frameVisible
 indicates whether to plot a frame around the key
 
double frameWidth
 width of the key frame line [pt]
 
JKQTPKeyLayout layout
 the key layout, i.e. how the entries are distributed over the available space, see JKQTPKeyLayout for details and examples
 
JKQTPKeyPosition position
 key position inside or besides the plot area, see JKQTPKeyPositions for details and examples
 
double sampleHeight
 height of a line sample [in units of height of fontName, fontSize]
 
double sampleLineLength
 length of the line samples in the key [in units of width of 'X' set in fontName, fontSize]
 
QColor textColor
 color of the key entries' text
 
bool visible
 indicates whether to plot a key
 
double xMargin
 x-distance between key frame and key content [in units of width of 'X' set in fontName, fontSize]
 
double xOffset
 x-offset of the key from the border of the plot [in units of width of 'X' set in fontName, fontSize]
 
double xSeparation
 distance between key line example and key text [in units of width of 'X' set in fontName, fontSize]
 
double yMargin
 y-distance between key frame and key content [in units of width of 'X' set in fontName, fontSize]
 
double yOffset
 y-offset of the key from the border of the plot [in units of width of 'X' set in fontName, fontSize]
 
double ySeparation
 distance between two key entries [in units of height of fontName, fontSize]
 

Detailed Description

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

With JKQTPKeyStyle you can style the appearance of a key/legend:

In addition it is possible to set:

See also
JKQTPBaseKey, JKQTBasePlotter, JKQTBasePlotterStyle, Styling System

Constructor & Destructor Documentation

◆ JKQTPKeyStyle() [1/2]

JKQTPKeyStyle::JKQTPKeyStyle ( )

◆ JKQTPKeyStyle() [2/2]

JKQTPKeyStyle::JKQTPKeyStyle ( const JKQTBasePlotterStyle baseStyle)
explicit

Member Function Documentation

◆ loadSettings()

void JKQTPKeyStyle::loadSettings ( const QSettings &  settings,
const QString &  group = QString("plots/key/"),
const JKQTPKeyStyle defaultStyle = JKQTPKeyStyle() 
)

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 JKQTPKeyStyle::saveSettings ( QSettings &  settings,
const QString &  group = QString("plots/key/") 
) 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

◆ backgroundBrush

QBrush JKQTPKeyStyle::backgroundBrush

color of the key background

◆ columnSeparation

double JKQTPKeyStyle::columnSeparation

distance between two columns of key entries [in units of width of 'X' set in fontName, fontSize]

◆ fontName

QString JKQTPKeyStyle::fontName

font name

◆ fontSize

double JKQTPKeyStyle::fontSize

font size for key labels [in points]

◆ frameColor

QColor JKQTPKeyStyle::frameColor

color of the key frame line

◆ frameLineStyle

Qt::PenStyle JKQTPKeyStyle::frameLineStyle

linestyle for the frame

◆ frameRounding

double JKQTPKeyStyle::frameRounding

rounding radius of the key frame rectangle (<=0 -> no rounded rectangle) [pt]

◆ frameVisible

bool JKQTPKeyStyle::frameVisible

indicates whether to plot a frame around the key

◆ frameWidth

double JKQTPKeyStyle::frameWidth

width of the key frame line [pt]

◆ layout

JKQTPKeyLayout JKQTPKeyStyle::layout

the key layout, i.e. how the entries are distributed over the available space, see JKQTPKeyLayout for details and examples

◆ position

JKQTPKeyPosition JKQTPKeyStyle::position

key position inside or besides the plot area, see JKQTPKeyPositions for details and examples

◆ sampleHeight

double JKQTPKeyStyle::sampleHeight

height of a line sample [in units of height of fontName, fontSize]

◆ sampleLineLength

double JKQTPKeyStyle::sampleLineLength

length of the line samples in the key [in units of width of 'X' set in fontName, fontSize]

◆ textColor

QColor JKQTPKeyStyle::textColor

color of the key entries' text

◆ visible

bool JKQTPKeyStyle::visible

indicates whether to plot a key

◆ xMargin

double JKQTPKeyStyle::xMargin

x-distance between key frame and key content [in units of width of 'X' set in fontName, fontSize]

◆ xOffset

double JKQTPKeyStyle::xOffset

x-offset of the key from the border of the plot [in units of width of 'X' set in fontName, fontSize]

◆ xSeparation

double JKQTPKeyStyle::xSeparation

distance between key line example and key text [in units of width of 'X' set in fontName, fontSize]

◆ yMargin

double JKQTPKeyStyle::yMargin

y-distance between key frame and key content [in units of width of 'X' set in fontName, fontSize]

◆ yOffset

double JKQTPKeyStyle::yOffset

y-offset of the key from the border of the plot [in units of width of 'X' set in fontName, fontSize]

◆ ySeparation

double JKQTPKeyStyle::ySeparation

distance between two key entries [in units of height of fontName, fontSize]


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