00001 00002 #include <qwidget.h> 00003 #include "midobasic.h" 00004 #include "midotrigger.h" 00005 #include "midobuffer.h" 00006 00007 00008 class QCheckBox; 00009 class QwtSlider; 00010 class QLabel; 00011 class QGroupBox; 00012 class plotDemo; 00013 class plotOscilloscope; 00014 class Buffer; 00015 class QResizeEvent; 00016 00017 class Oscilloscope : public QWidget 00018 { 00019 Q_OBJECT 00020 00021 friend class Central; 00022 00023 public: 00024 Oscilloscope(QWidget *parent, const char *name); 00025 ~Oscilloscope() {} 00026 00027 void setButtonTime(double samplingRate); 00028 Buffer *buf1, *buf2; 00029 plotOscilloscope *plotWin; 00030 00031 public slots: 00032 void setCH1(bool on); 00033 void setCH2(bool on); 00034 void checkCbBuffer(); 00035 void resetBuf1(); 00036 void resetBuf2(); 00037 void entryDateBuf1(DValueList*); 00038 void entryDateBuf2(DValueList*); 00039 00040 00041 private: 00042 QCheckBox *cb1,*cb2, *cbBuffer; 00043 QwtSlider *sldBuffer , *scrollBuf;; 00044 QLabel *labelBufferVal; 00045 00046 DValueList *arrayDate; 00047 DValueList arrayV; 00048 00049 double BufferVal; 00050 QPushButton *pb1,*pb2,*pb3,*pb4,*pb5,*pb6,*pb7,*pb8,*pb9,*pb10, 00051 *pb11,*pb12,*pb13,*pb14,*pb15,*pb16,*pb17,*pb18,*pb19,*pb20; 00052 QGroupBox *gb1, *gb2; 00053 00054 plotDemo *plotWinDemo; 00055 00056 void setEnabledWinBuffer(bool enable); 00057 void setPlotOscilloscope(); 00058 void setDemoOscilloscope(); 00059 void setScaleCh1(double value); 00060 void setScaleCh2(double value); 00061 00062 void setSliderCh1(double value); 00063 void setSliderCh2(double value); 00064 00065 void loadDateCh1(DValueList *array, bool display); 00066 void loadDateCh2(DValueList *array, bool display); 00067 00068 void setAcCh1(double midValue); 00069 void setDcCh1(); 00070 void setGndCh1(); 00071 00072 void setAcCh2(double midValue); 00073 void setDcCh2(); 00074 void setGndCh2(); 00075 00076 void updateEnableButton(QPushButton* button, double samplingRate); 00077 00078 void selectSampleRate(double timeDiv); 00079 00080 DValueList readIfTrigger(int numChannel); 00081 00082 private slots: 00083 void modifyBuffer(double value); 00084 void intChecked(); 00085 void timeDivClicked(); 00086 void powerBuffer(); 00087 void updatePlotOscilloscope(double value); 00088 00089 };