Mercurial > hg > svgui
comparison layer/ColourMapper.h @ 902:a1226b3b7925 cxx11
Toward building with new sv types
author | Chris Cannam |
---|---|
date | Wed, 04 Mar 2015 19:11:32 +0000 |
parents | aca01b3af29f |
children | 2a85ab180d08 |
comparison
equal
deleted
inserted
replaced
901:0fe1f4407261 | 902:a1226b3b7925 |
---|---|
27 class ColourMapper : public QObject | 27 class ColourMapper : public QObject |
28 { | 28 { |
29 Q_OBJECT | 29 Q_OBJECT |
30 | 30 |
31 public: | 31 public: |
32 ColourMapper(int map, float minValue, float maxValue); | 32 ColourMapper(int map, double minValue, double maxValue); |
33 virtual ~ColourMapper(); | 33 virtual ~ColourMapper(); |
34 | 34 |
35 enum StandardMap { | 35 enum StandardMap { |
36 DefaultColours, | 36 DefaultColours, |
37 Sunset, | 37 Sunset, |
46 Printer, | 46 Printer, |
47 HighGain | 47 HighGain |
48 }; | 48 }; |
49 | 49 |
50 int getMap() const { return m_map; } | 50 int getMap() const { return m_map; } |
51 float getMinValue() const { return m_min; } | 51 double getMinValue() const { return m_min; } |
52 float getMaxValue() const { return m_max; } | 52 double getMaxValue() const { return m_max; } |
53 | 53 |
54 static int getColourMapCount(); | 54 static int getColourMapCount(); |
55 static QString getColourMapName(int n); | 55 static QString getColourMapName(int n); |
56 | 56 |
57 QColor map(float value) const; | 57 QColor map(double value) const; |
58 | 58 |
59 QColor getContrastingColour() const; // for cursors etc | 59 QColor getContrastingColour() const; // for cursors etc |
60 bool hasLightBackground() const; | 60 bool hasLightBackground() const; |
61 | 61 |
62 protected: | 62 protected: |
63 int m_map; | 63 int m_map; |
64 float m_min; | 64 double m_min; |
65 float m_max; | 65 double m_max; |
66 }; | 66 }; |
67 | 67 |
68 #endif | 68 #endif |
69 | 69 |