Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoMatrixEditor.h
Go to the documentation of this file.
1// @(#):$Id$
2// Author: M.Gheata
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, 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
12#ifndef ROOT_TGeoTranslationEditor
13#define ROOT_TGeoTranslationEditor
14
15#include "TGWidget.h"
16#include "TGeoGedFrame.h"
17
18class TGeoTranslation;
19class TGeoRotation;
20class TGeoCombiTrans;
21class TGTextEntry;
22class TGNumberEntry;
23class TGTab;
24class TGComboBox;
25class TGTextButton;
26class TGRadioButton;
27class TString;
28
30
31protected:
32 Double_t fDxi; // Initial dx
33 Double_t fDyi; // Initial dy
34 Double_t fDzi; // Initial dz
35 TString fNamei; // Initial name
36 TGeoTranslation *fTranslation; // Translation object
37 Bool_t fIsModified; // Flag that this was modified
38 Bool_t fIsEditable; // Flag that this can be changed
39 TGTextEntry *fTransName; // Translation name text entry
40 TGNumberEntry *fTransDx; // Number entry for box DX
41 TGNumberEntry *fTransDy; // Number entry for box DY
42 TGNumberEntry *fTransDz; // Number entry for box DZ
43 TGTextButton *fApply; // Apply-Button to accept changes
44 TGTextButton *fCancel; // Cancel-Button
45 TGTextButton *fUndo; // Undo-Button
46
47 virtual void ConnectSignals2Slots(); // Connect the signals to the slots
48
49public:
50 TGeoTranslationEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30,
52 ~TGeoTranslationEditor() override;
53 void SetModel(TObject *obj) override;
54
55 void DoDx();
56 void DoDy();
57 void DoDz();
58 void DoModified();
59 void DoName();
61 void DoApply();
62 void DoCancel();
63 void DoUndo();
64
65 ClassDefOverride(TGeoTranslationEditor, 0) // TGeoTranslation editor
66};
67
69
70protected:
71 Double_t fPhii; // Initial phi (Euler rotation angle about Z)
72 Double_t fThetai; // Initial theta (Euler rotation angle about new X)
73 Double_t fPsii; // Initial dz (Euler rotation angle about new Z)
74 Double_t fAngleX; // New rotation angle about X
75 Double_t fAngleY; // New rotation angle about Y
76 Double_t fAngleZ; // New rotation angle about Z
77 TString fNamei; // Initial name
78 TGeoRotation *fRotation; // Rotation object
79 Bool_t fIsModified; // Flag that this was modified
80 Bool_t fIsEditable; // Flag that this can be changed
81 TGTextEntry *fRotName; // Translation name text entry
82 TGNumberEntry *fRotPhi; // Number entry for phi angle
83 TGNumberEntry *fRotTheta; // Number entry for theta angle
84 TGNumberEntry *fRotPsi; // Number entry for psi angle
85 TGNumberEntry *fRotAxis; // Number entry for rotation angle about one axis
86 TGRadioButton *fRotX; // Rotation about X selected
87 TGRadioButton *fRotY; // Rotation about Y selected
88 TGRadioButton *fRotZ; // Rotation about Z selected
89 TGTextButton *fApply; // Apply-Button to accept changes
90 TGTextButton *fCancel; // Cancel-Button
91 TGTextButton *fUndo; // Undo-Button
92
93 virtual void ConnectSignals2Slots(); // Connect the signals to the slots
94
95public:
96 TGeoRotationEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
98 ~TGeoRotationEditor() override;
99 void SetModel(TObject *obj) override;
100
101 void DoRotPhi();
102 void DoRotTheta();
103 void DoRotPsi();
104 void DoRotAngle();
105 void DoModified();
106 void DoName();
108 void DoApply();
109 void DoCancel();
110 void DoUndo();
111
112 ClassDefOverride(TGeoRotationEditor, 0) // TGeoRotation editor
113};
114
116
117protected:
118 Double_t fDxi; // Initial dx
119 Double_t fDyi; // Initial dy
120 Double_t fDzi; // Initial dz
121 Double_t fPhii; // Initial phi (Euler rotation angle about Z)
122 Double_t fThetai; // Initial theta (Euler rotation angle about new X)
123 Double_t fPsii; // Initial dz (Euler rotation angle about new Z)
124 Double_t fAngleX; // New rotation angle about X
125 Double_t fAngleY; // New rotation angle about Y
126 Double_t fAngleZ; // New rotation angle about Z
127 TString fNamei; // Initial name
128 TGeoCombiTrans *fCombi; // Combi object
129 Bool_t fIsModified; // Flag that this was modified
130 Bool_t fIsEditable; // Flag that this can be changed
131 TGTextEntry *fRotName; // Translation name text entry
132 TGNumberEntry *fTransDx; // Number entry for box DX
133 TGNumberEntry *fTransDy; // Number entry for box DY
134 TGNumberEntry *fTransDz; // Number entry for box DZ
135 TGNumberEntry *fRotPhi; // Number entry for phi angle
136 TGNumberEntry *fRotTheta; // Number entry for theta angle
137 TGNumberEntry *fRotPsi; // Number entry for psi angle
138 TGNumberEntry *fRotAxis; // Number entry for rotation angle about one axis
139 TGRadioButton *fRotX; // Rotation about X selected
140 TGRadioButton *fRotY; // Rotation about Y selected
141 TGRadioButton *fRotZ; // Rotation about Z selected
142 TGTextButton *fApply; // Apply-Button to accept changes
143 TGTextButton *fCancel; // Cancel-Button
144 TGTextButton *fUndo; // Undo-Button
145
146 virtual void ConnectSignals2Slots(); // Connect the signals to the slots
147
148public:
149 TGeoCombiTransEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
151 ~TGeoCombiTransEditor() override;
152 void SetModel(TObject *obj) override;
153
154 void DoDx();
155 void DoDy();
156 void DoDz();
157 void DoRotPhi();
158 void DoRotTheta();
159 void DoRotPsi();
160 void DoRotAngle();
161 void DoModified();
162 void DoName();
164 void DoApply();
165 void DoCancel();
166 void DoUndo();
167
168 ClassDefOverride(TGeoCombiTransEditor, 0) // TGeoCombiTrans editor
169};
170
171#endif
@ kChildFrame
Definition GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
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 height
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
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:683
TGNumberEntry is a number entry input widget with up/down buttons.
Selects different options.
Definition TGButton.h:321
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
Definition TGTab.h:46
Yield an action as soon as it is clicked.
Definition TGButton.h:142
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
ROOT GUI Window base class.
Definition TGWindow.h:23
Editor for a TGeoCombiTrans.
TGNumberEntry * fTransDy
TGNumberEntry * fRotPsi
TGNumberEntry * fRotAxis
void DoRotPsi()
Slot for psi (Euler X convention)
TGNumberEntry * fTransDz
void DoModified()
Slot for notifying changes.
void DoUndo()
Slot for undoing last changes.
Bool_t DoParameters()
Slot for checking parameters.
void DoName()
Slot for name.
void DoRotAngle()
Slot for additional rotation about one axis.
TGeoCombiTrans * fCombi
void DoRotPhi()
Slot for phi (Euler X convention)
TGNumberEntry * fRotPhi
void DoApply()
Slot for applying modifications.
TGNumberEntry * fRotTheta
virtual void ConnectSignals2Slots()
Connect signals to slots.
void SetModel(TObject *obj) override
Connect to the selected combi matrix.
void DoRotTheta()
Slot for theta (Euler X convention)
void DoCancel()
Slot for cancelling last un-applied operations.
TGNumberEntry * fTransDx
~TGeoCombiTransEditor() override
Destructor.
Class describing rotation + translation.
Definition TGeoMatrix.h:317
Common base class for geombuilder editors.
Editor for a TGeoRotation.
void DoApply()
Slot for applying modifications.
void DoRotPhi()
Slot for phi (Euler X convention)
void DoRotAngle()
Slot for additional rotation about one axis.
TGRadioButton * fRotY
void DoCancel()
Slot for cancelling last un-applied operations.
TGNumberEntry * fRotTheta
void DoUndo()
Slot for undoing last changes.
void SetModel(TObject *obj) override
Connect to the selected rotation.
void DoName()
Slot for name.
TGeoRotation * fRotation
TGRadioButton * fRotZ
Bool_t DoParameters()
Slot for checking parameters.
TGTextButton * fCancel
void DoModified()
Slot for notifying changes.
TGTextButton * fApply
TGNumberEntry * fRotPhi
TGNumberEntry * fRotAxis
TGTextButton * fUndo
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGTextEntry * fRotName
void DoRotPsi()
Slot for psi (Euler X convention)
TGRadioButton * fRotX
~TGeoRotationEditor() override
Destructor.
void DoRotTheta()
Slot for theta (Euler X convention)
TGNumberEntry * fRotPsi
Class describing rotations.
Definition TGeoMatrix.h:168
Editor for a TGeoTranslation.
~TGeoTranslationEditor() override
Destructor.
TGeoTranslation * fTranslation
void SetModel(TObject *obj) override
Connect to the new matrix.
void DoModified()
Slot for notifying changes.
void DoName()
Slot for name.
void DoUndo()
Slot for undoing last operation.
void DoDy()
Slot for dx.
TGNumberEntry * fTransDy
Bool_t DoParameters()
Slot for checking parameters.
void DoCancel()
Slot for cancelling last modifications non-applied.
TGNumberEntry * fTransDx
void DoDz()
Slot for dx.
TGNumberEntry * fTransDz
virtual void ConnectSignals2Slots()
Connect signals to slots.
void DoApply()
Slot for applying changes.
void DoDx()
Slot for dx.
Class describing translations.
Definition TGeoMatrix.h:116
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139