itom 2.0.0
|
Public Member Functions | |
ItomPaletteBase (const QString name, const char type) | |
ItomPaletteBase (const QString name, const char type, QColor start, QColor stop) | |
ItomPaletteBase (const ItomPaletteBase &scr) | |
QString | getName () const |
int | getSize () const |
int | getType () const |
double | getPosFirst () const |
double | getPosLast () const |
double | getPos (unsigned int color) const |
Get the position of the n-th color-stop in the palette. | |
bool | setInversColorOne (const QColor color) |
Set the first inverse color for this color bar. | |
QColor | getInversColorOne () const |
bool | setInversColorTwo (const QColor color) |
Set the second inverse color for this color bar. | |
QColor | getInversColorTwo () const |
bool | setInvalidColor (const QColor color) |
Set the invalid color for this color bar. | |
QColor | getInvalidColor () const |
Get the invalid color for this color bar. | |
QColor | getColorFirst () const |
QColor | getColorLast () const |
QColor | getColor (unsigned int color) const |
Get the RGBA-Color of the n-th color-stop in the palette. | |
void | update (const bool updateInverseColors) |
This function updates the internal structur of the palette after modifications. | |
ItomPalette | getPalette () |
This function returns the internal structur of the palett. | |
void | setWriteProtection () |
bool | insertColorStop (double pos, const QColor color) |
Insert a new color stop into the palette defined by color and position. | |
void | calculateInverseColors (QColor &inv1, QColor &inv2) |
Function which shall calculate the ideal inverse colors. | |
QVector< ito::uint32 > | get256Colors (bool includeAlpha=false) const |
Transform the color stops to a 256 color vector. | |
Protected Member Functions | |
void | removeWriteProtection () |
Private Member Functions | |
int | findUpper (double pos) const |
Find the next color stop and its values within this palette. | |
Private Attributes | |
QString | m_name |
char | m_type |
ItomPalette | m_paletteStucture |
QColor | m_inverseColorTwo |
QColor | m_inverseColorOne |
QColor | m_invalidColor |
QVector< QPair< double, QColor > > | m_colorStops |
void ito::ItomPaletteBase::calculateInverseColors | ( | QColor & | inv1, |
QColor & | inv2 | ||
) |
Function which shall calculate the ideal inverse colors.
Not inplemented yet
inv1 | first invalid color |
inv2 | second invalid color |
int ito::ItomPaletteBase::findUpper | ( | double | pos | ) | const [inline, private] |
Find the next color stop and its values within this palette.
The palette itself is based on a small set of color stops. Between this stops, the color is linear interpolated. This function is used to give the next valid color stop for a position to allow such an interpolation.
pos | the position within the palette |
QVector< ito::uint32 > ito::ItomPaletteBase::get256Colors | ( | bool | includeAlpha = false | ) | const |
Transform the color stops to a 256 color vector.
Transform the color stops to a 256 color vector
updateInverseColors | recalculate the ideals inverse color |
QColor ito::ItomPaletteBase::getColor | ( | unsigned int | color | ) | const |
Get the RGBA-Color of the n-th color-stop in the palette.
This function returns the position (doubel value) of the color stop devined by int color
color | index of the color to retrieve |
QColor ito::ItomPaletteBase::getInvalidColor | ( | ) | const |
Get the invalid color for this color bar.
Each colorbar has a invalid color for inf and NaN values
color | new color as QColor value |
ItomPalette ito::ItomPaletteBase::getPalette | ( | ) |
This function returns the internal structur of the palett.
This function returns the internal structur of the palett
double ito::ItomPaletteBase::getPos | ( | unsigned int | color | ) | const |
Get the position of the n-th color-stop in the palette.
This function returns the position (doubel value) of the color stop devined by int color
color | index of the color to retrieve |
bool ito::ItomPaletteBase::insertColorStop | ( | double | pos, |
const QColor | color | ||
) |
Insert a new color stop into the palette defined by color and position.
The palette itself is based on a small set of color stops. Between this stops, the color is linear interpolated.
pos | the position within the palette |
color | new color as QColor value |
bool ito::ItomPaletteBase::setInvalidColor | ( | const QColor | color | ) |
Set the invalid color for this color bar.
Each colorbar has a invalid color for inf and NaN values
color | new color as QColor value |
bool ito::ItomPaletteBase::setInversColorOne | ( | const QColor | color | ) |
Set the first inverse color for this color bar.
Each colorbar has 2 inverse colors to highlight lines, cursers ...
color | new color as QColor value |
bool ito::ItomPaletteBase::setInversColorTwo | ( | const QColor | color | ) |
Set the second inverse color for this color bar.
Each colorbar has 2 inverse colors to highlight lines, cursers ...
color | new color as QColor value |
void ito::ItomPaletteBase::update | ( | const bool | updateInverseColors | ) |
This function updates the internal structur of the palette after modifications.
This function updates the internal structur of the palette after modifications
updateInverseColors | recalculate the ideals inverse color |