00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef HISTOVIEW_H
00013 #define HISTOVIEW_H
00014
00015 #include <QWidget>
00016
00017 class Histogram;
00018 class ColorTable;
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 class HistoView : public QWidget
00030 {
00031 Q_OBJECT
00032 public:
00033 HistoView(QWidget *parent = 0);
00034
00035
00036 void set(const Histogram *h);
00037
00038
00039 void set(const ColorTable *ct);
00040
00041
00042 QSize minimumSizeHint() const {
00043 return QSize(w+2*w1, h); }
00044 QSize sizeHint() const {
00045 return QSize(w+2*w1, h); }
00046
00047
00048 public slots:
00049 void setCenterZoom(float, float);
00050
00051 protected:
00052 void paintEvent(QPaintEvent *event);
00053
00054 int h;
00055 int w;
00056 int w1;
00057
00058 float c;
00059 float z;
00060
00061 const Histogram *histo;
00062 const ColorTable *ct;
00063 };
00064
00065 #endif