Diana Software
QGHistogramParametersFrame.hh
Go to the documentation of this file.
1 #ifndef _QG_HISTOGRAM_PARAMETERS_FRAME_HH_
2 #define _QG_HISTOGRAM_PARAMETERS_FRAME_HH_
3 
11 #include <string>
12 #include <TGFrame.h>
13 
14 class QGDropDownBox;
16 class QGTextEntry;
17 class TGCheckButton;
18 class TGLabel;
19 
20 class QGHistogramParametersFrame : public TGCompositeFrame {
21 public:
23  QGHistogramParametersFrame(QGHistogramEditWindow *p = 0, UInt_t w = 100, UInt_t h = 100);
24 
27 
29  void AutoSetBinWidth();
30 
32  void AutoSetNumberOfBins();
33 
35  Double_t GetBinWidth();
36 
38  Int_t GetNumberOfBins();
39 
42 
44  Double_t GetXMax();
45 
47  Double_t GetXMin();
48 
50  std::string GetXUnits();
51 
53  std::string GetXVariable();
54 
56  void HandleBinWidthEvent(Event_t *event);
57 
59  void HandleNumberOfBinsEvent(Event_t *event);
60 
62  void HandleXMaxEvent(Event_t *event);
63 
65  void HandleXMinEvent(Event_t *event);
66 
68  //void HandleXUnitsEvent(Event_t *event);
69 
71  //void HandleXVariableEvent(Event_t *event);
72 
74  bool IsBinWidthSet();
75 
77  bool IsNumberOfBinsSet();
78 
80  bool IsSuperimposeSet();
81 
83  bool IsXMaxSet();
84 
86  bool IsXMinSet();
87 
89  void SetBinWidth(Double_t width);
90 
92  void SetNumberOfBins(Int_t n);
93 
95  void SetSuperimpose(bool flag = true);
96 
98  void SetXMax(Double_t max);
99 
101  void SetXMin(Double_t min);
102 
104  void SetXUnits(const std::string& units);
105 
107  void SetXVariable(const std::string& x);
108 
109 private:
111  TGHorizontalFrame *fBinsFrame;
112 
115 
117  TGLabel *fBinWidthLabel;
118 
121 
123  TGHorizontalFrame *fMinMaxFrame;
124 
127 
130 
132  TGCheckButton *fSuperimposeBox;
133 
135  TGLabel *fUnitsLabel;
136 
139 
141  TGHorizontalFrame *fXFrame;
142 
144  TGLabel *fXLabel;
145 
148 
149  /* @brief X-axis maximum label */
150  TGLabel *fXMaxLabel;
151 
154 
155  /* @brief X-axis minimum label */
156  TGLabel *fXMinLabel;
157 
160 
161  ClassDef(QGHistogramParametersFrame, 0)
162 };
163 
164 #endif
double max
Definition: CheckOF.C:53
double min(const Diana::QVector &v)
Definition: QVector.cc:878
Drop down box with tab-complete.
Class for histogram edit window.
Part of a histogram edit window for inputting parameters.
TGHorizontalFrame * fXFrame
Horizontal frame for x-axis variable.
QGTextEntry * fNumberOfBinsBox
Number of bins box.
TGHorizontalFrame * fMinMaxFrame
Horizontal frame for x-axis minimum and maximum.
Double_t GetXMax()
Get x-axis maximum.
void SetNumberOfBins(Int_t n)
Set the number of bins.
QGTextEntry * fXMaxBox
X-axis maximum box.
void HandleXMinEvent(Event_t *event)
Handle event in x-axis minimum box.
void SetXMin(Double_t min)
Set the x-axis minimum.
TGHorizontalFrame * fBinsFrame
Horizontal frame for bins parameters.
void AutoSetBinWidth()
Set bin width automatically.
void HandleNumberOfBinsEvent(Event_t *event)
Handle event in number of bins box.
void SetXVariable(const std::string &x)
Set the x-axis variable.
std::string GetXUnits()
Get x-axis units.
QGHistogramParametersFrame(QGHistogramEditWindow *p=0, UInt_t w=100, UInt_t h=100)
Constructor.
QGDropDownBox * fXDropDownBox
X-axis variable drop down box.
void SetSuperimpose(bool flag=true)
Set whether the superimpose box is checked.
void HandleXMaxEvent(Event_t *event)
Handle event in x-axis maximum box.
void SetBinWidth(Double_t width)
Set the bin width.
bool IsXMaxSet()
Return true if x-axis maximum is set.
Int_t GetNumberOfBins()
Get number of bins.
void SetXUnits(const std::string &units)
Set the x-axis units.
TGCheckButton * fSuperimposeBox
Superimpose check box.
Double_t GetXMin()
Get x-axis minimum.
bool IsBinWidthSet()
Handle event in x-axis units box.
QGDropDownBox * GetXDropDownBox()
Get pointer to x-axis variable drop down box.
QGTextEntry * fBinWidthBox
Bin width box.
void HandleBinWidthEvent(Event_t *event)
Handle event in bin width box.
virtual ~QGHistogramParametersFrame()
Destructor.
bool IsNumberOfBinsSet()
Return true if number of bins is set.
void SetXMax(Double_t max)
Set the x-axis maximum.
QGTextEntry * fXMinBox
X-axis minimum box.
QGTextEntry * fXUnitsBox
X-axis units box.
QGHistogramEditWindow * fHistogramEditWindow
Pointer to parent histogram edit window.
bool IsSuperimposeSet()
Return true if superimpose box is checked.
bool IsXMinSet()
Return true if x-axis minimum is set.
std::string GetXVariable()
Get x-axis variable.
Double_t GetBinWidth()
Get bin width.
void AutoSetNumberOfBins()
Set number of bins automatically.
TGLabel * fBinWidthLabel
Bin width label.
TGLabel * fNumberOfBinsLabel
Number of bins label.
Extension of ROOT's basic text box TGTextEntry.
Definition: QGTextEntry.hh:13