Workspace 6.21.5
Public Types | Public Member Functions | List of all members
ColorScaleImage Class Reference

Class for maintaining an image of a color scale.

#include <DataAnalysis/Color/colorscaleimage.h>

Public Types

enum  NumberFormat { ScientificNotation , DecimalNotation , AutoDetect }
 
enum  Orientation { Horizontal , Vertical }
 
enum class  ScaleType { Linear , Log10 }
 

Public Member Functions

 ColorScaleImage ()
 
 ~ColorScaleImage ()
 
const ColorScalegetColorScale () const
 
int getDepth () const
 
bool getDisplayNumericLimits () const
 
const QFont & getFont () const
 
const QImagegetImage () const
 
bool getLabelIntermediateValues () const
 
int getLength () const
 
NumberFormat getNumberFormat () const
 
Orientation getOrientation () const
 
int getPrecision () const
 
ScaleType getScaleType () const
 
const QColor & getTextColor () const
 
const QString & getTitle () const
 
bool getTitleAlwaysHorizontal () const
 
bool getValuesBelowRight () const
 
void setColorScale (const ColorScale &scale)
 
void setDepth (int depth)
 
void setDisplayNumericLimits (bool display)
 
void setFont (const QFont &font)
 
void setLabelIntermediateValues (bool b)
 
void setLength (int length)
 
void setNumberFormat (NumberFormat format)
 
void setOrientation (Orientation orientation)
 
void setPrecision (int n)
 
void setScaleType (ScaleType val)
 
void setTextColor (const QColor &color)
 
void setTitle (const QString &title)
 
void setTitleAlwaysHorizontal (bool b)
 
void setValuesBelowRight (bool b)
 
void updateImage ()
 

Member Enumeration Documentation

◆ NumberFormat

Enumerator
ScientificNotation 
DecimalNotation 
AutoDetect 

◆ Orientation

Analogous to Qt::Orientation except the values used are different. Specifically, the values used here start at zero, whereas Qt::Orientation starts at 1. This is done to make using enum's and enum widgets simpler.

Enumerator
Horizontal 

Color scale stretches horizontally.

Vertical 

Color scale stretches vertically.

◆ ScaleType

enum class ScaleType
strong
Enumerator
Linear 
Log10 

Constructor & Destructor Documentation

◆ ColorScaleImage()

◆ ~ColorScaleImage()

Member Function Documentation

◆ getColorScale()

const ColorScale & getColorScale ( ) const

◆ getDepth()

int getDepth ( ) const

◆ getDisplayNumericLimits()

bool getDisplayNumericLimits ( ) const

◆ getFont()

const QFont & getFont ( ) const

◆ getImage()

const QImage & getImage ( ) const
Returns
The current image. It is always valid, but clients will usually want to ensure that they have called updateImage() at some point beforehand so that the image represents the color scale they are interested in.

◆ getLabelIntermediateValues()

bool getLabelIntermediateValues ( ) const

◆ getLength()

int getLength ( ) const

◆ getNumberFormat()

ColorScaleImage::NumberFormat getNumberFormat ( ) const

◆ getOrientation()

ColorScaleImage::Orientation getOrientation ( ) const

◆ getPrecision()

int getPrecision ( ) const

◆ getScaleType()

◆ getTextColor()

const QColor & getTextColor ( ) const

◆ getTitle()

const QString & getTitle ( ) const
Returns
The currently set title or an empty string if no title is set.
See also
setTitle()

◆ getTitleAlwaysHorizontal()

bool getTitleAlwaysHorizontal ( ) const

◆ getValuesBelowRight()

bool getValuesBelowRight ( ) const

◆ setColorScale()

void setColorScale ( const ColorScale scale)

◆ setDepth()

void setDepth ( int  depth)

◆ setDisplayNumericLimits()

void setDisplayNumericLimits ( bool  display)

◆ setFont()

void setFont ( const QFont &  font)

◆ setLabelIntermediateValues()

void setLabelIntermediateValues ( bool  b)

◆ setLength()

void setLength ( int  length)

◆ setNumberFormat()

void setNumberFormat ( NumberFormat  format)

◆ setOrientation()

void setOrientation ( ColorScaleImage::Orientation  orientation)

◆ setPrecision()

void setPrecision ( int  n)

◆ setScaleType()

void setScaleType ( ScaleType  val)

◆ setTextColor()

void setTextColor ( const QColor &  color)

◆ setTitle()

void setTitle ( const QString &  title)
Parameters
titleThe new title for the color scale. It can be an empty string, which is the default.
See also
getTitle()

◆ setTitleAlwaysHorizontal()

void setTitleAlwaysHorizontal ( bool  b)

◆ setValuesBelowRight()

void setValuesBelowRight ( bool  b)
Parameters
bIf true, the values of the color scale will appear to the right for the vertical orientation and below for the horizontal orientation. If false, it will appear to the left/above instead respectively.

The title of the color scale is on the opposite side of the scale to the values. Thus, if you swap the location of the values, you also swap the location of the title.

◆ updateImage()

void updateImage ( )