Diana Software
QGCanvasWindow.hh
Go to the documentation of this file.
1 #ifndef _QG_CANVAS_WINDOW_HH_
2 #define _QG_CANVAS_WINDOW_HH_
3 
11 #include <list>
12 #include <string>
13 #include <vector>
14 #include "QGWindow.hh"
15 
16 class QGCanvasSetupFrame;
18 class QGFileHandler;
19 class QGHistogram;
20 class QGPlot;
21 class QGPlotFrame;
22 class TGButton;
23 class TGLabel;
24 class TRootEmbeddedCanvas;
25 
26 class QGCanvasWindow : public QGWindow {
27 public:
29  QGCanvasWindow(const TGWindow *p = 0, UInt_t w = 600, UInt_t h = 450);
30 
32  virtual ~QGCanvasWindow();
33 
35  void AddPlot(QGPlot *plot);
36 
38  void AddToDrawnPlots(QGPlot *plot);
39 
41  void ClearDrawnPlots();
42 
44  void DisplayPlotFrame();
45 
47  void DisplaySetupFrame();
48 
50  std::list<QGPlot*>& GetDrawnPlots() {return fDrawnPlots;}
51 
54 
57 
59  std::list<QGPlot*>& GetPlots() {return fPlots;}
60 
62  void RemoveFromDrawnPlots(QGPlot *plot);
63 
65  void RemovePlot(QGPlot *plot);
66 
68  void SetPlotsToRegenerate();
69 
71  void SetProperty(std::string key, std::string value);
72 
74  void UpdateFileLabel();
75 
78 
79 private:
82 
85 
87  TGLabel *fFilenameLabel;
88 
90  std::list<QGPlot*> fDrawnPlots;
91 
94 
96  std::list<QGPlot*> fPlots;
97 
100 
101  ClassDef(QGCanvasWindow, 0)
102 };
103 
104 #endif
Part of a canvas window for doing setup tasks.
Part of a canvas window containing control buttons.
Window containing a ROOT canvas.
TGLabel * fFilenameLabel
Filename label.
QGCanvasSetupFrame * fSetupFrame
Setup frame.
void RemovePlot(QGPlot *plot)
Remove pointer to a plot from the list of plots associated with this window.
std::list< QGPlot * > fDrawnPlots
Collection of currently drawn plots in this window.
void RemoveFromDrawnPlots(QGPlot *plot)
Remove pointer to a plot from the list of drawn plots.
void DisplayPlotFrame()
Display the plot frame.
QGCanvasWindow(const TGWindow *p=0, UInt_t w=600, UInt_t h=450)
Constructor.
QGCanvasWindowButtonsFrame * fButtonsFrame
Buttons frame.
QGFileHandler * fFileHandler
File handler.
void AddToDrawnPlots(QGPlot *plot)
Add pointer to a plot to the list of drawn plots.
QGPlotFrame * GetPlotFrame()
Get pointer to the plot frame.
void DisplaySetupFrame()
Display the setup frame.
std::list< QGPlot * > & GetPlots()
Get collection of plots associated with this window.
void AddPlot(QGPlot *plot)
Add pointer to a plot to the list of plots associated with this window.
QGPlotFrame * fPlotFrame
Plot frame.
virtual ~QGCanvasWindow()
Destructor.
void SetProperty(std::string key, std::string value)
Set property (used for opening a session)
void SetPlotsToRegenerate()
Set regenerate for each plot associated with this window.
QGFileHandler * GetFileHandler() const
Get pointer to file handler.
std::list< QGPlot * > fPlots
Collection of plots associated with this window.
void ClearDrawnPlots()
Clears the collection of drawn plots.
std::list< QGPlot * > & GetDrawnPlots()
Get collection of drawn plots.
void UpdateVariablesDropDownBoxes()
Update variables drop down boxes for plots associated with this window.
void UpdateFileLabel()
Update the file label.
Class to handle ROOT files.
Class for GUI histograms.
Definition: QGHistogram.hh:19
Part of a canvas window containing the ROOT canvas.
Definition: QGPlotFrame.hh:17
Base class for GUI plots including histograms, scatter plots, pulses, and graphical cuts.
Definition: QGPlot.hh:21
Base class for GUI windows.
Definition: QGWindow.hh:15