Qwt User's Guide: QwtAlphaColorMap Class Reference

- Main Page
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# QwtAlphaColorMap Class Reference

Inheritance diagram for QwtAlphaColorMap:

[legend]
Collaboration diagram for QwtAlphaColorMap:

[legend]
List of all members.

## Detailed Description

QwtAlphaColorMap variies the alpha value of a color.

Definition at line 160 of file qwt_color_map.h.

## Public Member Functions
| QwtAlphaColorMap (const QColor &=QColor(Qt::gray))
| QwtAlphaColorMap (const QwtAlphaColorMap &)
virtual | ~QwtAlphaColorMap ()
QwtAlphaColorMap & | operator= (const QwtAlphaColorMap &)
virtual QwtColorMap * | copy () const
void | setColor (const QColor &)
QColor | color () const
virtual QRgb | rgb (const QwtDoubleInterval &, double value) const

## Constructor & Destructor Documentation

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

Constructor

Parameters:

  | color | Color of the map

Definition at line 409 of file qwt_color_map.cpp.

Referenced by copy().

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

Copy constructor

Parameters:

  | other | Other color map

Definition at line 421 of file qwt_color_map.cpp.

QwtAlphaColorMap::~QwtAlphaColorMap | ( |  | ) | `[virtual]`

Destructor.

Definition at line 429 of file qwt_color_map.cpp.

## Member Function Documentation

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

Assignment operator

Parameters:

  | other | Other color map

Returns:
  *this

Definition at line 439 of file qwt_color_map.cpp.

References d_data.

QwtColorMap * QwtAlphaColorMap::copy | ( |  | ) | const`[virtual]`

Clone the color map.

Implements QwtColorMap.

Definition at line 448 of file qwt_color_map.cpp.

References QwtAlphaColorMap().

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

Set the color

Parameters:

  | color | Color

See also:
  color()

Definition at line 462 of file qwt_color_map.cpp.

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

Returns:
  the color

See also:
  setColor()

Definition at line 472 of file qwt_color_map.cpp.

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.

Definition at line 486 of file qwt_color_map.cpp.

References QwtDoubleInterval::minValue(), and QwtDoubleInterval::width().