Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveProjectionManagerEditor.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
14#include "TEveGValuators.h"
15
16#include "TGComboBox.h"
17#include "TGLabel.h"
18
19/** \class TEveProjectionManagerEditor
20\ingroup TEve
21GUI editor for TEveProjectionManager class.
22*/
23
24
25////////////////////////////////////////////////////////////////////////////////
26/// Constructor.
27
30 UInt_t options, Pixel_t back) :
31 TGedFrame(p, width, height, options | kVerticalFrame, back),
32 fM(nullptr),
33
34 fType(nullptr),
35 fDistortion(nullptr),
36 fFixR(nullptr), fFixZ(nullptr),
37 fPastFixRFac(nullptr), fPastFixZFac(nullptr),
38 fCurrentDepth(nullptr),
39 fMaxTrackStep(nullptr),
40
41 fCenterX(nullptr),
42 fCenterY(nullptr),
43 fCenterZ(nullptr)
44{
45 MakeTitle("TEveProjection");
46 {
48 TGLabel* lab = new TGLabel(f, "Type");
49 f->AddFrame(lab, new TGLayoutHints(kLHintsLeft|kLHintsBottom, 1, 31, 1, 2));
50 fType = new TGComboBox(f);
59 lb->Resize(lb->GetWidth(), 2*18);
60 fType->Resize(80, 20);
61 fType->Connect("Selected(Int_t)", "TEveProjectionManagerEditor",
62 this, "DoType(Int_t)");
63 f->AddFrame(fType, new TGLayoutHints(kLHintsTop, 1, 1, 2, 4));
64 AddFrame(f);
65 }
66
67 Int_t nel = 6;
68 Int_t labelW = 60;
69 fDistortion = new TEveGValuator(this, "Distortion:", 90, 0);
74 fDistortion->Connect("ValueSet(Double_t)", "TEveProjectionManagerEditor",
75 this, "DoDistortion()");
77
78
79 fFixR = new TEveGValuator(this, "FixedR:", 90, 0);
82 fFixR->Build();
84 fFixR->SetToolTip("Radius after which scale is kept constant.");
85 fFixR->Connect("ValueSet(Double_t)", "TEveProjectionManagerEditor",
86 this, "DoFixR()");
87 AddFrame(fFixR, new TGLayoutHints(kLHintsTop, 1, 1, 1, 0));
88
89 fFixZ = new TEveGValuator(this, "FixedZ:", 90, 0);
92 fFixZ->Build();
94 fFixZ->SetToolTip("Z-coordinate after which scale is kept constant.");
95 fFixZ->Connect("ValueSet(Double_t)", "TEveProjectionManagerEditor",
96 this, "DoFixZ()");
97 AddFrame(fFixZ, new TGLayoutHints(kLHintsTop, 1, 1, 1, 0));
98
99 fPastFixRFac = new TEveGValuator(this, "ScaleR:", 90, 0);
104 fPastFixRFac->SetToolTip("Relative R-scale beyond FixedR.\nExpressed as 10^x.");
105 fPastFixRFac->Connect("ValueSet(Double_t)", "TEveProjectionManagerEditor",
106 this, "DoPastFixRFac()");
108
109 fPastFixZFac = new TEveGValuator(this, "ScaleZ:", 90, 0);
114 fPastFixZFac->SetToolTip("Relative Z-scale beyond FixedZ.\nExpressed as 10^x.");
115 fPastFixZFac->Connect("ValueSet(Double_t)", "TEveProjectionManagerEditor",
116 this, "DoPastFixZFac()");
118
119 fCurrentDepth = new TEveGValuator(this, "CurrentZ:", 90, 0);
124 fCurrentDepth->SetToolTip("Z coordinate of incoming projected object.");
125 fCurrentDepth->Connect("ValueSet(Double_t)", "TEveProjectionManagerEditor",
126 this, "DoCurrentDepth()");
128
129 fMaxTrackStep = new TEveGValuator(this, "TrackStep:", 90, 0);
134 fMaxTrackStep->SetToolTip("Maximum step between two consecutive track-points to avoid artefacts due to projective distortions.\nTaken into account automatically during projection procedure.");
135 fMaxTrackStep->Connect("ValueSet(Double_t)", "TEveProjectionManagerEditor",
136 this, "DoMaxTrackStep()");
138
139 // --------------------------------
140
141 MakeTitle("Distortion centre");
142 fCenterFrame = new TGVerticalFrame(this);
143
144 fCenterX = new TEveGValuator(fCenterFrame, "CenterX:", 90, 0);
147 fCenterX->Build();
149 fCenterX->SetToolTip("Origin of the projection.");
150 fCenterX->Connect("ValueSet(Double_t)", "TEveProjectionManagerEditor",
151 this, "DoCenter()");
153
154 fCenterY = new TEveGValuator(fCenterFrame, "CenterY:", 90, 0);
157 fCenterY->Build();
159 fCenterY->SetToolTip("Origin of the projection.");
160 fCenterY->Connect("ValueSet(Double_t)", "TEveProjectionManagerEditor",
161 this, "DoCenter()");
163
164 fCenterZ = new TEveGValuator(fCenterFrame, "CenterZ:", 90, 0);
167 fCenterZ->Build();
169 fCenterZ->SetToolTip("Origin of the projection.");
170 fCenterZ->Connect("ValueSet(Double_t)", "TEveProjectionManagerEditor",
171 this, "DoCenter()");
173
175}
176
177////////////////////////////////////////////////////////////////////////////////
178/// Set model object.
179
197
198////////////////////////////////////////////////////////////////////////////////
199/// Slot for setting of projection type.
200
202{
203 try
204 {
207 Update();
208 }
209 catch (...)
210 {
211 SetModel(fM);
212 throw;
213 }
214}
215
216////////////////////////////////////////////////////////////////////////////////
217/// Slot for setting distortion.
218
226
227////////////////////////////////////////////////////////////////////////////////
228/// Slot for setting fixed radius.
229
236
237////////////////////////////////////////////////////////////////////////////////
238/// Slot for setting fixed z-coordinate.
239
246
247////////////////////////////////////////////////////////////////////////////////
248/// Slot for setting fixed radius.
249
256
257////////////////////////////////////////////////////////////////////////////////
258/// Slot for setting fixed z-coordinate.
259
266
267////////////////////////////////////////////////////////////////////////////////
268/// Slot for setting current depth.
269
276
277////////////////////////////////////////////////////////////////////////////////
278/// Slot for setting fixed z-coordinate.
279
286
287////////////////////////////////////////////////////////////////////////////////
288/// Slot for setting center of distortion.
289
295
@ kVerticalFrame
Definition GuiTypes.h:381
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define f(i)
Definition RSha256.hxx:104
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsBottom
Definition TGLayout.h:29
@ kLHintsTop
Definition TGLayout.h:27
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
void SetLabelWidth(Int_t w)
void SetNELength(Int_t l)
Composite GUI element for single value selection (supports label, number-entry and slider).
void Build(Bool_t connect=kTRUE) override
Create sub-components (label, number entry, slider).
void SetToolTip(const char *tip)
Set the tooltip of the number-entry.
void SetLimits(Int_t min, Int_t max)
Set limits of the represented value for integer values.
Float_t GetValue() const
virtual void SetValue(Float_t v, Bool_t emit=kFALSE)
Set value, optionally emit signal.
void DoPastFixZFac()
Slot for setting fixed z-coordinate.
void SetModel(TObject *obj) override
Set model object.
void DoCurrentDepth()
Slot for setting current depth.
void DoType(Int_t type)
Slot for setting of projection type.
TEveProjectionManagerEditor(const TEveProjectionManagerEditor &)
void DoMaxTrackStep()
Slot for setting fixed z-coordinate.
void DoCenter()
Slot for setting center of distortion.
void DoDistortion()
Slot for setting distortion.
void DoFixZ()
Slot for setting fixed z-coordinate.
void DoFixR()
Slot for setting fixed radius.
void DoPastFixRFac()
Slot for setting fixed radius.
Manager class for steering of projections and managing projected objects.
void SetCenter(Float_t x, Float_t y, Float_t z)
Set projection center and rebuild projected scene.
virtual void UpdateName()
Updates name to have consistent information with projection.
void SetProjection(TEveProjection::EPType_e type)
Set projection type and distortion.
virtual void ProjectChildren()
Project all children recursively, update bounding-box and notify TEveManger about the scenes that hav...
TEveProjection * GetProjection()
void SetDistortion(Float_t d)
Set distortion.
void SetPastFixRFac(Float_t x)
Set 2's-exponent for relative scaling beyond FixR.
Float_t GetFixZ() const
Float_t GetFixR() const
void SetFixR(Float_t x)
Set fixed radius.
void SetPastFixZFac(Float_t x)
Set 2's-exponent for relative scaling beyond FixZ.
void SetMaxTrackStep(Float_t x)
Float_t GetPastFixRFac() const
EPType_e GetType() const
Float_t GetDistortion() const
Float_t GetPastFixZFac() const
void SetFixZ(Float_t x)
Set fixed radius.
Float_t GetMaxTrackStep() const
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition TGComboBox.h:47
virtual void AddEntry(TGString *s, Int_t id)
Definition TGComboBox.h:86
virtual TGListBox * GetListBox() const
Definition TGComboBox.h:110
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:597
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:387
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
A listbox is a box, possibly with scrollbar, containing entries.
Definition TGListBox.h:221
@ kNESRealOne
Fixed fraction real, one digit.
@ kNESRealThree
Fixed fraction real, three digit.
@ kNESRealTwo
Fixed fraction real, two digit.
A composite frame that layout their children in vertical way.
Definition TGFrame.h:376
ROOT GUI Window base class.
Definition TGWindow.h:23
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:71
Mother of all ROOT objects.
Definition TObject.h:41
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition TQObject.cxx:865