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 
00033     QIGUIDianaSessionHandler * fDianaHandler;
00034 
00036     QIGUICoSessionHandler * fCoSessionHandler;
00037 
00038     // Auxiliar
00039     QLabel * fChannelLabel;
00040     QSpinBox * fChannelSpinBox;
00041     int fCurrentModule;
00042     int fCurrentEventNumber;
00043     int fCurrentEntryNumber;
00044 
00045     QEventDisplayFactory * fEventDisplayFactory;
00046   public:
00047     // Ctr, Dtr and initialization
00048     QIGUIPulseWindow (QWidget * parent=0);
00049     QIGUIPulseWindow (QString& name, QWidget * parent=0);
00050     QIGUIPulseWindow (QIGUIPlotData * data, QWidget * parent = 0);
00051     virtual ~QIGUIPulseWindow();
00052     void Init();
00053     void InitPlotData();
00054     void InitDisplayObjects();
00055     void CreateSignals();
00056     void DestroySignals();
00057     void CreateActions();
00058 
00059   signals:
00060     void DisplayEventSignal(QEventR*, QEventAuxDataR*, QRunDataR*);
00061 
00062   public slots:
00063     void NotifyChangeInScrollBar(int val);
00064     void NotifyChangeInEventNumber();
00065     void NotifyChangeInEntryNumber();
00066     void NotifyChangeDisplayObject(QTreeWidgetItem * item, int column);
00067     void RefreshEvent();
00068     void ClearEventDisplay();
00069     void DisplayCurrentEventNumber();
00070     void DisplayEvent(QEventR*, QEventAuxDataR *, QRunDataR*);
00071     void SetChannelAndRefresh(int ch);
00072   public:
00073     void EmitDisplayEventSignal(QEventR* ev, QEventAuxDataR*aux, QRunDataR*);
00074 
00075     void JumpToEvent(int ev);
00076     void AskEvent(int ev);
00077 
00078     // Auxiliar
00079     void UpdateWindow();
00080 
00081     // Getters and Setters
00082     QIGUIPlotData * GetPlotData (){return fPlotData;}
00083     void SetPlotData (QIGUIPlotData * plotData);
00084     TCanvas * GetCanvas() {return fCanvas;}
00085     void SetCoSessionHandler (QIGUICoSessionHandler * coSession);
00086 
00087     // STatus bar
00088     void createStatusBar();
00089     QLabel * fStatusBarSession;
00090     QLabel * fStatusBarNumberOfEvents;
00091     QLabel * fStatusBarNumberOfSelectedEvents;
00092     QLabel * fStatusBarCuts;
00093     QLabel * fStatusBarCoAnalysis;
00094   public slots:
00095     void updateStatusBar();
00096 
00097 
00098 
00099 
00100 };
00101 
00102 #endif

Generated on Fri Mar 6 13:40:40 2009 for CUORE Software by  doxygen 1.5.1