UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zqb_scaled_palette.hpp
1 /* zqb_scaled_palette.hpp */
2 /* $Id: zqb_scaled_palette.hpp,v 1.5 2006/02/13 12:23:58 vlad Exp $ */
3 #ifndef __zqb_scaled_palette_hpp
4 #define __zqb_scaled_palette_hpp
5 
6 #include "zqb_palette.hpp"
7 
8 
16 {
17 public:
18 
21  ZqbScaledPalette (const QColor& c = Qt::black);
22 
26  ZqbScaledPalette (int n, const QColor& c1, const QColor& c2);
27 
32  ZqbScaledPalette (int n, const QColor& c1,
33  const QColor& c2, const QColor& c3);
34 
36  ZqbScaledPalette (const ZqbScaledPalette& zscpal);
37 
39  ZqbScaledPalette (const ZqbPalette& zpal);
40 
41 
44 
47 
48 
49  /*
50  * Access to colors by floating number coordinate
51  */
52 
54  virtual int colorIndex (double coord) const;
55 
57  virtual void coordRange (int index, double coord[2]) const;
58 
60  virtual const QColor& color (double coord) const;
61 
63  const QColor& operator() (double coord) const {
64  return color(coord);
65  }
66 
67 
68  /*
69  * Coordinate to color transformation definition
70  */
71 
74  virtual void setRange (double lowi, double highi);
75 
78  virtual void setRange (double lh[2]) {
79  setRange(lh[0], lh[1]);
80  }
81 
84  virtual void getRange (double lh[2]) const;
85 
86 protected:
87 
89  double m_fRange[2];
90 
91 };
92 
93 
94 #endif /* zqb_scaled_palette.hpp */
virtual int colorIndex(double coord) const
Definition: zqb_scaled_palette.hpp:15
virtual void setRange(double lh[2])
Definition: zqb_scaled_palette.hpp:78
virtual void coordRange(int index, double coord[2]) const
double m_fRange[2]
Definition: zqb_scaled_palette.hpp:89
virtual void setRange(double lowi, double highi)
ZqbScaledPalette(const QColor &c=Qt::black)
virtual void getRange(double lh[2]) const
ZqbScaledPalette & operator=(const ZqbScaledPalette &zscpal)
const QColor & operator()(double coord) const
Definition: zqb_scaled_palette.hpp:63
Definition: zqb_palette.hpp:17
virtual const QColor & color(double coord) const