7 #include "ColorConstants.h"
8 #include "ColorFilterSettings.h"
9 #include "ColorFilterSettingsStrategyIntensity.h"
11 #include <QTextStream>
17 ColorFilterSettingsStrategyIntensity::~ColorFilterSettingsStrategyIntensity ()
23 return double (colorFilterSettings.
intensityHigh () - INTENSITY_MIN) /
24 double (INTENSITY_MAX - INTENSITY_MIN);
29 return double (colorFilterSettings.
intensityLow () - INTENSITY_MIN) /
30 double (INTENSITY_MAX - INTENSITY_MIN);
35 QTextStream &str)
const
37 str << indentation <<
"intensityLow=" << colorFilterSettings.
intensityLow () <<
"\n";
38 str << indentation <<
"intensityHigh=" << colorFilterSettings.
intensityHigh () <<
"\n";
44 colorFilterSettings.
setIntensityHigh (qFloor (INTENSITY_MIN + s0To1 * (INTENSITY_MAX - INTENSITY_MIN)));
50 colorFilterSettings.
setIntensityLow (qFloor (INTENSITY_MIN + s0To1 * (INTENSITY_MAX - INTENSITY_MIN)));
virtual void printStream(const ColorFilterSettings &colorFilterSettings, QString indentation, QTextStream &str) const
Print the low and high values.
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
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.
ColorFilterSettingsStrategyIntensity()
Single constructor.
void setIntensityHigh(int intensityHigh)
Set method for intensity higher bound.
virtual double high(const ColorFilterSettings &colorFilterSettings) const
Return the high value normalized to 0 to 1.
int intensityHigh() const
Get method for intensity higher bound.
void setIntensityLow(int intensityLow)
Set method for intensity lower bound.
int intensityLow() const
Get method for intensity lower bound.