NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
A class to handle value-based cell shading using a custom colorscheme and custom conditions. More...
#include <cellvalueshader.hpp>
Public Member Functions | |
CellValueShader () | |
CellValueShader (const std::vector< wxColour > &colors, const CellValueShaderCondition &cond) | |
CellValueShader (const CellValueShader &shader) | |
bool | isActive () const |
Detect, whether this shader is actually active or an empty shader. More... | |
wxColour | getColour (const mu::value_type &val) const |
Calculate the colour for a numerical value. More... | |
wxColour | getColour (const wxString &strVal) const |
Calulate the colour for a string value. More... | |
Private Member Functions | |
wxColour | interpolateColor (double val, bool excl) const |
Calculate the cell background colour depending on their value and using linear interpolation. More... | |
Private Attributes | |
std::vector< wxColour > | m_colorArray |
CellValueShaderCondition | m_condition |
A class to handle value-based cell shading using a custom colorscheme and custom conditions.
Definition at line 70 of file cellvalueshader.hpp.
|
inline |
Definition at line 112 of file cellvalueshader.hpp.
|
inline |
Definition at line 113 of file cellvalueshader.hpp.
|
inline |
Definition at line 114 of file cellvalueshader.hpp.
|
inline |
Calculate the colour for a numerical value.
val | const mu::value_type& |
Definition at line 136 of file cellvalueshader.hpp.
References CellValueShaderCondition::CT_EQUALS_VAL, CellValueShaderCondition::CT_GREATER_EQ_THAN, CellValueShaderCondition::CT_GREATER_THAN, CellValueShaderCondition::CT_INTERVAL_IM, CellValueShaderCondition::CT_INTERVAL_IM_EXCL, CellValueShaderCondition::CT_INTERVAL_RE, CellValueShaderCondition::CT_INTERVAL_RE_EXCL, CellValueShaderCondition::CT_LESS_EQ_THAN, CellValueShaderCondition::CT_LESS_THAN, CellValueShaderCondition::CT_NOT_EQUALS_VAL, interpolateColor(), m_colorArray, m_condition, CellValueShaderCondition::m_type, and CellValueShaderCondition::m_vals.
Referenced by AdvStringCellRenderer::createCustomColorAttr().
|
inline |
Calulate the colour for a string value.
strVal | const wxString& |
Definition at line 215 of file cellvalueshader.hpp.
References CellValueShaderCondition::CT_EQUALS_STR, CellValueShaderCondition::CT_FIND_STR, CellValueShaderCondition::CT_NOT_EQUALS_STR, CellValueShaderCondition::CT_NOT_FIND_STR, m_colorArray, m_condition, CellValueShaderCondition::m_strs, and CellValueShaderCondition::m_type.
|
inlineprivate |
Calculate the cell background colour depending on their value and using linear interpolation.
val | double |
excl | bool |
Definition at line 86 of file cellvalueshader.hpp.
References date::floor(), mu::isinf(), mu::isnan(), and m_colorArray.
Referenced by getColour().
|
inline |
Detect, whether this shader is actually active or an empty shader.
Definition at line 123 of file cellvalueshader.hpp.
References m_colorArray.
Referenced by AdvStringCellRenderer::hasCustomColor().
|
private |
Definition at line 73 of file cellvalueshader.hpp.
Referenced by getColour(), interpolateColor(), and isActive().
|
private |
Definition at line 74 of file cellvalueshader.hpp.
Referenced by getColour().