Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
ColorFilterSettings.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_H
8 #define COLOR_FILTER_SETTINGS_H
9 
10 #include "ColorFilterMode.h"
11 
12 class QTextStream;
13 class QXmlStreamReader;
14 class QXmlStreamWriter;
15 
18 {
19 public:
22 
24  ColorFilterSettings (ColorFilterMode colorFilterMode,
25  int intensityLow,
26  int intensityHigh,
27  int foregroundLow,
28  int foregroundHigh,
29  int hueLow,
30  int hueHigh,
31  int saturationLow,
32  int saturationHigh,
33  int valueLow,
34  int valueHigh);
35 
38 
40  ColorFilterSettings (QXmlStreamReader &reader);
41 
44 
46  ColorFilterMode colorFilterMode() const;
47 
50 
52  int foregroundHigh () const;
53 
55  int foregroundLow () const;
56 
59  double high () const;
60 
62  int hueHigh () const;
63 
65  int hueLow () const;
66 
68  int intensityHigh () const;
69 
71  int intensityLow () const;
72 
74  void loadXml(QXmlStreamReader &reader);
75 
78  double low () const;
79 
81  void printStream (QString indentation,
82  QTextStream &str) const;
83 
85  int saturationHigh () const;
86 
88  int saturationLow () const;
89 
91  void saveXml(QXmlStreamWriter &writer,
92  const QString &curveName) const;
93 
95  void setColorFilterMode(ColorFilterMode colorFilterMode);
96 
98  void setForegroundHigh (int foregroundHigh);
99 
101  void setForegroundLow (int foregroundLow);
102 
104  void setHigh (double s0To1);
105 
107  void setHueHigh (int hueHigh);
108 
110  void setHueLow (int hueLow);
111 
113  void setIntensityHigh (int intensityHigh);
114 
116  void setIntensityLow (int intensityLow);
117 
119  void setLow (double s0To1);
120 
122  void setSaturationHigh (int saturationHigh);
123 
125  void setSaturationLow (int saturationLow);
126 
128  void setValueHigh (int valueHigh);
129 
131  void setValueLow (int valueLow);
132 
134  int valueHigh () const;
135 
137  int valueLow () const;
138 
139 private:
140 
141  ColorFilterMode m_colorFilterMode;
142  int m_intensityLow;
143  int m_intensityHigh;
144  int m_foregroundLow;
145  int m_foregroundHigh;
146  int m_hueLow;
147  int m_hueHigh;
148  int m_saturationLow;
149  int m_saturationHigh;
150  int m_valueLow;
151  int m_valueHigh;
152 };
153 
154 #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.
void saveXml(QXmlStreamWriter &writer, const QString &curveName) const
Save curve filter to stream.
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 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.