QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
QwtAlphaColorMap Class Reference

QwtAlphaColorMap varies the alpha value of a color. More...

#include <qwt_colormap.h>

Inheritance diagram for QwtAlphaColorMap:
QwtColorMap

Classes

class  PrivateData
 

Public Member Functions

 QwtAlphaColorMap (const QColor &=QColor(Qt::gray))
 Constructor.
 
void setAlphaInterval (int alpha1, int alpha2)
 Set the interval for the alpha coordinate.
 
int alpha1 () const
 Return first alpha coordinate.
 
int alpha2 () const
 Return second alpha coordinate.
 
void setColor (const QColor &)
 Set the color.
 
QColor color () const
 Return the color.
 
virtual QRgb rgb (double vMin, double vMax, double value) const override
 Map a value of a given interval into a alpha value.
 
- Public Member Functions inherited from QwtColorMap
 QwtColorMap (Format=QwtColorMap::RGB)
 Constructor.
 
virtual ~QwtColorMap ()
 Destructor.
 
void setFormat (Format)
 Set the format of the color map.
 
Format format () const
 
virtual uint colorIndex (int numColors, double vMin, double vMax, double value) const
 Map a value of a given interval into a color index.
 
QColor color (double vMin, double vMax, double value) const
 
virtual QVector< QRgb > colorTable (int numColors) const
 Build and return a color map of arbitrary number of colors.
 
virtual QVector< QRgb > colorTable256 () const
 Build and return a color map of 256 colors.
 

Additional Inherited Members

- Public Types inherited from QwtColorMap
enum  Format { RGB , Indexed }
 Format for color mapping. More...
 

Detailed Description

QwtAlphaColorMap varies the alpha value of a color.

Constructor & Destructor Documentation

◆ QwtAlphaColorMap()

QwtAlphaColorMap::QwtAlphaColorMap ( const QColor &  color = QColor(Qt::gray))
explicit

Constructor.

The alpha interval is initialized by 0 to 255.

Parameters
[in]colorColor of the map.
See also
setColor(), setAlphaInterval()

Member Function Documentation

◆ alpha1()

int QwtAlphaColorMap::alpha1 ( ) const

Return first alpha coordinate.

Returns
First alpha coordinate.
See also
setAlphaInterval()

◆ alpha2()

int QwtAlphaColorMap::alpha2 ( ) const

Return second alpha coordinate.

Returns
Second alpha coordinate.
See also
setAlphaInterval()

◆ color()

QColor QwtAlphaColorMap::color ( ) const

Return the color.

Returns
The color.
See also
setColor()

◆ rgb()

QRgb QwtAlphaColorMap::rgb ( double  vMin,
double  vMax,
double  value 
) const
overridevirtual

Map a value of a given interval into a alpha value.

Parameters
[in]vMinMinimum of the value interval.
[in]vMaxMaximum of the value interval.
[in]valueValue to map into a RGB value.
Returns
RGB value, with an alpha value.

Implements QwtColorMap.

◆ setAlphaInterval()

void QwtAlphaColorMap::setAlphaInterval ( int  alpha1,
int  alpha2 
)

Set the interval for the alpha coordinate.

alpha1/alpha2 need to be in the range 0 to 255, where 255 means opaque and 0 means transparent.

Parameters
[in]alpha1First alpha coordinate.
[in]alpha2Second alpha coordinate.
See also
alpha1(), alpha2()

◆ setColor()

void QwtAlphaColorMap::setColor ( const QColor &  color)

Set the color.

Parameters
[in]colorColor.
See also
color()

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