Engauge Digitizer 2
Loading...
Searching...
No Matches
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
12class QTextStream;
13class QXmlStreamReader;
14class QXmlStreamWriter;
15
18{
19public:
22
24 ColorFilterSettings (ColorFilterMode colorFilterMode,
25 int intensityLow,
26 int intensityHigh,
27 int foregroundLow,
29 int hueLow,
30 int hueHigh,
31 int saturationLow,
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
99
102
104 void setHigh (double s0To1);
105
107 void setHueHigh (int hueHigh);
108
110 void setHueLow (int hueLow);
111
114
116 void setIntensityLow (int intensityLow);
117
119 void setLow (double s0To1);
120
123
126
128 void setValueHigh (int valueHigh);
129
131 void setValueLow (int valueLow);
132
134 int valueHigh () const;
135
137 int valueLow () const;
138
139private:
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
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
int foregroundLow() const
Get method for foreground lower bound.
void setIntensityLow(int intensityLow)
Set method for intensity lower bound.
void setForegroundLow(int foregroundLow)
Set method for foreground lower bound.
int saturationLow() const
Get method for saturation lower bound.
ColorFilterSettings()
Default constructor only for use when this class is being stored by a container that requires the def...
void setValueLow(int valueLow)
Set method for value low.
void setValueHigh(int valueHigh)
Set method for value high.
void setSaturationLow(int saturationLow)
Set method for saturation low.
double low() const
Low value of foreground, hue, intensity, saturation or value according to current filter mode,...
void setHueLow(int hueLow)
Set method for hue lower bound.
int intensityHigh() const
Get method for intensity higher bound.
void setHigh(double s0To1)
Set the high value for the current filter mode.
ColorFilterSettings & operator=(const ColorFilterSettings &other)
Assignment operator.
int saturationHigh() const
Get method for saturation higher bound.
static ColorFilterSettings defaultFilter()
Initial default for any Curve.
void setColorFilterMode(ColorFilterMode colorFilterMode)
Set method for filter mode.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
ColorFilterMode colorFilterMode() const
Get method for filter mode.
void saveXml(QXmlStreamWriter &writer, const QString &curveName) const
Save curve filter to stream.
int valueLow() const
Get method for value low.
void setForegroundHigh(int foregroundHigh)
Set method for foreground higher bound.
void loadXml(QXmlStreamReader &reader)
Load curve filter to stream.
int hueHigh() const
Get method for hue higher bound.
double high() const
High value of foreground, hue, intensity, saturation or value according to current filter mode,...
int foregroundHigh() const
Get method for foreground higher bound.
void setLow(double s0To1)
Set the low value for the current filter mode.
void setIntensityHigh(int intensityHigh)
Set method for intensity higher bound.
int intensityLow() const
Get method for intensity lower bound.
void setSaturationHigh(int saturationHigh)
Set method for saturation high.
void setHueHigh(int hueHigh)
Set method for hue higher bound.
int hueLow() const
Get method for hue lower bound.
int valueHigh() const
Get method for value high.