QIGUIPlotSet.hh
00001 #ifndef _QIGUI_PLOT_SET__H_
00002 #define _QIGUI_PLOT_SET__H_
00003
00004 #include "QIGUIFileHandler.hh"
00005 #include "QIGUIPlotData.hh"
00006
00007 class QIGUIPlot;
00008 class TCanvas;
00009 class QIGUICoSessionHandler;
00010
00011
00012 class QIGUIPlotSet: public QObject
00013 {
00014 Q_OBJECT
00015
00016 public:
00017 QIGUIPlotSet (QObject * parent = 0);
00018 QIGUIPlotSet (QString name, QObject * parent = 0);
00019 virtual ~QIGUIPlotSet();
00020
00021 protected:
00022 Color_t fColor;
00023 TCanvas * fCanvas;
00024 std::vector<QIGUIPlot*> fPlots;
00025 QIGUIPlotData * fPlotData;
00026 QIGUICoSessionHandler * fCoSessionHandler;
00027 bool fEnabled;
00028
00029
00030 public slots:
00031 void ToggleNeedsRegeneration (bool flag = true);
00032
00033 public:
00034
00035 QIGUIPlot * GetPlot(unsigned int ind) {if (ind<fPlots.size()) return fPlots[ind]; return 0;}
00036 void SetPlot(int ind , QIGUIPlot * p);
00037 void SetColor(Color_t c) {fColor=c;}
00038 Color_t GetColor() {return fColor;}
00039 void IncrColor(){fColor++;}
00040 void DcrColor(){if (fColor>1) fColor--;}
00041 void SetCanvas(TCanvas * c) {fCanvas = c;}
00042 void SetPlotData(QIGUIPlotData * plotdata) {fPlotData = plotdata;}
00043 QIGUIPlotData * GetPlotData() {return fPlotData;}
00044 bool IsEnabled() {return fEnabled;}
00045 void Enable(){fEnabled=true;}
00046 void Disable(){fEnabled=false;}
00047 void ToggleEnabled(bool flag){fEnabled = flag;}
00048 void SetCoSessionHandler (QIGUICoSessionHandler * handler);
00049 QIGUICoSessionHandler * GetCoSessionHandler () {return fCoSessionHandler;}
00050
00051
00052
00053
00054 void Generate();
00055 int Display(bool superimpose);
00056 void AddPlot(QIGUIPlot* plot);
00057 void RemoveLastPlot();
00058 void ClearPlots();
00059 void Init();
00060 };
00061
00062 #endif