Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "QwtBarCurve.h"
00030
00031 class Matrix;
00032
00034 class QwtHistogram: public QwtBarCurve
00035 {
00036 public:
00037 QwtHistogram(Table *t, const QString& name, int startRow = 0, int endRow = -1);
00038 QwtHistogram(Matrix *m);
00039
00040 void copy(QwtHistogram *h);
00041
00042 QwtDoubleRect boundingRect() const;
00043
00044 void setBinning(bool autoBin, double size, double begin, double end);
00046 void setBinning(double binSize, double begin, double end);
00047
00048 bool autoBinning(){return d_autoBin;};
00050 void setAutoBinning(bool autoBin = true);
00051
00052 double begin(){return d_begin;};
00053 double end(){return d_end;};
00054 double binSize(){return d_bin_size;};
00055
00056 void loadData();
00057
00058 double mean(){return d_mean;};
00059 double standardDeviation(){return d_standard_deviation;};
00060 double minimum(){return d_min;};
00061 double maximum(){return d_max;};
00062
00063 Matrix* matrix(){return d_matrix;};
00064
00065 private:
00066 void draw(QPainter *painter,const QwtScaleMap &xMap,
00067 const QwtScaleMap &yMap, int from, int to) const;
00068
00069 void loadDataFromMatrix();
00070 Matrix *d_matrix;
00071
00072 bool d_autoBin;
00073 double d_bin_size, d_begin, d_end;
00074
00076 double d_mean, d_standard_deviation, d_min, d_max;
00077 };