Logo ROOT   6.08/07
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 #ifndef ROOT_TGedFrame
16 #include "TGedFrame.h"
17 #endif
18 #ifndef ROOT_GuiTypes
19 #include "GuiTypes.h"
20 #endif
21 #ifndef ROOT_TGLUtil
22 #include "TGLUtil.h"
23 #endif
24 
25 class TGNumberEntryField;
26 class TGDoubleHSlider;
27 class TGNumberEntry;
28 class TGCheckButton;
29 class TGColorSelect;
30 class TGTextButton;
31 class TGL5DPainter;
32 class TGL5DDataSet;
33 class TGListBox;
34 class TGHSlider;
35 
36 class TGL5DDataSetEditor : public TGedFrame {
37 private:
38  //Widgets for "Grid" tab.
39  TGNumberEntry *fNCellsXEntry; //Number of cells along X.
40  TGNumberEntry *fNCellsYEntry; //Number of cells along Y.
41  TGNumberEntry *fNCellsZEntry; //Number of cells along Z.
42 
43  TGDoubleHSlider *fXRangeSlider; //Slider for X range.
44  TGNumberEntryField *fXRangeSliderMin; //Number entry for slider's min.
45  TGNumberEntryField *fXRangeSliderMax; //Number entry for slider's max.
46 
47  TGDoubleHSlider *fYRangeSlider; //Slider for Y range.
48  TGNumberEntryField *fYRangeSliderMin; //Number entry for slider's min.
49  TGNumberEntryField *fYRangeSliderMax; //Number entry for slider's max.
50 
51  TGDoubleHSlider *fZRangeSlider; //Slider for Z range.
52  TGNumberEntryField *fZRangeSliderMin; //Number entry for slider's min.
53  TGNumberEntryField *fZRangeSliderMax; //Number entry for slider's max.
54 
55  TGTextButton *fCancelGridBtn; //"Cancel" button.
56  TGTextButton *fOkGridBtn; //"Apply" button.
57 
58  //Widgets for "Surfaces" tab.
59  TGNumberEntryField *fV4MinEntry; //Read only widget.
60  TGNumberEntryField *fV4MaxEntry; //Read only widget.
61 
62  TGCheckButton *fHighlightCheck; //Highlight selected surface.
63  TGListBox *fIsoList; //List box to select surface.
64 
65  TGCheckButton *fVisibleCheck; //Show/hide surface.
66  TGCheckButton *fShowCloud; //Show/hide points for surface.
67 
68  TGColorSelect *fSurfColorSelect; //Open color dialog.
69  TGHSlider *fSurfAlphaSlider; //Slider to control transparency.
70  TGTextButton *fSurfRemoveBtn; //Remove selected surface.
71 
72  TGNumberEntry *fNewIsoEntry; //Set the iso-level for new surface.
73  TGTextButton *fAddNewIsoBtn; //Button to add new iso.
74 
75  //Widgets for "Style" tab.
81 
84 
85  //Model
86  TGL5DDataSet *fDataSet; //Data adapter for TTree.
87  TGL5DPainter *fPainter; //Painter.
88 
89  void ConnectSignals2Slots();
90 
91  //Copy ctor and copy-assignment operator. Only
92  //declarations, no definitions.
95 
96  void CreateStyleTab();
97  void CreateGridTab();
98  void CreateIsoTab();
99 
100  void SetStyleTabWidgets();
101  void SetGridTabWidgets();
102  void SetIsoTabWidgets();
103 
104  void EnableGridTabButtons();
105  void DisableGridTabButtons();
106 
107  void EnableSurfaceControls();
108  void DisableSurfaceControls();
109 
110  //This will hold vector of list iterators
111  //(list of surfaces). I use this to avoid
112  //including TGL5DPainter here (SurfIter_t
113  //is a typedef inside TGL5DPainter).
114  class TGL5DEditorPrivate;
115  TGL5DEditorPrivate *fHidden;
116 
118 
119 public:
120  TGL5DDataSetEditor(const TGWindow *p = 0, Int_t width = 140, Int_t height = 30,
123 
124  virtual void SetModel(TObject* obj);
125 
126  //Slots for "Grid" tab events.
127  void GridParametersChanged();
128  void XSliderChanged();
129  void YSliderChanged();
130  void ZSliderChanged();
131  void XSliderSetMin();
132  void XSliderSetMax();
133  void YSliderSetMin();
134  void YSliderSetMax();
135  void ZSliderSetMin();
136  void ZSliderSetMax();
137  void RollbackGridParameters();
138  void ApplyGridParameters();
139  //Slots for "Surfaces" tab events.
140  void HighlightClicked();
141  void SurfaceSelected(Int_t id);
142  void VisibleClicked();
143  void ColorChanged(Pixel_t pixelColor);
144  void AlphaChanged(Int_t alpha);
145  void RemoveSurface();
146  void AddNewSurface();
147  //Slots for "Style" tab events.
148  void ApplyAlpha();
149  void ApplyPlanes();
150  void BoxCutToggled();
151  void AlphaChanged();
152  void NContoursChanged();
153 
154 
155  ClassDef(TGL5DDataSetEditor, 0); //GUI for editing OpenGL 5D Viewer attributes
156 };
157 
158 #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.
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:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
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:42
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.