-
Notifications
You must be signed in to change notification settings - Fork 0
/
IROOTHistogramBinning.h
83 lines (61 loc) · 1.84 KB
/
IROOTHistogramBinning.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef IROOTHISTOGRAMBINNING_H
#define IROOTHISTOGRAMBINNING_H
#include <QWidget>
#include <QMouseEvent>
#include <IROOTPad.h>
namespace Ui {
class IROOTHistogramBinning;
}
typedef struct {
double xmin;
double xmax;
double xbins;
double ymin;
double ymax;
double ybins;
double zmin;
double zmax;
double zbins;
bool useDefault;
} HistBin;
class IROOTHistogramBinning : public QWidget
{
Q_OBJECT
public:
explicit IROOTHistogramBinning(QWidget *parent = 0);
void UseDefault(bool d);
HistBin GetCurrentBinning(){return currentBinning;}
~IROOTHistogramBinning();
signals:
void binningChanged(HistBin);
private slots:
void on_close_clicked();
void on_useDefault_clicked(bool checked);
void on_xmin_valueChanged(double arg1);
void on_xmax_valueChanged(double arg1);
void on_ymin_valueChanged(double arg1);
void on_xbins_valueChanged(int arg1);
void on_ymax_valueChanged(double arg1);
void on_ybins_valueChanged(int arg1);
void on_zmin_valueChanged(double arg1);
void on_zmax_valueChanged(double arg1);
void on_zbins_valueChanged(int arg1);
void on_xBinWidth_valueChanged(double arg1);
void on_yBinWidth_valueChanged(double arg1);
void on_zBinWidth_valueChanged(double arg1);
void on_xBinArrow_clicked(bool checked);
void on_yBinArrow_clicked();
void on_zBinArrow_clicked();
private:
Ui::IROOTHistogramBinning *ui;
HistBin currentBinning; //
QPoint mousePressOrigin;
void mousePressEvent(QMouseEvent *e){ mousePressOrigin = e->globalPos();}
void mouseMoveEvent(QMouseEvent *e){
if(e->buttons() & Qt::LeftButton ){
move(pos()-(mousePressOrigin-e->globalPos()));
mousePressOrigin = e->globalPos();
}
}
};
#endif // IROOTHISTOGRAMBINNING_H