00001
00002
00003
00004
00005
00006
00007 #ifndef COLOR_FILTER_SETTINGS_H
00008 #define COLOR_FILTER_SETTINGS_H
00009
00010 #include "ColorFilterSettingsStrategyAbstractBase.h"
00011 #include "ColorFilterMode.h"
00012 #include <QMap>
00013
00014 class QTextStream;
00015 class QXmlStreamReader;
00016 class QXmlStreamWriter;
00017
00019 class ColorFilterSettings
00020 {
00021 public:
00023 ColorFilterSettings ();
00024
00026 ColorFilterSettings (ColorFilterMode colorFilterMode,
00027 int intensityLow,
00028 int intensityHigh,
00029 int foregroundLow,
00030 int foregroundHigh,
00031 int hueLow,
00032 int hueHigh,
00033 int saturationLow,
00034 int saturationHigh,
00035 int valueLow,
00036 int valueHigh);
00037
00039 ColorFilterSettings (const ColorFilterSettings &other);
00040
00042 ColorFilterSettings (QXmlStreamReader &reader);
00043
00045 ColorFilterSettings &operator= (const ColorFilterSettings &other);
00046
00048 ColorFilterMode colorFilterMode() const;
00049
00051 static ColorFilterSettings defaultFilter ();
00052
00054 int foregroundHigh () const;
00055
00057 int foregroundLow () const;
00058
00061 double high () const;
00062
00064 int hueHigh () const;
00065
00067 int hueLow () const;
00068
00070 int intensityHigh () const;
00071
00073 int intensityLow () const;
00074
00076 void loadXml(QXmlStreamReader &reader);
00077
00080 double low () const;
00081
00083 void printStream (QString indentation,
00084 QTextStream &str) const;
00085
00087 int saturationHigh () const;
00088
00090 int saturationLow () const;
00091
00093 void saveXml(QXmlStreamWriter &writer,
00094 const QString &curveName) const;
00095
00097 void setColorFilterMode(ColorFilterMode colorFilterMode);
00098
00100 void setForegroundHigh (int foregroundHigh);
00101
00103 void setForegroundLow (int foregroundLow);
00104
00106 void setHigh (double s0To1);
00107
00109 void setHueHigh (int hueHigh);
00110
00112 void setHueLow (int hueLow);
00113
00115 void setIntensityHigh (int intensityHigh);
00116
00118 void setIntensityLow (int intensityLow);
00119
00121 void setLow (double s0To1);
00122
00124 void setSaturationHigh (int saturationHigh);
00125
00127 void setSaturationLow (int saturationLow);
00128
00130 void setValueHigh (int valueHigh);
00131
00133 void setValueLow (int valueLow);
00134
00136 int valueHigh () const;
00137
00139 int valueLow () const;
00140
00141 private:
00142
00143 void createStrategies ();
00144
00145 ColorFilterMode m_colorFilterMode;
00146 int m_intensityLow;
00147 int m_intensityHigh;
00148 int m_foregroundLow;
00149 int m_foregroundHigh;
00150 int m_hueLow;
00151 int m_hueHigh;
00152 int m_saturationLow;
00153 int m_saturationHigh;
00154 int m_valueLow;
00155 int m_valueHigh;
00156
00157
00158 QMap<ColorFilterMode, ColorFilterSettingsStrategyAbstractBase*> m_strategies;
00159 };
00160
00161 #endif // COLOR_FILTER_SETTINGS_H