Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
View
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
16
class
ViewProfileScale
:
public
QLabel
17
{
18
public
:
20
explicit
ViewProfileScale
(
int
minimumWidth,
21
QWidget *parent = 0);
22
24
virtual
void
paintEvent
(QPaintEvent *);
25
27
void
setBackgroundColor
(QRgb rgbBackground);
28
30
void
setColorFilterMode
(
ColorFilterMode
colorFilterMode);
31
32
private
:
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.h
ColorFilterMode
ColorFilterMode
Definition
ColorFilterMode.h:12
ViewProfileScale::ViewProfileScale
ViewProfileScale(int minimumWidth, QWidget *parent=0)
Single constructor.
Definition
ViewProfileScale.cpp:12
ViewProfileScale::setBackgroundColor
void setBackgroundColor(QRgb rgbBackground)
Save the background color for foreground calculations.
Definition
ViewProfileScale.cpp:125
ViewProfileScale::paintEvent
virtual void paintEvent(QPaintEvent *)
Draw the gradient.
Definition
ViewProfileScale.cpp:20
ViewProfileScale::setColorFilterMode
void setColorFilterMode(ColorFilterMode colorFilterMode)
Change the gradient type.
Definition
ViewProfileScale.cpp:130
Generated on
for Engauge Digitizer by
1.17.0