Stellarium 0.15.2
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
QCPColorGradient Class Reference

Public Types

enum  ColorInterpolation { ciRGB, ciHSV }
 
enum  GradientPreset {
  gpGrayscale, gpHot, gpCold, gpNight,
  gpCandy, gpGeography, gpIon, gpThermal,
  gpPolar, gpSpectrum, gpJet, gpHues
}
 

Public Member Functions

 QCPColorGradient (GradientPreset preset=gpCold)
 
bool operator== (const QCPColorGradient &other) const
 
bool operator!= (const QCPColorGradient &other) const
 
int levelCount () const
 
QMap< double, QColor > colorStops () const
 
ColorInterpolation colorInterpolation () const
 
bool periodic () const
 
void setLevelCount (int n)
 
void setColorStops (const QMap< double, QColor > &colorStops)
 
void setColorStopAt (double position, const QColor &color)
 
void setColorInterpolation (ColorInterpolation interpolation)
 
void setPeriodic (bool enabled)
 
void colorize (const double *data, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor=1, bool logarithmic=false)
 
QRgb color (double position, const QCPRange &range, bool logarithmic=false)
 
void loadPreset (GradientPreset preset)
 
void clearColorStops ()
 
QCPColorGradient inverted () const
 

Protected Member Functions

void updateColorBuffer ()
 

Protected Attributes

int mLevelCount
 
QMap< double, QColor > mColorStops
 
ColorInterpolation mColorInterpolation
 
bool mPeriodic
 
QVector< QRgb > mColorBuffer
 
bool mColorBufferInvalidated
 

Detailed Description

Definition at line 1900 of file qcustomplot.h.

Member Enumeration Documentation

Defines the color spaces in which color interpolation between gradient stops can be performed.

See also
setColorInterpolation
Enumerator
ciRGB 

Color channels red, green and blue are linearly interpolated.

ciHSV 

Color channels hue, saturation and value are linearly interpolated (The hue is interpolated over the shortest angle distance)

Definition at line 1909 of file qcustomplot.h.

Defines the available presets that can be loaded with loadPreset. See the documentation there for an image of the presets.

Enumerator
gpGrayscale 

Continuous lightness from black to white (suited for non-biased data representation)

gpHot 

Continuous lightness from black over firey colors to white (suited for non-biased data representation)

gpCold 

Continuous lightness from black over icey colors to white (suited for non-biased data representation)

gpNight 

Continuous lightness from black over weak blueish colors to white (suited for non-biased data representation)

gpCandy 

Blue over pink to white.

gpGeography 

Colors suitable to represent different elevations on geographical maps.

gpIon 

Half hue spectrum from black over purple to blue and finally green (creates banding illusion but allows more precise magnitude estimates)

gpThermal 

Colors suitable for thermal imaging, ranging from dark blue over purple to orange, yellow and white.

gpPolar 

Colors suitable to emphasize polarity around the center, with blue for negative, black in the middle and red for positive values.

gpSpectrum 

An approximation of the visible light spectrum (creates banding illusion but allows more precise magnitude estimates)

gpJet 

Hue variation similar to a spectrum, often used in numerical visualization (creates banding illusion but allows more precise magnitude estimates)

gpHues 

Full hue cycle, with highest and lowest color red (suitable for periodic data, such as angles and phases, see setPeriodic)

Definition at line 1918 of file qcustomplot.h.


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