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

if a class is derived from this class, it may use color bars that have 2 axes (one "data"/color axis and one "modifier" axis) More...

#include <jkqtpimagetools.h>

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

Public Member Functions

 JKQTPColorPaletteWithModifierStyleAndToolsMixin (JKQTBasePlotter *parent)
 
virtual ~JKQTPColorPaletteWithModifierStyleAndToolsMixin ()=default
 
virtual void cbDrawOutside (JKQTPEnhancedPainter &painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace) override
 plots outside the actual plot field of view (e.g. color bars, scale bars, ...)
 
virtual void cbGetModifierDataMinMax (double &imin, double &imax)=0
 determine min/max data value of the modifier image
 
virtual void cbGetOutsideSize (JKQTPEnhancedPainter &painter, int &leftSpace, int &rightSpace, int &topSpace, int &bottomSpace) override
 if the graph plots outside the actual plot field of view (e.g. color bars, scale bars, ...)
 
virtual void cbSetParent (JKQTBasePlotter *parent) override
 set the parent class for internal objects (e.g. color bars)
 
bool getAutoModifierRange () const
 indicates whether to estimate min/max of the modifier automatically
 
double getColorBarModifiedWidth () const
 width of the color bar when modifier is on
 
JKQTPHorizontalIndependentAxisgetModifierColorBarRightAxis ()
 object used for color bar axes (top border, modifier image data)
 
const JKQTPHorizontalIndependentAxisgetModifierColorBarRightAxis () const
 object used for color bar axes (top border, modifier image data)
 
JKQTPVerticalIndependentAxisgetModifierColorBarTopAxis ()
 object used for color bar axes (right border, modifier image data)
 
const JKQTPVerticalIndependentAxisgetModifierColorBarTopAxis () const
 object used for color bar axes (right border, modifier image data)
 
double getModifierMax () const
 modifier value range maximum
 
double getModifierMin () const
 modifier value range minimum
 
JKQTPMathImageModifierMode getModifierMode () const
 how to apply the modifier column dataModifier
 
void modifyImage (QImage &img, const void *dataModifier, JKQTPMathImageDataType datatypeModifier, int Nx, int Ny, double internalModifierMin, double internalModifierMax)
 modify the given image img, using modifier image dataModifier (of type datatypeModifier and size Nx * Ny), using values in the range internalModifierMin ... internalModifierMax
 
void setAutoModifierRange (bool __value)
 indicates whether to estimate min/max of the modifier automatically
 
void setColorBarModifiedWidth (double __value)
 width of the color bar when modifier is on
 
void setModifierMax (double __value)
 modifier value range maximum
 
void setModifierMin (double __value)
 modifier value range minimum
 
void setModifierMode (const JKQTPMathImageModifierMode &__value)
 how to apply the modifier column dataModifier
 
- Public Member Functions inherited from JKQTPColorPaletteStyleAndToolsMixin
 JKQTPColorPaletteStyleAndToolsMixin (JKQTBasePlotter *parent)
 
virtual ~JKQTPColorPaletteStyleAndToolsMixin ()
 
virtual void cbGetDataMinMax (double &imin, double &imax)=0
 determine min/max data value of the image
 
JKQTPMathImageColorRangeFailAction getActionRangeMaxFail () const
 which action to take if a color is above imageMax and autoImageRange ==false
 
JKQTPMathImageColorRangeFailAction getActionRangeMinFail () const
 which action to take if a color is below imageMin and autoImageRange ==false
 
bool getAutoImageRange () const
 indicates whether to estimate min/max of the image automatically
 
int getColorBarOffset () const
 offset between outside space border and color bar
 
double getColorBarRelativeHeight () const
 height of the color bar, as multiple of plotHeight
 
JKQTPVerticalIndependentAxisgetColorBarRightAxis ()
 object used for color bar axes at the right
 
const JKQTPVerticalIndependentAxisgetColorBarRightAxis () const
 object used for color bar axes at the right
 
bool getColorBarRightVisible () const
 right color bar visible
 
JKQTPHorizontalIndependentAxisgetColorBarTopAxis ()
 object used for color bar axes at the top
 
const JKQTPHorizontalIndependentAxisgetColorBarTopAxis () const
 object used for color bar axes at the top
 
