Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
ColorFilterSettings.h
1 #ifndef COLOR_FILTER_SETTINGS_H
2 #define COLOR_FILTER_SETTINGS_H
3 
4 #include "ColorFilterMode.h"
5 
6 class QTextStream;
7 class QXmlStreamReader;
8 class QXmlStreamWriter;
9 
12 {
13 public:
16 
18  ColorFilterSettings (ColorFilterMode colorFilterMode,
19  int intensityLow,
20  int intensityHigh,
21  int foregroundLow,
22  int foregroundHigh,
23  int hueLow,
24  int hueHigh,
25  int saturationLow,
26  int saturationHigh,
27  int valueLow,
28  int valueHigh);
29 
32 
34  ColorFilterSettings (QXmlStreamReader &reader);
35 
38 
40  ColorFilterMode colorFilterMode() const;
41 
44 
46  int foregroundHigh () const;
47 
49  int foregroundLow () const;
50 
53  double high () const;
54 
56  int hueHigh () const;
57 
59  int hueLow () const;
60 
62  int intensityHigh () const;
63 
65  int intensityLow () const;
66 
68  void loadXml(QXmlStreamReader &reader);
69 
72  double low () const;
73 
75  void printStream (QString indentation,
76  QTextStream &str) const;
77 
79  int saturationHigh () const;
80 
82  int saturationLow () const;
83 
85  void saveXml(QXmlStreamWriter &writer) const;
86 
88  void setColorFilterMode(ColorFilterMode colorFilterMode);
89 
91  void setForegroundHigh (int foregroundHigh);
92 
94  void setForegroundLow (int foregroundLow);
95 
97  void setHigh (double s0To1);
98 
100  void setHueHigh (int hueHigh);
101 
103  void setHueLow (int hueLow);
104 
106  void setIntensityHigh (int intensityHigh);
107 
109  void setIntensityLow (int intensityLow);
110 
112  void setLow (double s0To1);
113 
115  void setSaturationHigh (int saturationHigh);
116 
118  void setSaturationLow (int saturationLow);
119 
121  void setValueHigh (int valueHigh);
122 
124  void setValueLow (int valueLow);
125 
127  int valueHigh () const;
128 
130  int valueLow () const;
131 
132 private:
133 
134  ColorFilterMode m_colorFilterMode;
135  int m_intensityLow;
136  int m_intensityHigh;
137  int m_foregroundLow;
138  int m_foregroundHigh;
139  int m_hueLow;
140  int m_hueHigh;
141  int m_saturationLow;
142  int m_saturationHigh;
143  int m_valueLow;
144  int m_valueHigh;
145 };
146 
147 #endif // COLOR_FILTER_SETTINGS_H
void setSaturationLow(int saturationLow)
Set method for saturation low.
void setLow(double s0To1)
Set the low value for the current filter mode.
void setHueLow(int hueLow)
Set method for hue lower bound.
int saturationLow() const
Get method for saturation lower bound.
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
void setColorFilterMode(ColorFilterMode colorFilterMode)
Set method for filter mode.
int hueLow() const
Get method for hue lower bound.
int foregroundHigh() const
Get method for foreground higher bound.
int hueHigh() const
Get method for hue higher bound.
int saturationHigh() const
Get method for saturation higher bound.
ColorFilterSettings & operator=(const ColorFilterSettings &other)
Assignment operator.
void setForegroundLow(int foregroundLow)
Set method for foreground lower bound.
void setHigh(double s0To1)
Set the high value for the current filter mode.
int foregroundLow() const
Get method for foreground lower bound.
void setHueHigh(int hueHigh)
Set method for hue higher bound.
ColorFilterMode colorFilterMode() const
Get method for filter mode.
int valueLow() const
Get method for value low.
void setForegroundHigh(int foregroundHigh)
Set method for foreground higher bound.
static ColorFilterSettings defaultFilter()
Initial default for any Curve.
void setIntensityHigh(int intensityHigh)
Set method for intensity higher bound.
int intensityHigh() const
Get method for intensity higher bound.
void saveXml(QXmlStreamWriter &writer) const
Save curve filter to stream.
void setValueHigh(int valueHigh)
Set method for value high.
void setIntensityLow(int intensityLow)
Set method for intensity lower bound.
int valueHigh() const
Get method for value high.
double low() const
Low value of foreground, hue, intensity, saturation or value according to current filter mode...
void setValueLow(int valueLow)
Set method for value low.
void setSaturationHigh(int saturationHigh)
Set method for saturation high.
void loadXml(QXmlStreamReader &reader)
Load curve filter to stream.
double high() const
High value of foreground, hue, intensity, saturation or value according to current filter mode...
ColorFilterSettings()
Default constructor only for use when this class is being stored by a container that requires the def...
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
int intensityLow() const
Get method for intensity lower bound.