Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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. More...
 
virtual void paintEvent (QPaintEvent *)
 Draw the gradient. More...
 
void setBackgroundColor (QRgb rgbBackground)
 Save the background color for foreground calculations. More...
 
void setColorFilterMode (ColorFilterMode colorFilterMode)
 Change the gradient type. More...
 

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 ( 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 {
16  setMinimumWidth(minimumWidth);
17 }

Member Function Documentation

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 }
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) &amp;&amp; !defined(QT_FORCE_ASSERTS) define ENGAUGE...
Definition: EngaugeAssert.h:20
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 }
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: