Mercurial > hg > svgui
comparison layer/ColourMapper.h @ 1199:73d43e410a6b levelpanwidget
Add swatches to colour map combo (optionally, as it turns out they are quite visually distracting)
author | Chris Cannam |
---|---|
date | Fri, 16 Dec 2016 15:55:59 +0000 |
parents | 65b183494331 |
children | d79e21855aef |
comparison
equal
deleted
inserted
replaced
1198:69ff93e0c624 | 1199:73d43e410a6b |
---|---|
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 }; |