00001 00002 #ifndef _Q_GUI_SCOPE_HH_ 00003 #define _Q_GUI_SCOPE_HH_ 00004 00005 #include <TGFrame.h> 00006 00007 #include <map> 00008 #include <set> 00009 00010 class QGSChannelFrame; 00011 class QGSDisplayManager; 00012 00013 class TRootEmbeddedCanvas; 00014 class TGComboBox; 00015 class TGButton; 00016 class TTimer; 00017 00023 class QGuiScope: public TGMainFrame 00024 { 00025 public: 00027 QGuiScope(const TGWindow* parent, UInt_t w, UInt_t h); 00028 00030 virtual ~QGuiScope(); 00031 00037 void ChannelChanged(Int_t id); 00038 00040 void CloseWindow() { DontCallClose(); TGMainFrame::CloseWindow(); Emit("CloseWindow()"); } /*SIGNAL*/ 00041 00043 void HandleTimeout(); 00044 00046 void HandlePause(); 00047 00049 void HandleSave(); 00050 00051 private: 00052 00053 const Long_t kTimeoutMs; 00054 const UInt_t kControlFrameHeight; 00055 const UInt_t kNumChannels; 00057 std::map<Int_t, ULong_t> fDefaultColors; 00058 00059 Bool_t fIsPaused; 00065 std::map<Int_t, UInt_t> fWindowLengthsMs; 00066 00071 std::map<Int_t, UInt_t> fSubSamplings; 00072 00077 std::map<Int_t, QGSChannelFrame*> fChannelFrames; 00078 00080 std::set<Int_t> fChannelsToUpdate; 00081 00083 std::set<int> fActiveChannels; 00084 00086 QGSDisplayManager *fDisplayManager; 00087 00088 TTimer *fTimer; 00090 TRootEmbeddedCanvas *fEmbCanvas; 00092 TGComboBox *fXAxisRangeBox; 00093 TGComboBox *fSubSamplingBox; 00095 TGTextButton *fSaveButton; 00096 TGTextButton *fPauseButton; 00097 TGTextButton *fCloseButton; 00100 void CreateFrames(); 00101 00103 void MakeConnections(); 00104 00106 void InitWidgets(); 00107 00109 void GetActiveChannels(); 00110 00118 void SetAvailableChannels(); 00119 00121 void SetupDisplayManager(); 00122 00124 void SetupTimer(); 00125 00126 ClassDef(QGuiScope, 0) 00127 }; 00128 #endif