Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
ViewSegmentFilter.h
1 #ifndef VIEW_SEGMENT_FILTER_H
2 #define VIEW_SEGMENT_FILTER_H
3 
4 #include "ColorFilterSettings.h"
5 #include <QColor>
6 #include <QLabel>
7 
8 class QPixmap;
9 
12 class ViewSegmentFilter : public QLabel
13 {
14 public:
16  ViewSegmentFilter(QWidget *parent = 0);
17 
19  virtual void paintEvent(QPaintEvent *event);
20 
22  void setColorFilterSettings (const ColorFilterSettings &colorFilterSettings,
23  const QPixmap &pixmap);
24 
26  void setEnabled (bool enabled);
27 
30 
31 private:
32 
33  QColor colorFromSetting (ColorFilterMode colorFilterMode,
34  int foreground,
35  int hue,
36  int intensity,
37  int saturation,
38  int value) const;
39  QColor colorHigh () const;
40  QColor colorLow () const;
41 
42  ColorFilterSettings m_colorFilterSettings;
43  bool m_filterIsDefined;
44  QColor m_rgbBackground;
45 
46  bool m_enabled;
47 };
48 
49 #endif // VIEW_SEGMENT_FILTER_H
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...
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
Class that displays the current Segment Filter in a MainWindow toolbar.
void setEnabled(bool enabled)
Show the style with semi-transparency or full-transparency to indicate if associated Curve is active ...
ViewSegmentFilter(QWidget *parent=0)
Single constructor.
virtual void paintEvent(QPaintEvent *event)
Paint with a horizontal linear gradient.
void unsetColorFilterSettings()
Apply no color filter.