00001 00002 #ifndef _QGS_CHANNEL_FRAME_HH_ 00003 #define _QGS_CHANNEL_FRAME_HH_ 00004 00005 #include <map> 00006 #include <set> 00007 00008 #include <TGFrame.h> 00009 00010 class TGCheckButton; 00011 class QGuiColorSelect; 00012 class QGUINumberSelector; 00013 class TGNumberEntry; 00014 class TGComboBox; 00015 class TGButtonGroup; 00016 00017 class QScopeChannelInfo; 00018 00027 class QGSChannelFrame: public TGCompositeFrame 00028 { 00029 public: 00034 QGSChannelFrame(const TGWindow* parent, UInt_t w, UInt_t h, Int_t id); 00035 00037 virtual ~QGSChannelFrame(); 00038 00040 void Changed(); 00041 00043 void Changed(Int_t id) { Emit("Changed(Int_t)", id); } /*SIGNAL*/ 00044 00051 void SetChannelInfo(QScopeChannelInfo* chInfo) { fChannelInfo = chInfo; } 00052 00054 QScopeChannelInfo* GetChannelInfo() const { return fChannelInfo; } 00055 00057 void SetLgChannels(const std::set<int>& channels); 00058 00060 void UpdateInfos(); 00061 00066 void UpdateDisplay(); 00067 00072 void InitDisplay(); 00074 void UpdateEnabled(); 00076 void AutoScale() { fAutoScale = true; fAdjustOffset = true; } 00078 void AdjustOffset() { fAdjustOffset = true; } 00079 00080 private: 00081 00082 Int_t fId; 00084 TGCheckButton *fEnableButton; 00085 QGuiColorSelect *fColorButton; 00086 QGUINumberSelector *fChSelector; 00087 TGComboBox *fMvPerDivSelector; 00088 TGNumberEntry *fOffsetSelector; 00089 TGTextButton *fAutoScaleButton; 00090 TGTextButton *fAdjOffsetButton; 00091 TGButtonGroup *fMeasButtons; 00097 bool fAutoScale; 00098 00103 bool fAdjustOffset; 00104 00106 std::map<Int_t, Float_t> fMvPerDivMap; 00107 00112 QScopeChannelInfo *fChannelInfo; 00113 00115 void CreateWidgets(); 00116 00118 void MakeConnections(); 00119 00121 void Lock(bool doLock); 00122 00123 00129 enum MeasButtonsId { 00130 kMaxMin = 1, 00131 kAverage = 2, 00132 kRMS = 3 00133 }; 00134 00135 ClassDef(QGSChannelFrame, 0) 00136 }; 00137 #endif