bool getColorBarTopVisible () const
 top color bar visible
 
int getColorBarWidth () const
 width of the color bar
 
JKQTPMathImageColorPalette getColorPalette () const
 palette for plotting an image
 
double getImageMax () const
 image value range maximum
 
double getImageMin () const
 image value range minimum
 
QString getImageName () const
 name of the image displayed above color bar (may contain LaTeX markup!)
 
QString getImageNameFontName () const
 font name when displaying imageName
 
double getImageNameFontSize () const
 font size in points when displaying imageName
 
QColor getInfColor () const
 color to use for an infinity value
 
QColor getNanColor () const
 color to use for a not-a-number value
 
QColor getRangeMaxFailColor () const
 color to use for some settings of rangeMaxFailAction
 
QColor getRangeMinFailColor () const
 color to use for some settings of rangeMinFailAction
 
bool getShowColorBar () const
 indicate whether to display a color bar
 
void setAutoImageRange (bool __value)
 indicates whether to estimate min/max of the image automatically
 
void setColorBarOffset (int __value)
 offset between outside space border and color bar
 
void setColorBarRelativeHeight (double __value)
 height of the color bar, as multiple of plotHeight
 
void setColorBarRightVisible (bool __value)
 right color bar visible
 
void setColorBarTopVisible (bool __value)
 top color bar visible
 
void setColorBarWidth (int __value)
 width of the color bar
 
void setColorPalette (const JKQTPMathImageColorPalette &__value)
 palette for plotting an image
 
void setColorPalette (int pal)
 palette for plotting an image
 
void setImageMax (double __value)
 image value range maximum
 
void setImageMin (double __value)
 image value range minimum
 
void setImageName (const QString &__value)
 name of the image displayed above color bar (may contain LaTeX markup!)
 
void setImageNameFontName (const QString &__value)
 font name when displaying imageName
 
void setImageNameFontSize (double __value)
 font size in points when displaying imageName
 
void setInfColor (const QColor &__value)
 color to use for an infinity value
 
void setNanColor (const QColor &__value)
 color to use for a not-a-number value
 
void setRangeMaxFailAction (const JKQTPMathImageColorRangeFailAction &__value)
 which action to take if a color is above imageMax and autoImageRange ==false
 
void setRangeMaxFailColor (const QColor &__value)
 color to use for some settings of rangeMaxFailAction
 
void setRangeMinFailAction (const JKQTPMathImageColorRangeFailAction &__value)
 which action to take if a color is below imageMin and autoImageRange ==false
 
void setRangeMinFailColor (const QColor &__value)
 color to use for some settings of rangeMinFailAction
 
void setShowColorBar (bool __value)
 indicate whether to display a color bar
 

Protected Attributes

bool autoModifierRange
 indicates whether to estimate min/max of the modifier automatically
 
double colorBarModifiedWidth
 width of the color bar when modifier is on
 
JKQTPHorizontalIndependentAxismodifierColorBarRightAxis
 object used for color bar axes (top border, modifier image data)
 
JKQTPVerticalIndependentAxismodifierColorBarTopAxis
 object used for color bar axes (right border, modifier image data)
 
double modifierMax
 modifier value range maximum
 
double modifierMin
 modifier value range minimum
 
JKQTPMathImageModifierMode modifierMode
 how to apply the modifier column dataModifier
 
- Protected Attributes inherited from JKQTPColorPaletteStyleAndToolsMixin
bool autoImageRange
 indicates whether to estimate min/max of the image automatically
 
JKQTBasePlottercbParent
 
int colorBarOffset
 offset between outside space border and color bar
 
double colorBarRelativeHeight
 height of the color bar, as multiple of plotHeight
 
JKQTPVerticalIndependentAxiscolorBarRightAxis
 object used for color bar axes at the right
 
bool colorBarRightVisible
 right color bar visible
 
JKQTPHorizontalIndependentAxiscolorBarTopAxis
 object used for color bar axes at the top
 
bool colorBarTopVisible
 top color bar visible
 
int colorBarWidth
 width of the color bar
 
double imageMax
 image value range maximum
 
double imageMin
 image value range minimum
 
QString imageName
 name of the image displayed above color bar (may contain LaTeX markup!)
 
QString imageNameFontName
 font name when displaying imageName
 
