00001 #ifndef _QGUI_HISTOGRAM_DISPLAY_HH_ 00002 #define _QGUI_HISTOGRAM_DISPLAY_HH_ 00003 00004 #include "QGUIBaseFrame.hh" 00005 00006 #include "QGUIHistogramHandler.hh" 00007 00008 #include <vector> 00009 00010 #include "TTimer.h" 00011 00012 class TGCompositeFrame; 00013 class TRootEmbeddedCanvas; 00014 class QGUINumberSelector; 00015 class TGTextButton; 00016 class TGTextEntry; 00017 class TGLabel; 00018 00019 class QGUIHistogramDisplay: public QGUIBaseFrame 00020 { 00021 public: 00022 QGUIHistogramDisplay(const TGWindow* parent, 00023 unsigned int Width, 00024 unsigned int Height); 00025 00026 virtual ~QGUIHistogramDisplay(); 00027 00028 void Close(); 00029 00031 void UpdateChannel(); 00032 00034 void UpdateDisplay(); 00035 00041 void HandlePause(); 00042 00046 void UpdateRate(); 00047 00051 void UpdateSpectrumRange(); 00052 00053 private: 00054 00055 TGCompositeFrame *fControlFrame; 00056 TGCompositeFrame *fDisplayFrame; 00057 TGCompositeFrame *fChannelFrame; 00058 00059 TGLabel *fChSelLabel; 00060 00061 TRootEmbeddedCanvas *fPulseCanvas; 00062 TRootEmbeddedCanvas *fSpectrumCanvas; 00063 TRootEmbeddedCanvas *fRateCanvas; 00064 00065 QGUINumberSelector *fChSelector; 00066 00067 TGTextButton *fCloseButton; 00068 TGTextButton *fPauseButton; 00069 TGTextButton *fUpdateRateButton; 00070 TGTextButton *fUpdateRangeButton; 00071 00072 TGTextEntry *fChDisplay; 00073 00074 std::vector<unsigned short> fActiveChannels; 00075 00076 long fTimeout; 00077 TTimer fTimer; 00078 00079 QGUIHistogramHandler fHistoHandler; 00080 00081 void CreateSubFrames(); 00082 00083 void ConnectButtons(); 00084 00085 void GetActiveChannels(); 00086 00087 ClassDef(QGUIHistogramDisplay,0) 00088 }; 00089 00090 #endif