Logo ROOT   6.14/05
Reference Guide
TGL5DDataSetEditor.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Bertrand Bellenot 2009
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2009, 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_TGL5DDataSetEditor
13 #define ROOT_TGL5DDataSetEditor
14 
15 #include "TGedFrame.h"
16 #include "GuiTypes.h"
17 #include "TGLUtil.h"
18 
19 class TGNumberEntryField;
20 class TGDoubleHSlider;
21 class TGNumberEntry;
22 class TGCheckButton;
23 class TGColorSelect;
24 class TGTextButton;
25 class TGL5DPainter;
26 class TGL5DDataSet;
27 class TGListBox;
28 class TGHSlider;
29 
30 class TGL5DDataSetEditor : public TGedFrame {
31 private:
32  //Widgets for "Grid" tab.
33  TGNumberEntry *fNCellsXEntry; //Number of cells along X.
34  TGNumberEntry *fNCellsYEntry; //Number of cells along Y.
35  TGNumberEntry *fNCellsZEntry; //Number of cells along Z.
36 
37  TGDoubleHSlider *fXRangeSlider; //Slider for X range.
38  TGNumberEntryField *fXRangeSliderMin; //Number entry for slider's min.
39  TGNumberEntryField *fXRangeSliderMax; //Number entry for slider's max.
40 
41  TGDoubleHSlider *fYRangeSlider; //Slider for Y range.
42  TGNumberEntryField *fYRangeSliderMin; //Number entry for slider's min.
43  TGNumberEntryField *fYRangeSliderMax; //Number entry for slider's max.
44 
45  TGDoubleHSlider *fZRangeSlider; //Slider for Z range.
46  TGNumberEntryField *fZRangeSliderMin; //Number entry for slider's min.
47  TGNumberEntryField *fZRangeSliderMax; //Number entry for slider's max.
48 
49  TGTextButton *fCancelGridBtn; //"Cancel" button.
50  TGTextButton *fOkGridBtn; //"Apply" button.
51 
52  //Widgets for "Surfaces" tab.
53  TGNumberEntryField *fV4MinEntry; //Read only widget.
54  TGNumberEntryField *fV4MaxEntry; //Read only widget.
55 
56  TGCheckButton *fHighlightCheck; //Highlight selected surface.
57  TGListBox *fIsoList; //List box to select surface.
58 
59  TGCheckButton *fVisibleCheck; //Show/hide surface.
60  TGCheckButton *fShowCloud; //Show/hide points for surface.
61 
62  TGColorSelect *fSurfColorSelect; //Open color dialog.
63  TGHSlider *fSurfAlphaSlider; //Slider to control transparency.
64  TGTextButton *fSurfRemoveBtn; //Remove selected surface.
65 
66  TGNumberEntry *fNewIsoEntry; //Set the iso-level for new surface.
67  TGTextButton *fAddNewIsoBtn; //Button to add new iso.
68 
69  //Widgets for "Style" tab.
75 
78 
79  //Model
80  TGL5DDataSet *fDataSet; //Data adapter for TTree.
81  TGL5DPainter *fPainter; //Painter.
82 
83  void ConnectSignals2Slots();
84 
85  //Copy ctor and copy-assignment operator. Only
86  //declarations, no definitions.
89 
90  void CreateStyleTab();
91  void CreateGridTab();
92  void CreateIsoTab();
93 
94  void SetStyleTabWidgets();
95  void SetGridTabWidgets();
96  void SetIsoTabWidgets();
97 
98  void EnableGridTabButtons();
99  void DisableGridTabButtons();
100 
101  void EnableSurfaceControls();
102  void DisableSurfaceControls();
103 
104  //This will hold vector of list iterators
105  //(list of surfaces). I use this to avoid
106  //including TGL5DPainter here (SurfIter_t
107  //is a typedef inside TGL5DPainter).
108  class TGL5DEditorPrivate;
109  TGL5DEditorPrivate *fHidden;
110 
112 
113 public:
114  TGL5DDataSetEditor(const TGWindow *p = 0, Int_t width = 140, Int_t height = 30,
117 
118  virtual void SetModel(TObject* obj);
119 
120  //Slots for "Grid" tab events.
121  void GridParametersChanged();
122  void XSliderChanged();
123  void YSliderChanged();
124  void ZSliderChanged();
125  void XSliderSetMin();
126  void XSliderSetMax();
127  void YSliderSetMin();
128  void YSliderSetMax();
129  void ZSliderSetMin();
130  void ZSliderSetMax();
131  void RollbackGridParameters();
132  void ApplyGridParameters();
133  //Slots for "Surfaces" tab events.
134  void HighlightClicked();
135  void SurfaceSelected(Int_t id);
136  void VisibleClicked();
137  void ColorChanged(Pixel_t pixelColor);
138  void AlphaChanged(Int_t alpha);
139  void RemoveSurface();
140  void AddNewSurface();
141  //Slots for "Style" tab events.
142  void ApplyAlpha();
143  void ApplyPlanes();
144  void BoxCutToggled();
145  void AlphaChanged();
146  void NContoursChanged();
147 
148 
149  ClassDef(TGL5DDataSetEditor, 0); //GUI for editing OpenGL 5D Viewer attributes
150 };
151 
152 #endif
TGDoubleHSlider * fSlideRange
TGNumberEntry * fNCellsXEntry
TGTextButton * fSurfRemoveBtn
void ZSliderSetMin()
Value in a number entry was modified.
TGNumberEntryField * fYRangeSliderMin
void ZSliderSetMax()
Value in a number entry was modified.
TGNumberEntry * fNCellsZEntry
GUI editor for OpenGL 5D Painter.
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
TGCheckButton * fShowCloud
void RemoveSurface()
Remove selected surface.
int Int_t
Definition: RtypesCore.h:41
TGTextButton * fAddNewIsoBtn
void GridParametersChanged()
Some of controls in a "Grid" tab was modified.
void CreateGridTab()
Tab, containing controls to set the ranges and number of cells in a grid.
void XSliderSetMax()
Value in a number entry was modified.
TGNumberEntryField * fXRangeSliderMin
TGNumberEntry * fAlpha
void ApplyAlpha()
Slot connected to the "Apply" button for alpha value.
TGHSlider * fSurfAlphaSlider
void YSliderChanged()
Y slider in a "Grid" tab.
void HighlightClicked()
Check, if selected surface must be highlighted.
TGL5DDataSet * fDataSet
TGDoubleHSlider * fXRangeSlider
void CreateStyleTab()
Creates "Style" tab.
#define ClassDef(name, id)
Definition: Rtypes.h:320
ULong_t Pixel_t
Definition: GuiTypes.h:39
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
void XSliderChanged()
X slider in a "Grid" tab.
void SurfaceSelected(Int_t id)
Surface was selected in a list box.
TGDoubleHSlider * fYRangeSlider
TGNumberEntryField * fZRangeSliderMax
void ZSliderChanged()
Z slider in a "Grid" tab.
void BoxCutToggled()
Slot connected to the Show BoxCut check button.
TGCheckButton * fLogScale
void ColorChanged(Pixel_t pixelColor)
Change the color of the selected surface.
void XSliderSetMin()
Value in a number entry was modified.
TGCheckButton * fShowBoxCut
void DisableSurfaceControls()
Disable surface controls.
void YSliderSetMin()
Value in a number entry was modified.
TGTextButton * fOkGridBtn
unsigned int UInt_t
Definition: RtypesCore.h:42
void ApplyGridParameters()
"Apply" button was pressed in a "Grid" tab.
void CreateIsoTab()
Tab, containing controls to work with iso-surfaces.
TGNumberEntryField * fV4MaxEntry
void DisableGridTabButtons()
Disable "Cancel" and "Apply" buttons.
TGNumberEntryField * fYRangeSliderMax
void SetIsoTabWidgets()
Set "Surfaces" tab's controls from model.
TGCheckButton * fHighlightCheck
virtual void SetModel(TObject *obj)
Set model or disables/hides viewer.
TGL5DDataSetEditor(const TGL5DDataSetEditor &)
TGTextButton * fApplyPlanes
TGColorSelect * fSurfColorSelect
TGNumberEntry * fNCellsYEntry
void VisibleClicked()
Hide/show selected surface.
void EnableGridTabButtons()
Grid parameters were changed, enable "Cancel" and "Apply" buttons.
TGL5DPainter implements "gl5d" option for TTree::Draw.
Definition: TGL5DPainter.h:32
TGNumberEntryField * fZRangeSliderMin
TGNumberEntry * fNumberOfPlanes
void ConnectSignals2Slots()
Connect signals to slots.
void AddNewSurface()
Add new iso-surface.
void NContoursChanged()
Slot connected to the Number of Planes value-entry.
Mother of all ROOT objects.
Definition: TObject.h:37
TGNumberEntryField * fV4MinEntry
void AlphaChanged()
Slot connected to the Alpha entry.
void RollbackGridParameters()
"Cancel" button was pressed in a "Grid" tab.
void YSliderSetMax()
Value in a number entry was modified.
TGNumberEntry * fNewIsoEntry
TGNumberEntryField * fXRangeSliderMax
TGL5DDataSetEditor & operator=(const TGL5DDataSetEditor &)
TGDoubleHSlider * fZRangeSlider
TGL5DEditorPrivate * fHidden
void SetGridTabWidgets()
Set "Grid" tab's controls from model.
TGL5DPainter * fPainter
TGTextButton * fCancelGridBtn
TGCheckButton * fVisibleCheck
void ApplyPlanes()
Slot connected to the Apply Planes button.
TGTextButton * fApplyAlpha
void EnableSurfaceControls()
Surface was selected in a list box, enable some controls.
void SetStyleTabWidgets()
Set "Style" tab's controls from model.