comparison layer/ColourMapper.h @ 946:36cddc3de023 alignment_view

Merge from default branch
author Chris Cannam
date Mon, 20 Apr 2015 09:19:52 +0100
parents a1226b3b7925
children 2a85ab180d08
comparison
equal deleted inserted replaced
897:499b637f2a26 946:36cddc3de023
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