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 #ifndef HISTOGRAMWIDGET_H
00028 #define HISTOGRAMWIDGET_H
00029
00030 #include <SciFigs.h>
00031
00032 #include "ui_HistogramWidget.h"
00033
00034 class Histogram2D;
00035
00036 class HistogramWidget : public QWidget, private Ui::HistogramWidget
00037 {
00038 Q_OBJECT
00039 public:
00040 HistogramWidget(QWidget * parent=0);
00041 ~HistogramWidget();
00042
00043 void setHistogram(Histogram2D * hist);
00044 private slots:
00045 void on_xScroll_valueChanged();
00046 void setBand(double min, double max);
00047 void nextX() {shortcutEvents(NextX);}
00048 void nextXReject() {shortcutEvents(NextXReject);}
00049 void previousX() {shortcutEvents(PreviousX);}
00050 void previousXReject() {shortcutEvents(PreviousXReject);}
00051 void increaseLowLimit() {shortcutEvents(IncreaseLowLimit);}
00052 void increaseHighLimit() {shortcutEvents(IncreaseHighLimit);}
00053 void decreaseLowLimit() {shortcutEvents(DecreaseLowLimit);}
00054 void decreaseHighLimit() {shortcutEvents(DecreaseHighLimit);}
00055 void on_rejectBut_clicked();
00056 void on_undoBut_clicked();
00057 void on_rejectAllBut_clicked();
00058 void on_undoAllBut_clicked();
00059 void adjustCurve();
00060 void addMeanCurve();
00061 void addMedianCurve();
00062 void addModeCurve();
00063 protected:
00064 void closeEvent(QCloseEvent * e);
00065 private:
00066 enum Shortcuts {NextX, NextXReject,
00067 PreviousX, PreviousXReject,
00068 IncreaseLowLimit, IncreaseHighLimit,
00069 DecreaseLowLimit, DecreaseHighLimit};
00070 void shortcutEvents(Shortcuts s);
00071 void saveBand(int ix, double min, double max);
00072 Point2D restoreBand(int ix);
00073 void addCurve(const Curve<RealStatisticalPoint>& c);
00074
00075 QString _xUnit, _yUnit;
00076
00077 Histogram2D * _hist;
00078 IrregularGrid2DPlot * _histogramLayer;
00079
00080 ParallelBands * _densityBandLayer;
00081 LineLayer * _densityCurveLayer;
00082 ParallelBands * _cumulativeBandLayer;
00083 LineLayer * _cumulativeCurveLayer;
00084 int _lastX;
00085 };
00086
00087 #endif // HISTOGRAMWIDGET_H