Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ViewProfileScale Class Reference

Linear horizontal scale, with the spectrum reflecting the active filter parameter. More...

#include <ViewProfileScale.h>

Inheritance diagram for ViewProfileScale:
Inheritance graph
Collaboration diagram for ViewProfileScale:
Collaboration graph

Public Member Functions

 ViewProfileScale (int minimumWidth, QWidget *parent=0)
 Single constructor.
 
virtual void paintEvent (QPaintEvent *)
 Draw the gradient.
 
void setBackgroundColor (QRgb rgbBackground)
 Save the background color for foreground calculations.
 
void setColorFilterMode (ColorFilterMode colorFilterMode)
 Change the gradient type.
 

Detailed Description

Linear horizontal scale, with the spectrum reflecting the active filter parameter.

Definition at line 16 of file ViewProfileScale.h.

Constructor & Destructor Documentation

◆ ViewProfileScale()

ViewProfileScale::ViewProfileScale ( int minimumWidth,
QWidget * parent = 0 )
explicit

Single constructor.

Definition at line 11 of file ViewProfileScale.cpp.

12 :
13 QLabel (parent),
14 m_colorFilterMode (COLOR_FILTER_MODE_FOREGROUND)
15{
17}
@ COLOR_FILTER_MODE_FOREGROUND
const int INNER_RADIUS_MIN

Member Function Documentation

◆ paintEvent()

void ViewProfileScale::paintEvent ( QPaintEvent * event)
virtual

Draw the gradient.

Definition at line 19 of file ViewProfileScale.cpp.

20{
21 switch (m_colorFilterMode) {
23 paintForeground ();
24 break;
25
27 paintHue ();
28 break;
29
31 paintIntensity ();
32 break;
33
35 paintSaturation ();
36 break;
37
39 paintValue ();
40 break;
41
42 default:
43 ENGAUGE_ASSERT (false);
44 }
45
46 QLabel::paintEvent (event);
47}
@ COLOR_FILTER_MODE_VALUE
@ COLOR_FILTER_MODE_INTENSITY
@ COLOR_FILTER_MODE_SATURATION
@ COLOR_FILTER_MODE_HUE
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...

◆ setBackgroundColor()

void ViewProfileScale::setBackgroundColor ( QRgb rgbBackground)

Save the background color for foreground calculations.

Definition at line 123 of file ViewProfileScale.cpp.

124{
125 m_rgbBackground = rgbBackground;
126}

◆ setColorFilterMode()

void ViewProfileScale::setColorFilterMode ( ColorFilterMode colorFilterMode)

Change the gradient type.

Definition at line 128 of file ViewProfileScale.cpp.

129{
130 m_colorFilterMode = colorFilterMode;
131 update ();
132}

The documentation for this class was generated from the following files: