7 #include "ColorConstants.h" 8 #include "ColorFilterSettings.h" 9 #include "ColorFilterSettingsStrategyValue.h" 10 #include <QTextStream> 16 ColorFilterSettingsStrategyValue::~ColorFilterSettingsStrategyValue ()
22 return (
double) (colorFilterSettings.
valueHigh () - VALUE_MIN) /
23 (
double) (VALUE_MAX - VALUE_MIN);
28 return (
double) (colorFilterSettings.
valueLow () - VALUE_MIN) /
29 (
double) (VALUE_MAX - VALUE_MIN);
34 QTextStream &str)
const 36 str << indentation <<
"valueLow=" << colorFilterSettings.
valueLow () <<
"\n";
37 str << indentation <<
"valueHigh=" << colorFilterSettings.
valueHigh () <<
"\n";
43 colorFilterSettings.
setValueHigh (VALUE_MIN + s0To1 * (VALUE_MAX - VALUE_MIN));
49 colorFilterSettings.
setValueLow (VALUE_MIN + s0To1 * (VALUE_MAX - VALUE_MIN));
virtual void setLow(ColorFilterSettings &colorFilterSettings, double s0To1)
Set the low value given the normalized value.
int valueHigh() const
Get method for value high.
virtual double low(const ColorFilterSettings &colorFilterSettings) const
Return the low value normalized to 0 to 1.
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
ColorFilterSettingsStrategyValue()
Single constructor.
virtual void setHigh(ColorFilterSettings &colorFilterSettings, double s0To1)
Set the high value given the normalized value.
virtual void printStream(const ColorFilterSettings &colorFilterSettings, QString indentation, QTextStream &str) const
Print the low and high values.
void setValueHigh(int valueHigh)
Set method for value high.
int valueLow() const
Get method for value low.
void setValueLow(int valueLow)
Set method for value low.
virtual double high(const ColorFilterSettings &colorFilterSettings) const
Return the high value normalized to 0 to 1.