3 #include "TPCSector2DEditor.h"
4 #include <Alieve/TPCSector2D.h>
6 #include <TVirtualPad.h>
11 #include <TGNumberEntry.h>
12 #include <TGColorSelect.h>
14 #include <TGDoubleSlider.h>
17 using namespace Alieve;
19 //______________________________________________________________________
23 ClassImp(TPCSector2DEditor)
25 TPCSector2DEditor::TPCSector2DEditor(const TGWindow *p,
26 Int_t width, Int_t height,
27 UInt_t options, Pixel_t back) :
28 TGedFrame(p, width, height, options | kVerticalFrame, back),
30 fShowMax(0), fAverage(0), fUseTexture(0)
32 MakeTitle("TPCSector2D");
34 fUseTexture = new TGCheckButton(this, "UseTexture");
35 AddFrame(fUseTexture, new TGLayoutHints(kLHintsTop, 3, 1, 1, 0));
37 ("Toggled(Bool_t)","Alieve::TPCSector2DEditor", this, "DoUseTexture()");
40 TGHorizontalFrame* f = new TGHorizontalFrame(this);
41 fShowMax = new TGCheckButton(f, "ShowMax");
42 f->AddFrame(fShowMax, new TGLayoutHints(kLHintsLeft, 3, 16, 1, 0));
43 fShowMax->Connect("Toggled(Bool_t)","Alieve::TPCSector2DEditor", this, "DoShowMax()");
44 fAverage = new TGCheckButton(f, "Average");
45 f->AddFrame(fAverage, new TGLayoutHints(kLHintsLeft, 3, 1, 1, 0));
46 fAverage->Connect("Toggled(Bool_t)","Alieve::TPCSector2DEditor", this, "DoAverage()");
47 AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
51 TPCSector2DEditor::~TPCSector2DEditor()
54 /**************************************************************************/
56 void TPCSector2DEditor::SetModel(TObject* obj)
58 fM = dynamic_cast<TPCSector2D*>(obj);
60 fShowMax->SetState(fM->fShowMax ? kButtonDown : kButtonUp);
63 fUseTexture->SetState(fM->fUseTexture ? kButtonDown : kButtonUp);
66 /**************************************************************************/
68 void TPCSector2DEditor::DoShowMax()
70 fM->SetShowMax(fShowMax->IsOn());
75 void TPCSector2DEditor::DoAverage()
77 fM->SetAverage(fAverage->IsOn());
81 void TPCSector2DEditor::SetupAverage()
84 fAverage->SetEnabled(kFALSE);
86 fAverage->SetEnabled(kTRUE);
87 fAverage->SetState(fM->fAverage ? kButtonDown : kButtonUp);
91 /**************************************************************************/
93 void TPCSector2DEditor::DoUseTexture()
95 fM->fUseTexture = fUseTexture->IsOn();