double imageNameFontSize
 font size in points when displaying imageName
 
QColor infColor
 color to use for an infinity value
 
QColor nanColor
 color to use for a not-a-number value
 
JKQTPMathImageColorPalette palette
 palette for plotting an image
 
JKQTPMathImageColorRangeFailAction rangeMaxFailAction
 which action to take if a color is above imageMax and autoImageRange ==false
 
QColor rangeMaxFailColor
 color to use for some settings of rangeMaxFailAction
 
JKQTPMathImageColorRangeFailAction rangeMinFailAction
 which action to take if a color is below imageMin and autoImageRange ==false
 
QColor rangeMinFailColor
 color to use for some settings of rangeMinFailAction
 
bool showColorBar
 indicate whether to display a color bar
 

Additional Inherited Members

- Static Public Member Functions inherited from JKQTPColorPaletteStyleAndToolsMixin
static QIcon getPaletteIcon (int i)
 get QIcon representing the given palette

 
static QIcon getPaletteIcon (JKQTPMathImageColorPalette palette)
 get QIcon representing the given palette

 
static QImage getPaletteImage (int i, size_t width)
 get QIcon representing the given palette

 
static QImage getPaletteImage (JKQTPMathImageColorPalette palette, size_t width)
 get QIcon representing the given palette

 
static QIcon getPaletteKeyIcon (int i)
 get QIcon representing the given palette

 
static QIcon getPaletteKeyIcon (JKQTPMathImageColorPalette palette)
 get QIcon representing the given palette

 
static QImage getPaletteKeyImage (int i, size_t width, size_t height)
 get QIcon representing the given palette

 
static QImage getPaletteKeyImage (JKQTPMathImageColorPalette palette, size_t width, size_t height)
 get QIcon representing the given palette

 
static QStringList getPalettes ()
 get list with all available palettes

 
static int getPalettesCount ()
 get list with all available palettes

 

Detailed Description

if a class is derived from this class, it may use color bars that have 2 axes (one "data"/color axis and one "modifier" axis)

Constructor & Destructor Documentation

◆ JKQTPColorPaletteWithModifierStyleAndToolsMixin()

JKQTPColorPaletteWithModifierStyleAndToolsMixin::JKQTPColorPaletteWithModifierStyleAndToolsMixin ( JKQTBasePlotter parent)

◆ ~JKQTPColorPaletteWithModifierStyleAndToolsMixin()

virtual JKQTPColorPaletteWithModifierStyleAndToolsMixin::~JKQTPColorPaletteWithModifierStyleAndToolsMixin ( )
virtualdefault

Member Function Documentation

◆ cbDrawOutside()

virtual void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbDrawOutside ( JKQTPEnhancedPainter painter,
QRect  leftSpace,
QRect  rightSpace,
QRect  topSpace,
QRect  bottomSpace 
)
overridevirtual

plots outside the actual plot field of view (e.g. color bars, scale bars, ...)

Note
If you want to draw outside, then you'll also have to implement getOutsideSize(), so enough space is reserved

The four value supplied tell the method where to draw (inside one of the rectangles).

Reimplemented from JKQTPColorPaletteStyleAndToolsMixin.

◆ cbGetModifierDataMinMax()

virtual void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbGetModifierDataMinMax ( double &  imin,
double &  imax 
)
pure virtual

determine min/max data value of the modifier image

Implemented in JKQTPMathImage.

◆ cbGetOutsideSize()

virtual void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbGetOutsideSize ( JKQTPEnhancedPainter painter,
int &  leftSpace,
int &  rightSpace,
int &  topSpace,
int &  bottomSpace 
)
overridevirtual

if the graph plots outside the actual plot field of view (e.g. color bars, scale bars, ...)

Note
If you want to draw outside, then you'll also have to implement drawOutside()

Reimplemented from JKQTPColorPaletteStyleAndToolsMixin.

◆ cbSetParent()

virtual void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbSetParent ( JKQTBasePlotter parent)
overridevirtual

set the parent class for internal objects (e.g. color bars)

Reimplemented from JKQTPColorPaletteStyleAndToolsMixin.

◆ getAutoModifierRange()

bool JKQTPColorPaletteWithModifierStyleAndToolsMixin::getAutoModifierRange ( ) const

indicates whether to estimate min/max of the modifier automatically

