comparison layer/ColourMapper.h @ 1324:13d9b422f7fe zoom

Merge from default branch
author Chris Cannam
date Mon, 17 Sep 2018 13:51:31 +0100
parents 73d43e410a6b
children d79e21855aef
comparison
equal deleted inserted replaced
1183:57d192e26331 1324:13d9b422f7fe
11 published by the Free Software Foundation; either version 2 of the 11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file 12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #ifndef _COLOUR_MAPPER_H_ 16 #ifndef SV_COLOUR_MAPPER_H
17 #define _COLOUR_MAPPER_H_ 17 #define SV_COLOUR_MAPPER_H
18 18
19 #include <QObject> 19 #include <QObject>
20 #include <QColor> 20 #include <QColor>
21 #include <QString> 21 #include <QString>
22 #include <QPixmap>
22 23
23 /** 24 /**
24 * A class for mapping intensity values onto various colour maps. 25 * A class for mapping intensity values onto various colour maps.
25 */ 26 */
26 class ColourMapper 27 class ColourMapper
57 QColor map(double value) const; 58 QColor map(double value) const;
58 59
59 QColor getContrastingColour() const; // for cursors etc 60 QColor getContrastingColour() const; // for cursors etc
60 bool hasLightBackground() const; 61 bool hasLightBackground() const;
61 62
63 QPixmap getExamplePixmap(QSize size) const;
64
62 protected: 65 protected:
63 int m_map; 66 int m_map;
64 double m_min; 67 double m_min;
65 double m_max; 68 double m_max;
66 }; 69 };