Mercurial > hg > svgui
diff layer/ColourMapper.h @ 1216:dc2af6616c83
Merge from branch 3.0-integration
author | Chris Cannam |
---|---|
date | Fri, 13 Jan 2017 10:29:50 +0000 |
parents | 73d43e410a6b |
children | d79e21855aef |
line wrap: on
line diff
--- a/layer/ColourMapper.h Fri Mar 04 12:23:31 2016 +0000 +++ b/layer/ColourMapper.h Fri Jan 13 10:29:50 2017 +0000 @@ -13,33 +13,34 @@ COPYING included with this distribution for more information. */ -#ifndef _COLOUR_MAPPER_H_ -#define _COLOUR_MAPPER_H_ +#ifndef SV_COLOUR_MAPPER_H +#define SV_COLOUR_MAPPER_H #include <QObject> #include <QColor> #include <QString> +#include <QPixmap> /** * A class for mapping intensity values onto various colour maps. */ - -class ColourMapper : public QObject +class ColourMapper { - Q_OBJECT - public: ColourMapper(int map, double minValue, double maxValue); - virtual ~ColourMapper(); + ~ColourMapper(); + + ColourMapper(const ColourMapper &) = default; + ColourMapper &operator=(const ColourMapper &) = default; enum StandardMap { - DefaultColours, + Green, Sunset, WhiteOnBlack, BlackOnWhite, - RedOnBlue, - YellowOnBlack, - BlueOnBlack, + Cherry, + Wasp, + Ice, FruitSalad, Banded, Highlight, @@ -59,6 +60,8 @@ QColor getContrastingColour() const; // for cursors etc bool hasLightBackground() const; + QPixmap getExamplePixmap(QSize size) const; + protected: int m_map; double m_min;