Logo ROOT  
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
20class TGDoubleHSlider;
21class TGNumberEntry;
22class TGCheckButton;
23class TGColorSelect;
24class TGTextButton;
25class TGL5DPainter;
26class TGL5DDataSet;
27class TGListBox;
28class TGHSlider;
29
31private:
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.
82
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
100
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
113public:
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.
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();
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
ULong_t Pixel_t
Definition: GuiTypes.h:39
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
#define ClassDef(name, id)
Definition: Rtypes.h:326
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
@ kChildFrame
Definition: TGFrame.h:57
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
GUI editor for OpenGL 5D Painter.
void VisibleClicked()
Hide/show selected surface.
void ColorChanged(Pixel_t pixelColor)
Change the color of the selected surface.
TGTextButton * fOkGridBtn
TGDoubleHSlider * fYRangeSlider
void ApplyPlanes()
Slot connected to the Apply Planes button.
void AddNewSurface()
Add new iso-surface.
void XSliderSetMax()
Value in a number entry was modified.
TGCheckButton * fShowCloud
TGNumberEntryField * fV4MaxEntry
void SurfaceSelected(Int_t id)
Surface was selected in a list box.
TGColorSelect * fSurfColorSelect
TGCheckButton * fLogScale
TGDoubleHSlider * fXRangeSlider
TGCheckButton * fShowBoxCut
TGTextButton * fCancelGridBtn
TGNumberEntry * fNewIsoEntry
void ZSliderChanged()
Z slider in a "Grid" tab.
void XSliderChanged()
X slider in a "Grid" tab.
TGNumberEntryField * fZRangeSliderMax
void SetStyleTabWidgets()
Set "Style" tab's controls from model.
TGL5DDataSet * fDataSet
void AlphaChanged()
Slot connected to the Alpha entry.
TGL5DDataSetEditor(const TGL5DDataSetEditor &)
void DisableSurfaceControls()
Disable surface controls.
void ApplyGridParameters()
"Apply" button was pressed in a "Grid" tab.
void RemoveSurface()
Remove selected surface.
void BoxCutToggled()
Slot connected to the Show BoxCut check button.
TGTextButton * fAddNewIsoBtn
virtual void SetModel(TObject *obj)
Set model or disables/hides viewer.
void ZSliderSetMin()
Value in a number entry was modified.
TGNumberEntryField * fZRangeSliderMin
TGNumberEntryField * fYRangeSliderMin
TGNumberEntry * fNCellsZEntry
TGNumberEntry * fNCellsXEntry
TGDoubleHSlider * fSlideRange
TGCheckButton * fVisibleCheck
TGTextButton * fApplyAlpha
TGNumberEntry * fNumberOfPlanes
void EnableSurfaceControls()
Surface was selected in a list box, enable some controls.
void YSliderChanged()
Y slider in a "Grid" tab.
TGNumberEntryField * fYRangeSliderMax
TGNumberEntryField * fV4MinEntry
TGTextButton * fApplyPlanes
void ApplyAlpha()
Slot connected to the "Apply" button for alpha value.
void CreateStyleTab()
Creates "Style" tab.
void RollbackGridParameters()
"Cancel" button was pressed in a "Grid" tab.
void ConnectSignals2Slots()
Connect signals to slots.
void CreateIsoTab()
Tab, containing controls to work with iso-surfaces.
void ZSliderSetMax()
Value in a number entry was modified.
void GridParametersChanged()
Some of controls in a "Grid" tab was modified.
void NContoursChanged()
Slot connected to the Number of Planes value-entry.
TGDoubleHSlider * fZRangeSlider
TGHSlider * fSurfAlphaSlider
TGNumberEntryField * fXRangeSliderMin
TGTextButton * fSurfRemoveBtn
TGNumberEntry * fAlpha
void EnableGridTabButtons()
Grid parameters were changed, enable "Cancel" and "Apply" buttons.
TGL5DEditorPrivate * fHidden
void CreateGridTab()
Tab, containing controls to set the ranges and number of cells in a grid.
void SetIsoTabWidgets()
Set "Surfaces" tab's controls from model.
TGNumberEntryField * fXRangeSliderMax
TGCheckButton * fHighlightCheck
void XSliderSetMin()
Value in a number entry was modified.
void YSliderSetMin()
Value in a number entry was modified.
void DisableGridTabButtons()
Disable "Cancel" and "Apply" buttons.
void HighlightClicked()
Check, if selected surface must be highlighted.
TGL5DPainter * fPainter
TGL5DDataSetEditor & operator=(const TGL5DDataSetEditor &)
void SetGridTabWidgets()
Set "Grid" tab's controls from model.
void YSliderSetMax()
Value in a number entry was modified.
TGNumberEntry * fNCellsYEntry
TGL5DPainter implements "gl5d" option for TTree::Draw.
Definition: TGL5DPainter.h:32
Mother of all ROOT objects.
Definition: TObject.h:37