7 #include "ColorConstants.h" 8 #include "ColorFilterSettings.h" 9 #include "ColorFilterSettingsStrategyForeground.h" 10 #include <QTextStream> 16 ColorFilterSettingsStrategyForeground::~ColorFilterSettingsStrategyForeground ()
22 return (
double) (colorFilterSettings.
foregroundHigh () - FOREGROUND_MIN) /
23 (
double) (FOREGROUND_MAX - FOREGROUND_MIN);
28 return (
double) (colorFilterSettings.
foregroundLow () - FOREGROUND_MIN) /
29 (
double) (FOREGROUND_MAX - FOREGROUND_MIN);
34 QTextStream &str)
const 36 str << indentation <<
"foregroundLow=" << colorFilterSettings.
intensityLow () <<
"\n";
37 str << indentation <<
"foregroundHigh=" << colorFilterSettings.
intensityHigh () <<
"\n";
43 colorFilterSettings.
setForegroundHigh (FOREGROUND_MIN + s0To1 * (FOREGROUND_MAX - FOREGROUND_MIN));
49 colorFilterSettings.
setForegroundLow (FOREGROUND_MIN + s0To1 * (FOREGROUND_MAX - FOREGROUND_MIN));
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
virtual void setLow(ColorFilterSettings &colorFilterSettings, double s0To1)
Set the low value given the normalized value.
int foregroundLow() const
Get method for foreground lower bound.
void setForegroundLow(int foregroundLow)
Set method for foreground lower bound.
virtual double high(const ColorFilterSettings &colorFilterSettings) const
Return the high value normalized to 0 to 1.
void setForegroundHigh(int foregroundHigh)
Set method for foreground higher bound.
int foregroundHigh() const
Get method for foreground higher bound.
int intensityHigh() const
Get method for intensity higher bound.
int intensityLow() const
Get method for intensity lower bound.
ColorFilterSettingsStrategyForeground()
Single constructor.
virtual double low(const ColorFilterSettings &colorFilterSettings) const
Return the low value normalized to 0 to 1.
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.