00001
00002
00003
00004
00005
00006
00007 #ifndef VIEW_SEGMENT_FILTER_H
00008 #define VIEW_SEGMENT_FILTER_H
00009
00010 #include "ColorFilterSettings.h"
00011 #include <QColor>
00012 #include <QLabel>
00013
00014 class QPixmap;
00015
00018 class ViewSegmentFilter : public QLabel
00019 {
00020 public:
00022 ViewSegmentFilter(QWidget *parent = 0);
00023
00025 virtual void paintEvent(QPaintEvent *event);
00026
00028 void setColorFilterSettings (const ColorFilterSettings &colorFilterSettings,
00029 const QPixmap &pixmap);
00030
00032 void setEnabled (bool enabled);
00033
00035 void unsetColorFilterSettings ();
00036
00037 private:
00038
00039 QColor colorFromSetting (ColorFilterMode colorFilterMode,
00040 int foreground,
00041 int hue,
00042 int intensity,
00043 int saturation,
00044 int value) const;
00045 QColor colorHigh () const;
00046 QColor colorLow () const;
00047
00048 ColorFilterSettings m_colorFilterSettings;
00049 bool m_filterIsDefined;
00050 QColor m_rgbBackground;
00051
00052 bool m_enabled;
00053 };
00054
00055 #endif // VIEW_SEGMENT_FILTER_H