Qwt User's Guide 5.2.3

- Main Page
- Related Pages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
QwtAlphaColorMap Class Reference

`#include <qwt_color_map.h>`

Inheritance diagram for QwtAlphaColorMap:
[legend]

List of all members.

## Public Member Functions

| QwtAlphaColorMap (const QColor &=QColor(Qt::gray))
| QwtAlphaColorMap (const QwtAlphaColorMap &)
virtual | ~QwtAlphaColorMap ()
QColor | color () const
virtual QwtColorMap * | copy () const
QwtAlphaColorMap & | operator= (const QwtAlphaColorMap &)
virtual QRgb | rgb (const QwtDoubleInterval &, double value) const
void | setColor (const QColor &)
Public Member Functions inherited from QwtColorMap
| QwtColorMap (Format=QwtColorMap::RGB)
virtual | ~QwtColorMap ()
QColor | color (const QwtDoubleInterval &, double value) const
virtual QVector< QRgb > | colorTable (const QwtDoubleInterval &) const
Format | format () const

## Additional Inherited Members

Public Types inherited from QwtColorMap
enum | Format { RGB, Indexed }

## Detailed Description

QwtAlphaColorMap variies the alpha value of a color.

## Constructor & Destructor Documentation

QwtAlphaColorMap::QwtAlphaColorMap | ( | const QColor & | color = `QColor(Qt::gray)` | ) |

Constructor

Parameters:

  color | Color of the map

QwtAlphaColorMap::QwtAlphaColorMap | ( | const QwtAlphaColorMap & | other | ) |

Copy constructor

Parameters:

  other | Other color map

## Member Function Documentation

QColor QwtAlphaColorMap::color | ( |  | ) | const

Returns:
  the color

See also:
  setColor()

QwtAlphaColorMap & QwtAlphaColorMap::operator= | ( | const QwtAlphaColorMap & | other | ) |

Assignment operator

Parameters:

  other | Other color map

Returns:
  *this

QRgb QwtAlphaColorMap::rgb | ( | const QwtDoubleInterval & | interval,
|  | double | value
| ) |  | const

virtual

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

alpha := (value - interval.minValue()) / interval.width();

Parameters:

  interval | Range for all values
  value | Value to map into a rgb value

Returns:
  rgb value, with an alpha value

Implements QwtColorMap.

void QwtAlphaColorMap::setColor | ( | const QColor & | color | ) |

Set the color

Parameters:

  color | Color

See also:
  color()