]>
Commit | Line | Data |
---|---|---|
1 | // $Id$ | |
2 | // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 | |
3 | ||
4 | /************************************************************************** | |
5 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
6 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
7 | * full copyright notice. * | |
8 | **************************************************************************/ | |
9 | ||
10 | #include "AliEveITSModuleStepperEditor.h" | |
11 | #include <EveDet/AliEveITSModuleStepper.h> | |
12 | #include <TEveGridStepperEditor.h> | |
13 | #include <TEveManager.h> | |
14 | ||
15 | #include <TVirtualPad.h> | |
16 | ||
17 | //============================================================================== | |
18 | //============================================================================== | |
19 | // AliEveITSModuleStepperEditor | |
20 | //============================================================================== | |
21 | ||
22 | //______________________________________________________________________________ | |
23 | // | |
24 | // Editor for AliEveITSModuleStepper. | |
25 | ||
26 | ClassImp(AliEveITSModuleStepperEditor) | |
27 | ||
28 | AliEveITSModuleStepperEditor::AliEveITSModuleStepperEditor(const TGWindow *p, Int_t width, Int_t height, | |
29 | UInt_t options, Pixel_t back) : | |
30 | TGedFrame(p, width, height, options | kVerticalFrame, back), | |
31 | ||
32 | fM(0), | |
33 | fStepper(0) | |
34 | { | |
35 | // Constructor. | |
36 | ||
37 | MakeTitle("AliEveITSModuleStepper"); | |
38 | ||
39 | fStepper = new TEveGridStepperSubEditor(this); | |
40 | fStepper->Connect("Changed()", "AliEveITSModuleStepperEditor", this, "UpdateStepper()"); | |
41 | AddFrame(fStepper, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 0, 0, 0)); | |
42 | } | |
43 | ||
44 | /******************************************************************************/ | |
45 | ||
46 | void AliEveITSModuleStepperEditor::SetModel(TObject* obj) | |
47 | { | |
48 | // Set model object. | |
49 | ||
50 | fM = static_cast<AliEveITSModuleStepper*>(obj); | |
51 | fStepper->SetModel(fM->GetStepper()); | |
52 | } | |
53 | ||
54 | /******************************************************************************/ | |
55 | ||
56 | void AliEveITSModuleStepperEditor::UpdateStepper() | |
57 | { | |
58 | // Update the model object. | |
59 | ||
60 | fM->Apply(); | |
61 | Update(); | |
62 | gEve->Redraw3D(kTRUE); | |
63 | } |