00001 #ifndef _QIGUI_PLOTWINDOW__H_00002 #define _QIGUI_PLOTWINDOW__H_00003
00004 #include <QMainWindow>00005 #include <TCanvas.h>00006
00007 #include "ui_PlotWindow.h"00008 #include "QIGUIPlot.hh"00009
00010 class QIGUIMainWindow;
00011 class QIGUISession;
00012 class QSpinBox;
00013 class QIGUIPlotData;
00014 class QIGUIPlotSet;
00015 class QIGUIScatterPlot;
00016 class QIGUIHistogram;
00017 class QIGUIPlotCanvasEditWindow;
00018 class TVirtualPadEditor;
00019
00020 class QIGUIPlotWindow: public QMainWindow, public Ui::PlotWindow
00021 //class QIGUIPlotWindow: public QMdiSubWindow, public Ui::PlotWindow00022 {
00023 Q_OBJECT
00024
00025 public:
00026 QIGUIPlotWindow (QWidget * parent=0);
00027 QIGUIPlotWindow (QString& name, QWidget * parent=0);
00028 virtual ~QIGUIPlotWindow();
00029
00030 void DivideCanvas (int x, int y);
00031
00033 void Draw(QIGUIPlotData * );
00034
00035 /*@brief set the active session pointer and fill the combo boxes*/00036 void SetActiveSession(QIGUISession * );
00037 bool GetSuperimpose() {return fSuperimpose;}
00038 void SetSuperimpose (bool val) {fSuperimpose = val;}
00039 void ToggleSuperimposeFlag ();
00040
00041 void Init();
00042 void CreateActions();
00043 void CreateSignals();
00044 void DestroySignals();
00045 void FillVariablesCombo(int pad = -1); // default: fill all the pads00046 void AddTabEditCanvas();
00047 void RemoveLastTabEditCanvas();
00048 QIGUIScatterPlot * NewScatterPlot(int index, QIGUIPlotData * plotData, int plotset=0);
00049 QIGUIHistogram * NewHistogram(int index, QIGUIPlotData * plotData, int plotset=0);
00050
00051
00052
00053 // Notify change in plot setup to the PlotSets & Canvas00054 void ChangeLogScale(int pad, QString var, bool log);
00055 void NotifyChangeXVar(QString, int pad);
00056 void NotifyChangeYVar(QString, int pad);
00057 void AddPlotSet(QIGUIPlotSet * plotset);
00058
00059 void UpdateNEvents(int index);
00060 void UpdateCutName(int index);
00061
00062 // Getters & setters00063 std::vector <QIGUIPlotSet*> GetPlotSets() {return fPlotSets;}
00064 QIGUIPlotSet* GetCurrentPlotSet() {return fCurrentPlotSet;}
00065 int GetCurrentPlotSetIndex() {return fCurrentPlotSetIndex;}
00066 void SetCurrentPlotSet(int ind) {fCurrentPlotSet = fPlotSets[ind]; fCurrentPlotSetIndex = ind;}
00067 void CreateGraphicalCut();
00068
00069
00070
00071 public slots:
00072
00073 /*brief set number of canvas (and tabs)*/00074 void AskNumberOfPads ();
00075 void NotifyToggleSuperimposeFlag ();
00076 void NotifyChangePlotHisto(QTreeWidgetItem * item, int column);
00077 void NotifyChangeCurrentItemChanged(QTreeWidgetItem * current, QTreeWidgetItem * previos);
00078 void NotifyChangePlotDataChannel(int dummy);
00079 void LaunchDianaPulseViewerWithZoomCut();
00080 void NotifyTogglePadEditor();
00081 void ToggleGrid();
00082
00083 void RefreshCanvas();
00084 void ClearCanvas();
00085 void ResizeTreePlotsHisto(QTreeWidgetItem* item, int column);
00086 void ChangeActivePad(int i);
00087 void UnZoomActivePad();
00088 void ClearPlotSetup(int index, int plostset = -1);
00089 void DeletePlot(int ind = -1); // if ind == -1, delete seleted plot00090
00091 void CanvasEvent(TObject *obj, unsignedint event, TCanvas *c);
00092 void InitGraphicalCut();
00093 void IntegratePlot();
00094 void FitPeaks();
00095 void IncreaseGeneralChannel();
00096 void DecreaseGeneralChannel();
00097 void ReloadCutsSelectedPlot();
00098
00099 // CoAnalysis00100 void ToggleCoAnalysis(bool);
00101
00102 // Save00103 void SaveAs();
00104 void SaveChannelPlots();
00105
00106
00107 private:
00108
00109 std::string fDescription;
00110 bool fSuperimpose;
00111 QIGUIMainWindow * fMainWindow;
00112 TVirtualPadEditor * fPadEditor;
00113 bool fShowPadEditor;
00114
00115 /*@brief pointer to active session, to obtain list of leaves*/00116 QIGUISession * fActiveSession;
00117
00119 TCanvas * fCanvas;
00120
00121 /*@brief N Pads*/00122 int fNPads;
00123
00124 /*@brief list of editCanvas widget (as many as fNPads)*/00125 std::vector<QIGUIPlotCanvasEditWindow*> fTabEditCanvas;
00126
00128 std::vector<QIGUIPlotSet*> fPlotSets;
00129
00131 QIGUIPlotSet* fCurrentPlotSet;
00132 int fCurrentPlotSetIndex;
00133
00134 QSpinBox * fRawsSpinBox; // nRaws Canvas00135 QSpinBox * fColumnsSpinBox; // nColmns Canvas00136
00137 //Color_t fCurrentColor;00138 std::list<Color_t> fColors;
00139
00140 bool fGeneratingGraphicalCut;
00141 bool fIntegrating;
00142 bool fFittingPeaks;
00143 std::vector<double> fFitPositions;
00144
00145 // CoAnalysis00146 bool fCoAnalysis;
00147
00148 protected:
00149 void closeEvent ( QCloseEvent * event ) ;
00150
00151
00152 public:
00153 // auxiliar00154 QColor &MapColor(Color_t icol);
00155 Color_t &MapColor(QColor qcol);
00156
00157 };
00158
00159 #endif
Generated on Tue Nov 16 10:49:59 2010 for CUORE Software by
1.5.6
In questo sito non sono utilizzati cookie per la profilazione degli utenti. Utilizza cookie di sessione, necessari per il corretto funzionamento dello stesso e per gestire l'autenticazione ai servizi on-line, alla intranet e alle aree riservate... leggi tutto