21 m_filterIsDefined (
false),
35 int r = 0,
g = 0, b = 0;
37 switch (colorFilterMode)
42 if (
qGray (m_rgbBackground.rgb ()) < 127) {
116 LOG4CPP_ERROR_S ((*
mainCat)) <<
"ViewSegmentFilter::colorFromSetting unexpected color filter mode " << colorFilterMode;
132QColor ViewSegmentFilter::colorHigh ()
const
137 m_colorFilterSettings.
hueHigh (),
146QColor ViewSegmentFilter::colorLow ()
const
151 m_colorFilterSettings.
hueLow (),
164 if (m_filterIsDefined) {
170 gradient.setColorAt (0.0, colorLow ());
171 gradient.setColorAt (1.0, colorHigh ());
191 m_colorFilterSettings = colorFilterSettings;
192 m_filterIsDefined =
true;
206 <<
" enabled=" << (
enabled ?
"true" :
"false");
216 m_filterIsDefined =
false;
const int INTENSITY_MIN
Constants for use by CurveFilter and other curve-related classes.
@ COLOR_FILTER_MODE_FOREGROUND
@ COLOR_FILTER_MODE_VALUE
@ COLOR_FILTER_MODE_INTENSITY
@ COLOR_FILTER_MODE_SATURATION
const int INNER_RADIUS_MIN
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT.
log4cpp::Category * mainCat
const QColor COLOR_FOR_BRUSH_DISABLED(Qt::gray)
const QColor COLOR_FOR_BRUSH_DISABLED(Qt::gray)
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.
int saturationLow() const
Get method for saturation lower bound.
int intensityHigh() const
Get method for intensity higher bound.
int saturationHigh() const
Get method for saturation higher bound.
ColorFilterMode colorFilterMode() const
Get method for filter mode.
int valueLow() const
Get method for value low.
int hueHigh() const
Get method for hue higher bound.
int foregroundHigh() const
Get method for foreground higher bound.
int intensityLow() const
Get method for intensity lower bound.
int hueLow() const
Get method for hue lower bound.
int valueHigh() const
Get method for value high.
Class for filtering image to remove unimportant information.
QRgb marginColor(const QImage *image) const
Identify the margin color of the image, which is defined as the most common color in the four margins...
void unsetColorFilterSettings()
Apply no color filter.
void setColorFilterSettings(const ColorFilterSettings &colorFilterSettings, const QPixmap &pixmap)
Apply the color filter of the currently selected curve. The pixmap is included so the background colo...
void setEnabled(bool enabled)
Show the style with semi-transparency or full-transparency to indicate if associated Curve is active ...
virtual void paintEvent(QPaintEvent *event)
Paint with a horizontal linear gradient.
ViewSegmentFilter(QWidget *parent=0)
Single constructor.
#define LOG4CPP_INFO_S(logger)
#define LOG4CPP_ERROR_S(logger)