Engauge Digitizer  2
ColorFilterSettingsStrategyAbstractBase.h
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef COLOR_FILTER_SETTINGS_STRATEGY_ABSTRACT_BASE_H
8 #define COLOR_FILTER_SETTINGS_STRATEGY_ABSTRACT_BASE_H
9 
10 #include <QString>
11 
13 class QTextStream;
14 
18 {
19  public:
22 
24 
26  virtual double high (const ColorFilterSettings &colorFilterSettings) const = 0;
27 
29  virtual double low (const ColorFilterSettings &colorFilterSettings) const = 0;
30 
32  virtual void printStream (const ColorFilterSettings &colorFilterSettings,
33  QString indentation,
34  QTextStream &str) const = 0;
35 
37  virtual void setHigh (ColorFilterSettings &colorFilterSettings,
38  double s0To1) = 0;
39 
41  virtual void setLow (ColorFilterSettings &colorFilterSettings,
42  double s0To1) = 0;
43 };
44 
45 #endif // COLOR_FILTER_SETTINGS_STRATEGY_ABSTRACT_BASE_H
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
Base class for strategy pattern whose subclasses process the different color filter settings modes (o...
virtual void printStream(const ColorFilterSettings &colorFilterSettings, QString indentation, QTextStream &str) const =0
Print the low and high values.
virtual void setHigh(ColorFilterSettings &colorFilterSettings, double s0To1)=0
Set the high value given the normalized value.
virtual void setLow(ColorFilterSettings &colorFilterSettings, double s0To1)=0
Set the low value given the normalized value.
virtual double high(const ColorFilterSettings &colorFilterSettings) const =0
Return the high value normalized to 0 to 1.
virtual double low(const ColorFilterSettings &colorFilterSettings) const =0
Return the low value normalized to 0 to 1.