Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
DocumentModelColorFilter.h
1 #ifndef DOCUMENT_MODEL_COLOR_FILTER_H
2 #define DOCUMENT_MODEL_COLOR_FILTER_H
3 
4 #include "ColorFilterSettings.h"
5 #include "DocumentModelAbstractBase.h"
6 #include <QHash>
7 
8 // Lookup-table by curve name
9 typedef QHash<QString, ColorFilterSettings> ColorFilterSettingsList;
10 
11 class Document;
12 class QTextStream;
13 
16 {
17 public:
20 
22  DocumentModelColorFilter(const Document &document);
23 
26 
29 
31  ColorFilterMode colorFilterMode(const QString &curveName) const;
32 
34  const ColorFilterSettings colorFilterSettings (const QString &curveName) const;
35 
37  const ColorFilterSettingsList &colorFilterSettingsList () const;
38 
40  int foregroundHigh (const QString &curveName) const;
41 
43  int foregroundLow (const QString &curveName) const;
44 
47  double high (const QString &curveName) const;
48 
50  int hueHigh (const QString &curveName) const;
51 
53  int hueLow (const QString &curveName) const;
54 
56  int intensityHigh (const QString &curveName) const;
57 
59  int intensityLow (const QString &curveName) const;
60 
61  virtual void loadXml(QXmlStreamReader &reader);
62 
65  double low (const QString &curveName) const;
66 
68  void printStream (QString indentation,
69  QTextStream &str) const;
70 
72  int saturationHigh (const QString &curveName) const;
73 
75  int saturationLow (const QString &curveName) const;
76 
77  virtual void saveXml(QXmlStreamWriter &writer) const;
78 
80  void setColorFilterMode(const QString &curveName,
81  ColorFilterMode colorFilterMode);
82 
84  void setForegroundHigh (const QString &curveName,
85  int foregroundHigh);
86 
88  void setForegroundLow (const QString &curveName,
89  int foregroundLow);
90 
92  void setHigh (const QString &curveName,
93  double s0To1);
94 
96  void setHueHigh (const QString &curveName,
97  int hueHigh);
98 
100  void setHueLow (const QString &curveName,
101  int hueLow);
102 
104  void setIntensityHigh (const QString &curveName,
105  int intensityHigh);
106 
108  void setIntensityLow (const QString &curveName,
109  int intensityLow);
110 
112  void setLow (const QString &curveName,
113  double s0To1);
114 
116  void setSaturationHigh (const QString &curveName,
117  int saturationHigh);
118 
120  void setSaturationLow (const QString &curveName,
121  int saturationLow);
122 
124  void setValueHigh (const QString &curveName,
125  int valueHigh);
126 
128  void setValueLow (const QString &curveName,
129  int valueLow);
130 
132  int valueHigh (const QString &curveName) const;
133 
135  int valueLow (const QString &curveName) const;
136 
137 private:
138 
139  ColorFilterSettingsList m_colorFilterSettingsList;
140 };
141 
142 #endif // DOCUMENT_MODEL_COLOR_FILTER_H
DocumentModelColorFilter()
Default constructor.
int valueHigh(const QString &curveName) const
Get method for value high.
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
Abstract base class for document models. This class enforces a common interface for the leaf subclass...
void setColorFilterMode(const QString &curveName, ColorFilterMode colorFilterMode)
Set method for filter mode.
int saturationLow(const QString &curveName) const
Get method for saturation lower bound.
int valueLow(const QString &curveName) const
Get method for value low.
void setValueLow(const QString &curveName, int valueLow)
Set method for value low.
int foregroundLow(const QString &curveName) const
Get method for foreground lower bound.
DocumentModelColorFilter & operator=(const DocumentModelColorFilter &other)
Assignment constructor.
int intensityLow(const QString &curveName) const
Get method for intensity lower bound.
void setForegroundLow(const QString &curveName, int foregroundLow)
Set method for foreground lower bound.
void setHueLow(const QString &curveName, int hueLow)
Set method for hue lower bound.
double low(const QString &curveName) const
Low value of foreground, hue, intensity, saturation or value according to current filter mode normali...
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setIntensityLow(const QString &curveName, int intensityLow)
Set method for intensity lower bound.
void setHigh(const QString &curveName, double s0To1)
Set the high value for the current filter mode.
void setForegroundHigh(const QString &curveName, int foregroundHigh)
Set method for foreground higher bound.
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
int hueLow(const QString &curveName) const
Get method for hue lower bound.
double high(const QString &curveName) const
High value of foreground, hue, intensity, saturation or value according to current filter mode...
void setIntensityHigh(const QString &curveName, int intensityHigh)
Set method for intensity higher bound.
int hueHigh(const QString &curveName) const
Get method for hue higher bound.
int foregroundHigh(const QString &curveName) const
Get method for foreground higher bound.
ColorFilterMode colorFilterMode(const QString &curveName) const
Get method for filter mode.
Storage of one imported image and the data attached to that image.
Definition: Document.h:29
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setLow(const QString &curveName, double s0To1)
Set the low value for the current filter mode.
const ColorFilterSettings colorFilterSettings(const QString &curveName) const
Get method for copying one color filter. Cannot return just a reference or else there is a warning ab...
void setSaturationLow(const QString &curveName, int saturationLow)
Set method for saturation low.
void setSaturationHigh(const QString &curveName, int saturationHigh)
Set method for saturation high.
void setHueHigh(const QString &curveName, int hueHigh)
Set method for hue higher bound.
void setValueHigh(const QString &curveName, int valueHigh)
Set method for value high.
int intensityHigh(const QString &curveName) const
Get method for intensity higher bound.
const ColorFilterSettingsList & colorFilterSettingsList() const
Get method for copying all color filters in one step.
int saturationHigh(const QString &curveName) const
Get method for saturation higher bound.