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