TGL5DDataSetEditor.h

Go to the documentation of this file.
00001 // @(#)root/gl:$Id: TGL5DDataSetEditor.h 29602 2009-07-28 10:23:20Z brun $
00002 // Author: Bertrand Bellenot 2009
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TGL5DDataSetEditor
00013 #define ROOT_TGL5DDataSetEditor
00014 
00015 #ifndef ROOT_TGedFrame
00016 #include "TGedFrame.h"
00017 #endif
00018 #ifndef ROOT_GuiTypes
00019 #include "GuiTypes.h"
00020 #endif
00021 #ifndef ROOT_TGLUtil
00022 #include "TGLUtil.h"
00023 #endif
00024 
00025 class TGNumberEntryField;
00026 class TGDoubleHSlider;
00027 class TGNumberEntry;
00028 class TGCheckButton;
00029 class TGColorSelect;
00030 class TGTextButton;
00031 class TGL5DPainter;
00032 class TGL5DDataSet;
00033 class TGListBox;
00034 class TGHSlider;
00035 
00036 class TGL5DDataSetEditor : public TGedFrame {
00037 private:
00038    //Widgets for "Grid" tab.
00039    TGNumberEntry      *fNCellsXEntry;    //Number of cells along X.
00040    TGNumberEntry      *fNCellsYEntry;    //Number of cells along Y.
00041    TGNumberEntry      *fNCellsZEntry;    //Number of cells along Z.
00042 
00043    TGDoubleHSlider    *fXRangeSlider;    //Slider for X range.
00044    TGNumberEntryField *fXRangeSliderMin; //Number entry for slider's min.
00045    TGNumberEntryField *fXRangeSliderMax; //Number entry for slider's max.
00046 
00047    TGDoubleHSlider    *fYRangeSlider;    //Slider for Y range.
00048    TGNumberEntryField *fYRangeSliderMin; //Number entry for slider's min.
00049    TGNumberEntryField *fYRangeSliderMax; //Number entry for slider's max.
00050 
00051    TGDoubleHSlider    *fZRangeSlider;    //Slider for Z range.
00052    TGNumberEntryField *fZRangeSliderMin; //Number entry for slider's min.
00053    TGNumberEntryField *fZRangeSliderMax; //Number entry for slider's max.
00054 
00055    TGTextButton       *fCancelGridBtn;   //"Cancel" button.
00056    TGTextButton       *fOkGridBtn;       //"Apply" button.
00057 
00058    //Widgets for "Surfaces" tab.
00059    TGNumberEntryField *fV4MinEntry;      //Read only widget.
00060    TGNumberEntryField *fV4MaxEntry;      //Read only widget.
00061 
00062    TGCheckButton      *fHighlightCheck;  //Highlight selected surface.
00063    TGListBox          *fIsoList;         //List box to select surface.
00064 
00065    TGCheckButton      *fVisibleCheck;    //Show/hide surface.
00066    TGCheckButton      *fShowCloud;       //Show/hide points for surface.
00067 
00068    TGColorSelect      *fSurfColorSelect; //Open color dialog.
00069    TGHSlider          *fSurfAlphaSlider; //Slider to control transparency.
00070    TGTextButton       *fSurfRemoveBtn;   //Remove selected surface.
00071 
00072    TGNumberEntry      *fNewIsoEntry;     //Set the iso-level for new surface.
00073    TGTextButton       *fAddNewIsoBtn;    //Button to add new iso.
00074 
00075    //Widgets for "Style" tab.
00076    TGCheckButton      *fShowBoxCut;
00077    TGNumberEntry      *fNumberOfPlanes;
00078    TGNumberEntry      *fAlpha;
00079    TGCheckButton      *fLogScale;
00080    TGDoubleHSlider    *fSlideRange;
00081 
00082    TGTextButton       *fApplyAlpha;
00083    TGTextButton       *fApplyPlanes;
00084 
00085    //Model
00086    TGL5DDataSet       *fDataSet;         //Data adapter for TTree.
00087    TGL5DPainter       *fPainter;         //Painter.
00088 
00089    void ConnectSignals2Slots();
00090 
00091    //Copy ctor and copy-assignment operator. Only
00092    //declarations, no definitions.
00093    TGL5DDataSetEditor(const TGL5DDataSetEditor &);
00094    TGL5DDataSetEditor &operator = (const TGL5DDataSetEditor &);
00095 
00096    void CreateStyleTab();
00097    void CreateGridTab();
00098    void CreateIsoTab();
00099 
00100    void SetStyleTabWidgets();
00101    void SetGridTabWidgets();
00102    void SetIsoTabWidgets();
00103 
00104    void EnableGridTabButtons();
00105    void DisableGridTabButtons();
00106 
00107    void EnableSurfaceControls();
00108    void DisableSurfaceControls();
00109 
00110    //This will hold vector of list iterators
00111    //(list of surfaces). I use this to avoid
00112    //including TGL5DPainter here (SurfIter_t
00113    //is a typedef inside TGL5DPainter).
00114    class TGL5DEditorPrivate;
00115    TGL5DEditorPrivate *fHidden;
00116 
00117    Int_t               fSelectedSurface;
00118 
00119 public:
00120    TGL5DDataSetEditor(const TGWindow *p = 0, Int_t width = 140, Int_t height = 30,
00121                       UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
00122    ~TGL5DDataSetEditor();
00123 
00124    virtual void   SetModel(TObject* obj);
00125 
00126    //Slots for "Grid" tab events.
00127    void GridParametersChanged();
00128    void XSliderChanged();
00129    void YSliderChanged();
00130    void ZSliderChanged();
00131    void XSliderSetMin();
00132    void XSliderSetMax();
00133    void YSliderSetMin();
00134    void YSliderSetMax();
00135    void ZSliderSetMin();
00136    void ZSliderSetMax();
00137    void RollbackGridParameters();
00138    void ApplyGridParameters();
00139    //Slots for "Surfaces" tab events.
00140    void HighlightClicked();
00141    void SurfaceSelected(Int_t id);
00142    void VisibleClicked();
00143    void ColorChanged(Pixel_t pixelColor);
00144    void AlphaChanged(Int_t alpha);
00145    void RemoveSurface();
00146    void AddNewSurface();
00147    //Slots for "Style" tab events.
00148    void ApplyAlpha();
00149    void ApplyPlanes();
00150    void BoxCutToggled();
00151    void AlphaChanged();
00152    void NContoursChanged();
00153 
00154 
00155    ClassDef(TGL5DDataSetEditor, 0); //GUI for editing OpenGL 5D Viewer attributes
00156 };
00157 
00158 #endif

Generated on Tue Jul 5 14:16:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1