Engauge Digitizer 2
Loading...
Searching...
No Matches
ViewProfileScale.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef VIEW_PROFILE_SCALE_H
8#define VIEW_PROFILE_SCALE_H
9
10#include "ColorFilterMode.h"
11#include <QColor>
12#include <QLabel>
13#include <QRgb>
14
16class ViewProfileScale : public QLabel
17{
18public:
20 explicit ViewProfileScale(int minimumWidth,
21 QWidget *parent = 0);
22
24 virtual void paintEvent (QPaintEvent *);
25
28
30 void setColorFilterMode (ColorFilterMode colorFilterMode);
31
32private:
33
34 void paintForeground ();
35 void paintHue ();
36 void paintIntensity ();
37 void paintOneSpectrum (const QColor &colorStart,
38 const QColor &colorStop); // Generic processing for painting with only one spectrum
39 void paintSaturation ();
40 void paintValue ();
41
42 QRgb m_rgbBackground;
43 ColorFilterMode m_colorFilterMode;
44};
45
46#endif // VIEW_PROFILE_SCALE_H
ColorFilterMode
const int INNER_RADIUS_MIN
Linear horizontal scale, with the spectrum reflecting the active filter parameter.
ViewProfileScale(int minimumWidth, QWidget *parent=0)
Single constructor.
void setBackgroundColor(QRgb rgbBackground)
Save the background color for foreground calculations.
virtual void paintEvent(QPaintEvent *)
Draw the gradient.
void setColorFilterMode(ColorFilterMode colorFilterMode)
Change the gradient type.