QIGUIPulseWindow.hh
00001 #ifndef _QIGUI_PULSEWINDOW__H_
00002 #define _QIGUI_PULSEWINDOW__H_
00003
00004
00005 #include "ui_PulseWindow.h"
00006 #include <QMainWindow>
00007 #include <TCanvas.h>
00008 #include "QEventDisplayFactory.hh"
00009
00010 class QIGUIPlotData;
00011 class QIGUIDianaSessionHandler;
00012 class QIGUICoSessionHandler;
00013 class QEventR;
00014 class QEventAuxDataR;
00015 class QRunDataR;
00016 class QSpinBox;
00017 class QLabel;
00018
00019
00020 class QIGUIPulseWindow: public QMainWindow, public Ui::PulseWindow
00021 {
00022
00023 Q_OBJECT
00024
00025 private:
00027 TCanvas * fCanvas;
00028
00030 QIGUIPlotData * fPlotData;
00031 QIGUIPlotData * fAuxiliarPlotData;
00032
00034 QIGUIDianaSessionHandler * fDianaHandler;
00035
00037 QIGUICoSessionHandler * fCoSessionHandler;
00038
00039
00040 QLabel * fChannelLabel;
00041 QSpinBox * fChannelSpinBox;
00042 int fCurrentModule;
00043 int fCurrentEventNumber;
00044 int fCurrentEntryNumber;
00045 bool fDisplayAllPulses;
00046
00047 QEventDisplayFactory * fEventDisplayFactory;
00048 public:
00049
00050 QIGUIPulseWindow (QWidget * parent=0);
00051 QIGUIPulseWindow (QString& name, QWidget * parent=0);
00052 QIGUIPulseWindow (QString& name, QIGUIPlotData * data, QWidget * parent = 0);
00053 virtual ~QIGUIPulseWindow();
00054 void Init();
00055 void InitPlotData();
00056 void InitDisplayObjects();
00057 void CreateSignals();
00058 void DestroySignals();
00059 void CreateActions();
00060
00061 signals:
00062 void DisplayEventSignal(QEventR*, QEventAuxDataR*, QRunDataR*);
00063
00064 public slots:
00065 void NotifyChangeInScrollBar(int val);
00066 void NotifyChangeInEventNumber();
00067 void NotifyChangeInEntryNumber();
00068 void NotifyChangeDisplayObject(QTreeWidgetItem * item, int column);
00069 void NotifyChangeDisplayAllPulses(int);
00070 void RefreshEvent();
00071 void ClearEventDisplay();
00072 void DisplayCurrentEventNumber();
00073 void DisplayEvent(QEventR*, QEventAuxDataR *, QRunDataR*);
00074 void SetChannelAndRefresh(int ch);
00075
00076
00077 void NextEvent();
00078 void PreviousEvent();
00079 void CanvasSaveAs();
00080 void ReloadCuts();
00081
00082 public:
00083 void EmitDisplayEventSignal(QEventR* ev, QEventAuxDataR*aux, QRunDataR*);
00084
00085 void JumpToEvent(int ev);
00086 void AskEvent(int ev);
00087
00088
00089 void UpdateWindow();
00090
00091
00092 QIGUIPlotData * GetPlotData (){return fPlotData;}
00093 TCanvas * GetCanvas() {return fCanvas;}
00094 void SetCoSessionHandler (QIGUICoSessionHandler * coSession);
00095
00096
00097 void createStatusBar();
00098 QLabel * fStatusBarSession;
00099 QLabel * fStatusBarNumberOfEvents;
00100 QLabel * fStatusBarNumberOfSelectedEvents;
00101 QLabel * fStatusBarCuts;
00102 QLabel * fStatusBarCoAnalysis;
00103 public slots:
00104 void updateStatusBar();
00105
00106
00107
00108
00109 };
00110
00111 #endif