00001 #pragma once
00002
00003 #include "common.h"
00004 #include <QtGui/QWidget>
00005 #include <QtGui/QImage>
00006 #include <QtGui/QPainter>
00007
00008 class Histogram : public QWidget
00009 {
00010 Q_OBJECT
00011 public:
00012 Histogram(QWidget* parent = 0);
00013 virtual ~Histogram();
00014
00015 public slots:
00016 void Show(const int*);
00017 void Clear();
00018 void paintEvent(QPaintEvent* event);
00019
00020 private:
00021 int densityArray[ DENSITY_COUNT ];
00022 int maxDensityIndex;
00023
00024 QImage m_histogram;
00025 bool showHistogram;
00026
00027 int* m_density;
00028
00029 QWidget* m_parent;
00030
00031
00032
00033
00034
00035
00036 };