Engauge Digitizer  2
ViewProfileScale.h
1 #ifndef VIEW_PROFILE_SCALE_H
2 #define VIEW_PROFILE_SCALE_H
3 
4 #include "ColorFilterMode.h"
5 #include <QColor>
6 #include <QLabel>
7 #include <QRgb>
8 
10 class ViewProfileScale : public QLabel
11 {
12 public:
14  explicit ViewProfileScale(int minimumWidth,
15  QWidget *parent = 0);
16 
18  virtual void paintEvent (QPaintEvent *);
19 
21  void setBackgroundColor (QRgb rgbBackground);
22 
24  void setColorFilterMode (ColorFilterMode colorFilterMode);
25 
26 private:
27 
28  void paintForeground ();
29  void paintHue ();
30  void paintIntensity ();
31  void paintOneSpectrum (const QColor &colorStart,
32  const QColor &colorStop); // Generic processing for painting with only one spectrum
33  void paintSaturation ();
34  void paintValue ();
35 
36  QRgb m_rgbBackground;
37  ColorFilterMode m_colorFilterMode;
38 };
39 
40 #endif // VIEW_PROFILE_SCALE_H
void setBackgroundColor(QRgb rgbBackground)
Save the background color for foreground calculations.
ViewProfileScale(int minimumWidth, QWidget *parent=0)
Single constructor.
Linear horizontal scale, with the spectrum reflecting the active filter parameter.
void setColorFilterMode(ColorFilterMode colorFilterMode)
Change the gradient type.
virtual void paintEvent(QPaintEvent *)
Draw the gradient.