casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Colorbar.qo.h
Go to the documentation of this file.
1 
2 #ifndef COLORBAR_H
3 #define COLORBAR_H
4 
5 #include <graphics/X11/X_enter.h>
6 #include <QVector>
7 #include <graphics/X11/X_exit.h>
8 
12 
13 namespace casa {
14 
15 class Colorbar : public QWidget
16 {
17  Q_OBJECT
18 
19 public:
20  Colorbar(QWidget *parent = 0);
21  ~Colorbar();
22 
23  QSize minimumSizeHint() const;
24  QSize sizeHint() const;
25 
26 public slots:
27  void setRange(float min, float max);
28  void setMinimum(float min);
29  void setMaximum(float min);
30  void setNumColors(int nc);
31  void setColormap(const QString& nm);
32  void changeColor(int, float, float, const QString&);
33 
34 signals:
35 
36 protected:
37  void mousePressEvent(QMouseEvent *event);
38  void mouseMoveEvent(QMouseEvent *event);
39  void mouseDoubleClickEvent(QMouseEvent *event);
40  void resizeEvent(QResizeEvent *);
41  void paintEvent(QPaintEvent *event);
42  void refreshBar();
43 
44  int numColors;
45  QString cmapname;
46 
50 
51  void setColorTable();
52  void calcLinearMaps();
53  void getLinearColor(float& r, float& g, float& b, float v);
54  void getTableColor(float& r, float& g, float& b, float v);
55 
56  float min;
57  float max;
58 
59 };
60 
61 }
62 #endif
void mousePressEvent(QMouseEvent *event)
void setNumColors(int nc)
Colorbar(QWidget *parent=0)
casacore::Vector< float > gMap
Definition: Colorbar.qo.h:48
void setColorTable()
void setColormap(const QString &nm)
void mouseDoubleClickEvent(QMouseEvent *event)
casacore::Vector< float > bMap
Definition: Colorbar.qo.h:49
void setMinimum(float min)
void getLinearColor(float &r, float &g, float &b, float v)
void getTableColor(float &r, float &g, float &b, float v)
void changeColor(int, float, float, const QString &)
QSize sizeHint() const
void resizeEvent(QResizeEvent *)
QSize minimumSizeHint() const
casacore::Vector< float > rMap
Definition: Colorbar.qo.h:47
void paintEvent(QPaintEvent *event)
void mouseMoveEvent(QMouseEvent *event)
QString cmapname
Definition: Colorbar.qo.h:45
void setMaximum(float min)
void calcLinearMaps()
void setRange(float min, float max)