◆ getColorBarModifiedWidth()

double JKQTPColorPaletteWithModifierStyleAndToolsMixin::getColorBarModifiedWidth ( ) const

width of the color bar when modifier is on

◆ getModifierColorBarRightAxis() [1/2]

JKQTPHorizontalIndependentAxis * JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarRightAxis ( )

object used for color bar axes (top border, modifier image data)

Note
this axis has some kind of a special role. It is used to format color bar axes

◆ getModifierColorBarRightAxis() [2/2]

const JKQTPHorizontalIndependentAxis * JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarRightAxis ( ) const

object used for color bar axes (top border, modifier image data)

Note
this axis has some kind of a special role. It is used to format color bar axes

◆ getModifierColorBarTopAxis() [1/2]

JKQTPVerticalIndependentAxis * JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarTopAxis ( )

object used for color bar axes (right border, modifier image data)

Note
this axis has some kind of a special role. It is used to format color bar axes

◆ getModifierColorBarTopAxis() [2/2]

const JKQTPVerticalIndependentAxis * JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierColorBarTopAxis ( ) const

object used for color bar axes (right border, modifier image data)

Note
this axis has some kind of a special role. It is used to format color bar axes

◆ getModifierMax()

double JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierMax ( ) const

modifier value range maximum

◆ getModifierMin()

double JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierMin ( ) const

modifier value range minimum

◆ getModifierMode()

JKQTPMathImageModifierMode JKQTPColorPaletteWithModifierStyleAndToolsMixin::getModifierMode ( ) const

how to apply the modifier column dataModifier

See also
ModifierMode

◆ modifyImage()

void JKQTPColorPaletteWithModifierStyleAndToolsMixin::modifyImage ( QImage &  img,
const void *  dataModifier,
JKQTPMathImageDataType  datatypeModifier,
int  Nx,
int  Ny,
double  internalModifierMin,
double  internalModifierMax 
)

modify the given image img, using modifier image dataModifier (of type datatypeModifier and size Nx * Ny), using values in the range internalModifierMin ... internalModifierMax

◆ setAutoModifierRange()

void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setAutoModifierRange ( bool  __value)

indicates whether to estimate min/max of the modifier automatically

◆ setColorBarModifiedWidth()

void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setColorBarModifiedWidth ( double  __value)

width of the color bar when modifier is on

◆ setModifierMax()

void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setModifierMax ( double  __value)

modifier value range maximum

◆ setModifierMin()

void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setModifierMin ( double  __value)

modifier value range minimum

◆ setModifierMode()

void JKQTPColorPaletteWithModifierStyleAndToolsMixin::setModifierMode ( const JKQTPMathImageModifierMode __value)

how to apply the modifier column dataModifier

See also
ModifierMode

Member Data Documentation

◆ autoModifierRange

bool JKQTPColorPaletteWithModifierStyleAndToolsMixin::autoModifierRange
protected

indicates whether to estimate min/max of the modifier automatically

◆ colorBarModifiedWidth

double JKQTPColorPaletteWithModifierStyleAndToolsMixin::colorBarModifiedWidth
protected

width of the color bar when modifier is on

◆ modifierColorBarRightAxis

JKQTPHorizontalIndependentAxis* JKQTPColorPaletteWithModifierStyleAndToolsMixin::modifierColorBarRightAxis
protected

object used for color bar axes (top border, modifier image data)

Note
this axis has some kind of a special role. It is used to format color bar axes

◆ modifierColorBarTopAxis

JKQTPVerticalIndependentAxis* JKQTPColorPaletteWithModifierStyleAndToolsMixin::modifierColorBarTopAxis
protected

object used for color bar axes (right border, modifier image data)

Note
this axis has some kind of a special role. It is used to format color bar axes

◆ modifierMax

double JKQTPColorPaletteWithModifierStyleAndToolsMixin::modifierMax
protected

modifier value range maximum

◆ modifierMin

double JKQTPColorPaletteWithModifierStyleAndToolsMixin::modifierMin
protected

modifier value range minimum

◆ modifierMode

JKQTPMathImageModifierMode JKQTPColorPaletteWithModifierStyleAndToolsMixin::modifierMode
protected

how to apply the modifier column dataModifier

See also
ModifierMode

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